Fix model merge bug.

Unload models before getting weights for model patching.
This commit is contained in:
comfyanonymous 2023-11-10 03:19:05 -05:00
parent 002aefa382
commit 3e0033ef30

View File

@ -134,6 +134,7 @@ class ModelPatcher:
return list(p) return list(p)
def get_key_patches(self, filter_prefix=None): def get_key_patches(self, filter_prefix=None):
comfy.model_management.unload_model_clones(self)
model_sd = self.model_state_dict() model_sd = self.model_state_dict()
p = {} p = {}
for k in model_sd: for k in model_sd: