Kosinkadink / ComfyUI-AnimateDiff-Evolved

Improved AnimateDiff for ComfyUI and Advanced Sampling Support
Apache License 2.0
2.64k stars 196 forks source link

[PSA] New ComfyUI update requires AnimateDiff-Evolved to be updated, otherwise you'll get a ModelPatcher model_keys issue #394

Open Kosinkadink opened 4 months ago

Kosinkadink commented 4 months ago

Simply update to newest AnimateDiff-Evolved, and you're good to go. Is backwards compatible with old ComfyUI versions, so no worries.

sauceruney commented 3 months ago

I noticed this last night before bed. This evening I made a completely fresh install and have the latest version of AnimateDiff-Evo and I'm still getting the model_keys issue. I apologize in advance if I'm doing something dumb.

Error occurred when executing ADE_AnimateDiffLoaderGen1:

'ModelPatcher' object has no attribute 'model_keys'

File "C:\Users\sauce\comfyui\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:\Users\sauce\comfyui\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "C:\Users\sauce\comfyui\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "C:\Users\sauce\ComfyUI\custom_nodes\ComfyUI-AnimateLCM\animatediff\nodes_gen1.py", line 79, in >load_mm_and_inject_params model = ModelPatcherAndInjector(model) File "C:\Users\sauce\ComfyUI\custom_nodes\ComfyUI-AnimateLCM\animatediff\model_injection.py", line 36, in init self.model_keys = m.model_keys

Kosinkadink commented 3 months ago

@sauceruney if you look on the log, it's actually a different node pack that isn't mine throwing the error: ComfyUI-AnimateLCM. You can safely remove it - AnimateLCM is fully supported via ComfyUI-AnimateDiff-Evolved. That will fix your issue.

sauceruney commented 3 months ago

I appreciate the fast response! Thank you!

I'll go delete that right now

snoopy233pp commented 3 months ago

i had updated the AnimateDiff-Evolved,but it doesn't work...help..

snoopy233pp commented 3 months ago

Error occurred when executing ADE_UseEvolvedSampling:

'ModelPatcher' object has no attribute 'model_keys'

File "D:\Workspace\comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Workspace\comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Workspace\comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Workspace\comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\nodes_gen2.py", line 55, in use_evolved_sampling model = ModelPatcherAndInjector.create_from(model, hooks_only=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Workspace\comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\model_injection.py", line 92, in create_from return ModelPatcherAndInjector(model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Workspace\comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\model_injection.py", line 45, in init self.model_keys = m.model_keys

Kosinkadink commented 3 months ago

If you get the error, it means it didn't update. You can try to do it manually by doing a git pull in the ComfyUI-AnimateDiff-Evolved folder.

snoopy233pp commented 3 months ago

Oh, sorry, the update failed, thank you, it is fixed now, thank you very much~

mratashi commented 3 months ago

My comfyUI and nodes are updated but I get this error yet

mratashi commented 3 months ago

Error occurred when executing ADE_ApplyAnimateDiffModelSimple:

'MotionModelPatcher' object has no attribute 'model_keys'

File "C:\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved-main\animatediff\nodes_gen2.py", line 159, in apply_motion_model return ApplyAnimateDiffModelNode.apply_motion_model(self, motion_model, motion_lora=motion_lora, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved-main\animatediff\nodes_gen2.py", line 117, in apply_motion_model motion_model = motion_model.clone() ^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved-main\animatediff\model_injection.py", line 263, in clone n.model_keys = self.model_keys ^^^^^^^^^^^^^^^

Kosinkadink commented 3 months ago

If you get the error, it means your version is outdated. My code no longer references model_keys, and the lines in your log don't correspond to what's actually there in updated AnimateDiff-Evolved. You can try a manual git pull from the ComfyUI-AnimateDiff-Evolved directory if the manager update is failing for whatever reason.

Chaineselion commented 3 months ago

what is this? Error occurred when executing ADE_ApplyAnimateDiffModel:

'MotionModelPatcher' object has no attribute 'model_keys'

File "E:\ComfyUI-aki-v1.3\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "E:\ComfyUI-aki-v1.3\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "E:\ComfyUI-aki-v1.3\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "E:\ComfyUI-aki-v1.3\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\nodes_gen2.py", line 112, in apply_motion_model motion_model = motion_model.clone() File "E:\ComfyUI-aki-v1.3\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\model_injection.py", line 892, in clone n.model_keys = self.model_keys

Kosinkadink commented 3 months ago

@Chaineselion it means your AnimateDiff-Evolved is outdated compared to your ComfyUI, which is exactly what this issue is talking about. Just update AnimateDiff-Evolved, as this issue states. image

Chaineselion commented 3 months ago

非常感谢!

LeoLee5008 commented 2 months ago

我已经更新了 AnimateDiff-Evolved,但它不起作用...救命......

你把它卸载了,重新安装。我的问题就是这样解决的。

ZERO752 commented 2 months ago

thank you very much!!