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