ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

bypass or enabled/disabled property for nodes in api

Open memoakten opened this issue 1 year ago • 5 comments

Feature Idea

It would be very helpful for nodes to have enabled/disabled (i.e. bypassed) property in the api, so we can programmatically bypass them from a client. Currently to bypass a node would require manually removing it from the prompt json, and then rewiring the nodes after it, which is needlessly to say quite cumbersome and very bug prone. I'd mentioned this here #1955 along many other requests, so I'm isolating it here so that it's a request unto itself.

Existing Solutions

No response

Other

No response

memoakten avatar Jul 16 '24 00:07 memoakten

This'd be incredbily useful, it's the main reason why I'm looking at other solutions like comfyscript

DiffusionDen avatar Jul 23 '24 19:07 DiffusionDen

Right now I have a workflow with controlnet depth, canny, and lineart, daisychained one after the other, and need to bypass them depending on the user input (bypass all 3 for regular txt2img, bypass only lineart, or bypass only depth, or both depth and canny, so on in all possible orders) without a bypass, I need to manually rewire the json and that's looking to be a huge mess to get into... So I second this suggestion.

MasterAbsinthe avatar Aug 02 '24 16:08 MasterAbsinthe

Desperately need this. As of now, I have to create a separate json for each possible branch through the workflow.

Lumoria avatar Aug 18 '24 10:08 Lumoria

This is a must ! I can't believe there is nothing to achieve this, I would imagine at least the ability to do this through some node, but nope, all the nodes that can do this work frontend only. while we can use switches for passing parts of a workflow or no, having to do that for something like multiple controlnets adds a huge mess in the workflow

oumad avatar Sep 12 '24 20:09 oumad

As many might already know, this functionality is provided on the front-end side. Rather than inserting this preprocessing into the backend, I think it might be better to develope a library for the client side that processes prompts for API use.

ltdrdata avatar Sep 13 '24 00:09 ltdrdata

+1 need this

vinch00 avatar Dec 23 '24 22:12 vinch00

I strongly look forward to the addition of this feature. In our case, we have a multitude of workflows that require enabling and/or disabling depth、lineart、canny、openpose ControlNet based on user input.If there were a way to enable/disable nodes via an API, it would greatly reduce the maintenance costs associated with the workflow JSON.

smallersoup avatar Jan 08 '25 06:01 smallersoup

As many might already know, this functionality is provided on the front-end side. Rather than inserting this preprocessing into the backend, I think it might be better to develope a library for the client side that processes prompts for API use.

Really? I've searched for ages for a group bypasser with boolean input for the front end. Nothing like this exists afaik. Rg3 relay/repeater are the closest thing I could find. Thinking to mod it myself to take true/false condition on the input. Unless you know an existing one ofc :)

hobinrude avatar Apr 05 '25 18:04 hobinrude