2023-01-25 13:53:23 +00:00
|
|
|
import collections
|
|
|
|
import os.path
|
|
|
|
import sys
|
|
|
|
import gc
|
|
|
|
import time
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
return "pix2pix" in ckpt_basename and not "pix2pix" in cfg_basename
|