ComfyUI
ComfyUI copied to clipboard
Optimize `recursive_output_delete_if_changed` and `recursive_will_execute` increasing speed by 1000x +
This change fixes #1502, increasing execution speed of re-executed workflows by a significant amount (scales exponentially as more nodes are added).
The change caches the to_delete
value by a given node's output at the prompt level (in execute
) allowing recursive_output_delete_if_changed
to skip nodes whose outputs have already been recursively evaluated.
(While outputs
already pops nodes off effectively stopping evaluation for already deleted nodes, this change caches a to_delete = False
value, allowing the execution to reuse that work)
Hey @comfyanonymous wdyt about optimizing these calls? If it’s a no go, I can just (sloppily) patch it for https://github.com/rgthree/rgthree-comfy node users there, but it feels like a valuable optimization for everyone.
Looking forward to this PR getting merged
Looking forward to this PR getting merged
Yea, I've stopped holding my breath. Good news is if you're already using rgthree-comfy then these have been patched and optimized since September!