rgthree / rgthree-comfy

Making ComfyUI more comfortable!
MIT License
1.16k stars 81 forks source link

Help with Mute/Bypass Relay - Does it support Groups? #55

Closed alessandroperilli closed 1 year ago

alessandroperilli commented 1 year ago

I admit defeat. After countless attempts, I can't understand how the Relay node works. I hope one day you'll find the time to publish a few example workflow, because I can't make sense of it.

I use the Repeater node to bypass/mute entire groups in my workflow, but I can't understand how it works together with the Relay and the Fast Bypass/Muter.

My assumption, given the names of these nodes, is that:

  1. whichever status (active/muted/bypassed) a node or group is set on with the Fast Bypass/Muter, that status will be applied to the group where the Repeater is located, or the individual nodes connected to that Repeater.
  2. any Relay node connected to the repeater will propagate that status to other groups or connected nodes.

So that the chain is Fast Muter/Bypasser > Repeater > Relay.

But the description and my tests seem to suggest the other way around: Fast Muter/Bypasser > Relay > Repeater.
Yet, I cannot:

A. Connect the Relay to a Fast Muter/Bypasser to create a switching mechanism. B. Pass the status of a group from the Repeater to the Relay (depending on whichever is the right order)

The label "optional connection" adds a little bit to the confusion.

Let's make a practical example:

What I'd like to setup is a configuration where, my Group Y would inherit (thanks to the Relay) whatever state my Group X is in (thanks to the Repeater).

Other than this, your nodes are all amazing. But you already know that.

rgthree commented 1 year ago

Hmmm. I think there are a couple ways you could accomplish this. I’m not at my computer, but I think this should work:

  1. Fast Muter connected to an impure-less Repeater in Group X.
  2. A Relay node sitting in Group X.
  3. That relay node is connected to an otherwise input-less Repeater on Group Y.

I believe, with that setup, the Fast Muter will mute the Group X, which will mute the Relay, which will tell the Repeater to Mute, which will Mute Group Y.

I can’t remember if Relay relay’s itself, or a connected node. If it’s the latter, then you would want to connect any other node in Group X to the Relay (but not the Group C Repeater).

Alternatively, you may be able to swap the Relay for a second Repeater in Group X that has an input connected to the output of the Repeater in Group Y. Then that second repeater will be muted/enabled with Group X and repeat it to the Repeater in Group Y.

Let me know if either of those work. I can check it out myself later too.

alessandroperilli commented 1 year ago

I appreciate you looking at this on the road.

I tried the first scenario you described before opening this issue, but couldn't make it work. Tried it again now (and failed):

Screenshot 2023-11-07 at 17 17 02

The third scenario (a secondary Repeater in group X connected to primary Repeater in group Y) doesn't work either: the two Repeater nodes refuse to connect no matter what.

alessandroperilli commented 1 year ago

The second scenario works!

Boy was that complicated. Thank you.