Skip to content

Commit

Permalink
fix: remove unused cn
Browse files Browse the repository at this point in the history
  • Loading branch information
Bing-su committed Jul 28, 2023
1 parent 084e817 commit 5fc736c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
6 changes: 0 additions & 6 deletions controlnet_ext/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
from modules import img2img, processing, shared


def cn_restore_unet_hook(p, cn_latest_network):
if cn_latest_network is not None:
unet = p.sd_model.model.diffusion_model
cn_latest_network.restore(unet)


class CNHijackRestore:
def __init__(self):
self.process = hasattr(processing, "__controlnet_original_process_images_inner")
Expand Down
5 changes: 0 additions & 5 deletions scripts/!adetailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ def __init__(self):
self.ultralytics_device = self.get_ultralytics_device()

self.controlnet_ext = None
self.cn_script = None
self.cn_latest_network = None

def __repr__(self):
return f"{self.__class__.__name__}(version={__version__})"
Expand Down Expand Up @@ -347,9 +345,6 @@ def script_filter(self, p, args: ADetailerArgs):
filename = Path(filepath).stem
if filename in script_names_set:
filtered_alwayson.append(script_object)
if filename == "controlnet":
self.cn_script = script_object
self.cn_latest_network = script_object.latest_network

script_runner.alwayson_scripts = filtered_alwayson
return script_runner, script_args
Expand Down

0 comments on commit 5fc736c

Please sign in to comment.