Lostless Randomize Button
One button to reroll every image in your graph
- trigger
Lostless Random Image is handy on its own, but the moment you've got three or four of them in one graph - say, a batch where every branch pulls a different reference from its own folder - clicking "Randomize" on each node individually gets old fast. Lostless Randomize Button is the broadcast half of that pair: one click rerolls every unlocked Random Image node you've connected to it.
How it works
The node is deliberately almost empty on the surface: one INT input (pulse, default 0) and one INT output (trigger). The real work happens in its frontend button, Randomize Connected. Click it and two things happen:
- The
pulsewidget increments and fires its callback, marking the graph dirty - so with auto-queue on, the graph re-runs. - It walks the graph from its
triggeroutput, finds every connected node that implements the Random Image randomize hook, and calls it - skipping any node with its Broadcast Lock (lock_randomize) ON.
That second part is the whole trick. The Broadcast Lock toggle on each Lostless Random Image node is how you freeze one branch while rerolling the rest. Keep your reference image locked, reroll the other three inputs, run once.
Wiring it up
Connect trigger (output) to the trigger input on each Lostless Random Image node you want in the broadcast. That's the connection the button follows. In the usual setup:
Lostless Randomize Button.trigger
├── Lostless Random Image.trigger (unlocked - gets rerolled)
├── Lostless Random Image.trigger (unlocked - gets rerolled)
└── Lostless Random Image.trigger (Broadcast Lock ON - skipped)
With auto-queue on, one click on the button picks fresh images on all unlocked nodes and kicks the graph. With auto-queue off, it still rerolls the picks; you just hit Run yourself afterward.
Should you bother?
It's a convenience node, full stop. If you have one Random Image node, skip it - that node's own button is fine. It pays off at scale, or when you want a single gesture to cycle an entire multi-input composition. There's nothing clever or hidden here, and that's the compliment: it does exactly what the name says and gets out of the way.
Install
Same pack as everything else: search Lostless Nodes in ComfyUI Manager, or
cd ComfyUI/custom_nodes
git clone https://github.com/lostlessvisuals/comfyui-lostless-nodes
python -m pip install -r ComfyUI/custom_nodes/comfyui-lostless-nodes/requirements.txt
then restart ComfyUI. No models, no external services.
Troubleshooting
- Clicking does nothing to a node. Check the wire is on the
triggerinput and the target's Broadcast Lock is OFF. A locked node is silently skipped by design - there's no error, just no reroll. - Images update but the graph doesn't run. That's auto-queue being off. The button re-picks; you still have to run.
- The button itself has no widgets to poke. The
pulseis bumped internally on each click - you don't touch it, and you don't need to convert it to an input.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| pulse | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| trigger | INT | — |