Patch load/unload fix

May break other things. For some reason T5 decided to run on the CPU with this change, but only like once and I can't for the life of me reproduce it.
This commit is contained in:
City
2024-09-02 02:00:10 +02:00
parent 43427eff52
commit c7b902bf9a
+1 -2
View File
@@ -140,8 +140,7 @@ class GGUFModelPatcher(comfy.model_patcher.ModelPatcher):
continue
if len(patches) > 0:
p.patches = []
return super().unpatch_model(device_to=device_to, unpatch_weights=unpatch_weights)
return super().unpatch_model(device_to=None, unpatch_weights=unpatch_weights)
def load(self, *args, force_patch_weights=False, **kwargs):
# always call `patch_weight_to_device` even for lowvram