fix broken calls to find_checkpoint_config
This commit is contained in:
parent
9beb794e0b
commit
cc8c9b7474
|
@ -6,7 +6,7 @@ import shutil
|
||||||
import torch
|
import torch
|
||||||
import tqdm
|
import tqdm
|
||||||
|
|
||||||
from modules import shared, images, sd_models, sd_vae
|
from modules import shared, images, sd_models, sd_vae, sd_models_config
|
||||||
from modules.ui_common import plaintext_to_html
|
from modules.ui_common import plaintext_to_html
|
||||||
import gradio as gr
|
import gradio as gr
|
||||||
import safetensors.torch
|
import safetensors.torch
|
||||||
|
@ -37,7 +37,7 @@ def run_pnginfo(image):
|
||||||
|
|
||||||
def create_config(ckpt_result, config_source, a, b, c):
|
def create_config(ckpt_result, config_source, a, b, c):
|
||||||
def config(x):
|
def config(x):
|
||||||
res = sd_models.find_checkpoint_config(x) if x else None
|
res = sd_models_config.find_checkpoint_config_near_filename(x) if x else None
|
||||||
return res if res != shared.sd_default_config else None
|
return res if res != shared.sd_default_config else None
|
||||||
|
|
||||||
if config_source == 0:
|
if config_source == 0:
|
||||||
|
|
|
@ -5,9 +5,9 @@ import gc
|
||||||
import time
|
import time
|
||||||
|
|
||||||
def should_hijack_ip2p(checkpoint_info):
|
def should_hijack_ip2p(checkpoint_info):
|
||||||
from modules import sd_models
|
from modules import sd_models_config
|
||||||
|
|
||||||
ckpt_basename = os.path.basename(checkpoint_info.filename).lower()
|
ckpt_basename = os.path.basename(checkpoint_info.filename).lower()
|
||||||
cfg_basename = os.path.basename(sd_models.find_checkpoint_config(checkpoint_info)).lower()
|
cfg_basename = os.path.basename(sd_models_config.find_checkpoint_config_near_filename(checkpoint_info)).lower()
|
||||||
|
|
||||||
return "pix2pix" in ckpt_basename and not "pix2pix" in cfg_basename
|
return "pix2pix" in ckpt_basename and not "pix2pix" in cfg_basename
|
||||||
|
|
Loading…
Reference in New Issue
Block a user