mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-02-10 01:49:58 +00:00
i
This commit is contained in:
23
modules_forge/patch_basic.py
Normal file
23
modules_forge/patch_basic.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from ldm_patched.modules.model_patcher import ModelPatcher
|
||||
|
||||
|
||||
og_model_patcher_init = ModelPatcher.__init__
|
||||
og_model_patcher_clone = ModelPatcher.clone
|
||||
|
||||
|
||||
def patched_model_patcher_init(self, *args, **kwargs):
|
||||
h = og_model_patcher_init(self, *args, **kwargs)
|
||||
self.control_options = []
|
||||
return h
|
||||
|
||||
|
||||
def patched_model_patcher_clone(self):
|
||||
cloned = og_model_patcher_clone(self)
|
||||
cloned.control_options = [x for x in self.control_options]
|
||||
return cloned
|
||||
|
||||
|
||||
def patch_all_basics():
|
||||
ModelPatcher.__init__ = patched_model_patcher_init
|
||||
ModelPatcher.clone = patched_model_patcher_clone
|
||||
return
|
||||
Reference in New Issue
Block a user