rgthree / rgthree-comfy

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

REQEUST: A reroute node with randomizer & scaling input #237

Closed Duemellon closed 5 months ago

Duemellon commented 5 months ago

Can there be a reroute that has a minimum of 2 inputs & will randomize which of the connected inputs goes through?

Here's a pic of KJNode's imagebatch that scales:

image

I tried this using Claude but it is missing some important part & won't produce the "update inputs" button & won't allow for any type of input (like a reroute does). I tried understanding your code but couldn't figure out what to feed ClaudeAI to process it properly so it would take any node input & put out that specific type. I assume there's a check/validation in there which identifies the type of data & update the node to use that type?

The idea is to allow multiples of "same type" inputs to be randomized like models, or loras, or clips, or whatever but it only send one through.

Here was as far as I got.

image

rgthree commented 5 months ago

I believe you can accomplish what you are looking for with the “Any Switch” and the “Random Unmuter”.

The Random Unmuter should unmute one of your nodes which will then be used by the Any Switch (which takes the first non-null input).

Duemellon commented 5 months ago

I'm having a hard time conceptualizing the use of the "muter". I'll look online to see if there are any tutorials about it. Sounds like it's useful in many ways. Same with that "fast actions" since I would like to have randomization within a batch to compare instead of having the same queue'd batch churn out the same.

Duemellon commented 5 months ago

Whew... I didn't know about the "mute" feature. The only way I can get it to go is keyboard shortcut Ctl+M but that did the trick! thanks.