Is there any way to conditionally disable a nodes execution? #3639
Replies: 3 comments 5 replies
-
OnEvent, OnTrigger, etc., only function on the front end and are determined before the workflow is executed. In ComfyUI, this corresponds to setting the mute state. The approach depends entirely on whether you want a switch that is applied before execution or runtime control flow. |
Beta Was this translation helpful? Give feedback.
-
This workflow can now be configured through Impact Pack. |
Beta Was this translation helpful? Give feedback.
-
What I want is for an entire group of nodes to not execute based on a condition evaluated early running a job. For instance, to check an image loaded for if the resolution is over or under a certain margin, and to skip executing a group that contains, say, captioning or upscaling (in the way bypass would). I can logically switch data flow, but I'd rather not execute certain nodes at all. |
Beta Was this translation helpful? Give feedback.
-
Im very very close to having a workflow that takes 1.5 or SDXL models, and switches all the control nets and other things to the appropriate equivalents for each model, the only thing I still have to do manually is bypass the SDXL conditioning, as the 1.5 model doesn't have the second text encoder, and it freaks out if the conditioning is applied even though the output isn't used.
I wrote a custom node that tells what the model type is, that information is connected to switches that swap things.
I could write a custom node for the SDXL text prompt conditioning that has an enable disable input, but I was wondering if there is another way to conditionally enable/disable the node?
Is the onTrigger mode actually implemented? I see it in the litegraph.js but, how do you trigger an event? Seems like a solution. I already have a custom node that emits model type which is used to switch things like 1.5 open pose to sdxl open pose, so if the OnEvent or OnTrigger modes actually work, what format of input do they take?
@ltdrdata
Beta Was this translation helpful? Give feedback.
All reactions