2023-01-25 13:53:23 +00:00
|
|
|
import os.path
|
2023-05-10 05:43:42 +00:00
|
|
|
|
2023-01-25 13:53:23 +00:00
|
|
|
|
|
|
|
def should_hijack_ip2p(checkpoint_info):
|
2023-01-27 19:43:08 +00:00
|
|
|
from modules import sd_models_config
|
2023-01-25 13:53:23 +00:00
|
|
|
|
|
|
|
ckpt_basename = os.path.basename(checkpoint_info.filename).lower()
|
2023-01-27 19:43:08 +00:00
|
|
|
cfg_basename = os.path.basename(sd_models_config.find_checkpoint_config_near_filename(checkpoint_info)).lower()
|
2023-01-25 13:53:23 +00:00
|
|
|
|
2023-05-10 04:52:45 +00:00
|
|
|
return "pix2pix" in ckpt_basename and "pix2pix" not in cfg_basename
|