VykosX / ControlFlowUtils

Custom nodes for ComfyUI to enable flow control with advanced loops, conditional branching, logic operations and several other nifty utilities to enhance your ComfyUI workflows
GNU General Public License v3.0
70 stars 4 forks source link

Cycles not iterating #6

Open LPSCRYPT opened 1 month ago

LPSCRYPT commented 1 month ago

I am not getting any iteration of the index during a cycle - it always stays on 0. I have the Cycle, Continue, and finish nodes properly wired up. I am even trying to simply run the SimpleCycleWorkflow example, however I cannot get the cycle index to become anything other than 0. Connecting the index output of any of these nodes to the Data Monitor always displays 0. Any ideas?

Edit:

Upon further testing, it looks like when I first load the nodes into a fresh workflow and run them, it will constantly stay on the first index of 0 for subsequent runs. Only if I manually trigger the _manualreset flag to True, run it through the workflow (getting errored out because of the null values) and set it back does it start to loop properly. Can this feature be disabled as automatic on boot? I almost always want to start my loop how I set it up and the dry run adds an additional step for me getting my desired behavior.

VykosX commented 1 month ago

Try toggling Manual_Reset ON and OFF and executing once for each state.

On Mon, Oct 14, 2024, 09:53 LPSCRYPT @.***> wrote:

I am not getting any iteration of the index during a cycle - it always stays on 0. I have the Cycle, Continue, and finish nodes properly wired up. I am even trying to simply run the SimpleCycleWorkflow example, however I cannot get the cycle index to become anything other than 0. Connecting the index output of any of these nodes to the Data Monitor always displays 0. Any ideas?

— Reply to this email directly, view it on GitHub https://github.com/VykosX/ControlFlowUtils/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALXFPDPMGSG2KMGKD2SSL2TZ3O5DHAVCNFSM6AAAAABP46BKK6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU4DKOJVHEYDKNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

LPSCRYPT commented 1 month ago

It seems hit or miss. Sometimes what you mention doesn't work and it won't even run the null or zero case, it simply won't queue prompts. Refreshing the page seems to fix this. I suspect it may have something to do with how the state is initialized, with divergent behaviors from booting on pageload / dragging in a workflow / refreshing the page.

Upon further testing, it seems to be window environment specific. Loading the same comfy instance in multiple windows, the stale state error exists upon the first loading of the workflow in each window. If a window is refreshed, the loop acts normally.