Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass groups and unbypass other groups, with a single toggle, in different places. #322

Open
memo opened this issue Sep 6, 2024 · 2 comments

Comments

@memo
Copy link

memo commented Sep 6, 2024

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:

  1. enable / disable Load Video or Load Image node groups
  2. set the value of 'preview indicies' for my previews accordingly [0, 30, -30, -1] vs [0]
  3. enable / disable animatediff group
  4. enable / disable Save Video or Save Image node groups
  5. 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?
image

@mattymatty
Copy link

did you ever get this to work?

@memo
Copy link
Author

memo commented Oct 31, 2024

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.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants