From c66f3882f0bf9b74f5cbdb87873979bf9e1a8055 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Tue, 19 Mar 2024 12:59:46 -0500 Subject: [PATCH] Made patch_model fix backwards compatible for now --- animatediff/model_injection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/animatediff/model_injection.py b/animatediff/model_injection.py index d04a897..28e0643 100644 --- a/animatediff/model_injection.py +++ b/animatediff/model_injection.py @@ -51,7 +51,10 @@ class ModelPatcherAndInjector(ModelPatcher): def patch_model(self, device_to=None, patch_weights=True): # first, perform model patching - patched_model = super().patch_model(device_to, patch_weights) + if patch_weights: # TODO: keep only else portion when don't need to worry about past comfy versions + patched_model = super().patch_model(device_to) + else: + patched_model = super().patch_model(device_to, patch_weights) # finally, perform motion model injection self.inject_model(device_to=device_to) return patched_model