quick_questions - chrisgoringe/Comfy-Custom-Node-How-To GitHub Wiki
Quick questions that have been asked in the issues and some answers
Loops
I need a simple loop logic, is there any idea how to implement it? I imagine having one node "LoopStart" and one node "LoopEnd", which will decide, if it should activate a connection back to start or forward to the next nodes, depending of the loop index. Though I can't find any information if it's possible at all to decide to activate or not activate certain outputs/connections and also I guess ComfyUI might block the workflow with loops.
Would you give any advice?
I'd advise you not to do this :). The way Comfy works is to submit a complete prompt at the start - modifying the logic afterwards is not at all easy. If you submit a prompt with a loop you will generally crash the python backend.
What I have done is to have nodes which hold state between runs, and then used the auto submit option to make Comfy submit the same workflow repeatedly.