ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Instruction execution order

Open dchatel opened this issue 6 months ago • 1 comments

Feature Idea

With PR 2666 being merged, we now have control flow, which is nice, but I feel like we miss something important: a proper instruction order. We don't have control flow links, so the execution model has no idea what node should be executed first.

This can be problematic in some long workflows where you set up previews in the middle of the workflow, so you can decide to stop early before processing the costly parts (like hires fix on an animation, for example).

In unreal engine (and other typical visual scripting engines) you have an additional link on "instruction nodes" that allows to define the flow of execution. image

Notice that not all nodes need that, some nodes are pure functions and don't need it. But nodes that are not pure functions (i.e. nodes that have side effects outside of the function) need that "instruction order link" so we can set the order of execution without resorting to the index of the node.

Existing Solutions

No response

Other

No response

dchatel avatar Aug 17 '24 18:08 dchatel