Bypass groups and unbypass other groups, with a single toggle, in different places.
Opened this issue · 2 comments
Thank you for this wonderful node suite!
I have a question which I've seen similar posts on here (e.g. #287 #282), but still couldn't figure out how to implement this.
I'd like to be able to control a lof of different activity, with a single switch (bool). E.g. whether to load a video or single image at the start of the workflow.
the single switch would:
- enable / disable Load Video or Load Image node groups
- set the value of 'preview indicies' for my previews accordingly [0, 30, -30, -1] vs [0]
- enable / disable animatediff group
- enable / disable Save Video or Save Image node groups
- etc.
At the moment I'm doing it with a Bool const into a KJNodes SetNode (i.e. global). And then reading the value in various different places and using switches to divert the signal flow accordingly. But this feels very clunky. With your bypass nodes I think there should be a much more elegant solution, but I cannot figure it out! (I also prefer the idea of having the various nodes muted at design time, as opposed to active but not used at runtime).
EDIT
I've tried using the Any Switch to pass appropiate signal downstream based on bypassed groups. See image below. But I still need to manually enable/disable the groups. How can I have a toggle that will automatically enable the video related groups while disabling the image related groups and vice versa?
did you ever get this to work?
Not using single switches to control multiple pathways as I had originally asked about. But I am using the work around that I summarized in the "EDIT" section.
I.e. I have lots of fast groups bypasser
nodes with different filters (by group title) so I can enable/disable groups with ease. From the groups I have various signals (images, latents, masks, constants etc) going into Any
nodes outside the group, which take the first non-null value. So to switch from working on images to videos, I need to disable the groups containing Image
, and enable the groups containing Video
. It's not as simple as a single switch, but still pretty straightforward when the switches are grouped together and easy to find.