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