This commit is contained in:
lllyasviel
2024-01-27 20:42:38 -08:00
parent 60bd01e378
commit b5805732f1
3 changed files with 33 additions and 0 deletions

View 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