stable-diffusion-webui/modules/sd_hijack_ip2p.py

14 lines
411 B
Python
Raw Normal View History

import collections
import os.path
import sys
import gc
import time
def should_hijack_ip2p(checkpoint_info):
from modules import sd_models_config
ckpt_basename = os.path.basename(checkpoint_info.filename).lower()
cfg_basename = os.path.basename(sd_models_config.find_checkpoint_config_near_filename(checkpoint_info)).lower()
2023-05-10 04:52:45 +00:00
return "pix2pix" in ckpt_basename and "pix2pix" not in cfg_basename