ComfyUI-AnimateDiff-Evolved: module for custom nodes: cannot import name 'lcm' from 'comfy.samplers' [ComfyUI update, just pushed my changes, so update ComfyUI+AnimateDiff-Evolved to fix]
After I updated comfyui today, an error occurred and the plug-in could not be used. After checking, I found that he deleted the lcm method in the “ComfyUI\comfy\samplers.py” file in comfyui. It can be used normally after adding it. Can it be compatible and adapted?
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Reactions: 2
- Comments: 16 (5 by maintainers)
ComfyUI just had an update while I was asleep, so I need to adjust the code to make it work - should be ready in 30 minutes to an hour! I’ll reply when it’s merged into main
I updated the code and merged to main - update your AnimateDiff-Evolved, and everything should work! ControlNets and prompt travel works with sliding context same as before. Let me know if any incompatibilities with nodes that didn’t happen before, any performance degradation, or increased VRAM usage (as long as it has to do with this update - I can’t be responsible for everything even if I’d like to haha).
lcm function was moved yesterday from comfy/samplers.py to comfy/conds.py. I think that the import path for this function must be updated to work correctly
@glennamarshall I tried to add the “lcm” method to the “ComfyUI_windows_portable\ComfyUI\comfysamplers.py” file and then started comfyui and no more errors were reported.
def lcm(a, b): #TODO: eventually replace by math.lcm (added in python3.9) return abs(a*b) // math.gcd(a, b)
But other errors still occur when using it, and I have no choice.