rgthree / rgthree-comfy

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

[Feature Request] Fast Groups Muter #147

Closed Aljnk closed 8 months ago

Aljnk commented 9 months ago

Hi. I really liked your Fast Groups Muter Node. It would be nice if it had some of these features:

  1. Ability to delete/disable a group from the list (even if it exists) - Why? I would like to see only those groups in the list that make sense to disable, and the rest should not fill the list (this is especially annoying when there are many such groups).
  2. The ability to disable and enable multiple groups at once if they have the same name - For example, a group can be very large and to make it easier to understand it could be divided into multiple groups, but at the same time one switch would be responsible for all of them. Currently, disable only disables a group with the same name.
  3. The ability to get information about which groups are enabled or disabled - for example, it can be an output with a list of numbers (0 or 1) separated by commas. This would be interesting because with such a list I could install a switch and control the passing signal. For example, I have a group with LORA, and if I turn it off, I could make it so that instead of a model with LORA, a simple model goes to the Sampler.

Thanks again for your work, I hope you have time to make these changes.

rgthree commented 9 months ago

(Hint: Right-click the node and choose "🛟 Node Help" for information)

  1. You can filter the groups shown in the groups muter by color and/or title match.
  2. There are two solutions right now:
    • You can nest groups, so you could have one overlapping group that would mute all nodes, ten using the filter described above, just have on toggle for the encompassing group.
    • You could keep individual groups and have a Relay and Repeater nodes so when you mute one group, the others will also mute (any node in group A w/ output connected to a Mute Relay Node, that Relay connected to a Mute Repeater Node, that Repeater node inside group B. Now when that node in A is muted, group B will also mute).
  3. Similar to the second above, you could do something like this with the Relay and Repeater combo. Relay can also change it, so you can have one group become enabled when the relay would otherwise mute, etc
Aljnk commented 9 months ago

Thank you for your answer!

  1. Very good - work :)
  2. I figured out how to do it - it worked.
  3. Not sure how this will help. Maybe I explained something wrong, I'll try another way.

I'll describe my problem: I have a workflow where there is a group with LORA that I want to mute. But when I do this, I get an error (see picture).

Screenshot_2

I can avoid this problem with an additional switch (see picture 2 - near LORA State). In the OFF position it uses the model with index 1 (regular) and in the ON position it uses the model with LORA. Now everything works for me, but I need a second switch. If your node provided data about the state of your switches, then I wouldn't need a second switch. I can take your data and connect it to the switch that selects the models.

Screenshot_1
rgthree commented 9 months ago

Ah, you're using a less than ideal switch node.

What you're triyng to do in your second screenshot, you can much more cleanly do with just one additional node being added to your first screenshot; the Any Switch (rgthee) node. This node continues to power-muting and reducing work by choosing the first non-null/empty input.

So, using your first screenshot, simply add an Any Switch (rgthree) before the KSampler and still outside the Lora group. Connect the Lora Stack model output to the first input, and the Load Checkpoint model output to the second input (and, obviously, the switch output to the KSampler). Now, when the Lora Stack is muted, the Any Switch will automatically choose the next input, which is the original Load Checkpoint model.


Alternatively, you can keep your first screenshot and, instead of Muting the Lora group, you can Bypass it which should pass the Model input through the Lora Stack without modifying it. There's a Groups Bypasser node which bypasses instead of mutes.

Aljnk commented 9 months ago

Great! I tried Any Switch (rgthree) but did not understand it at all - I did not expect it to work this way. Thanks a lot :)