Eden_randbool
A coin flip with a bias control β seed it, and it flips the same way every time
- bool
Eden_randbool is a seeded coin flip. Feed it a seed and a probability, and it returns a boolean: True with that probability, False otherwise. Same seed, same result, every time - which is the whole trick. A "random" boolean that's actually reproducible is what makes a branching workflow testable, and this node exists to put that coin in your graph.
How it works
The implementation is admirably small. It seeds PyTorch with your seed, draws a single uniform random value from torch.rand(1), and returns True if that value is below probability. Since the RNG is seeded deterministically, the same (seed, probability) pair always produces the same flip. That's the behavior to lean on: unlike a raw "random" toggle that re-rolls every run, this one is a stable branch condition you can iterate on.
Inputs and outputs
- seed (
INT, default 0) - the determinism lock. - probability (
FLOAT, default 0.5) - chance ofTrue. 0.5 is a fair coin; 0.9 is "usually yes"; 0.1 is "almost never."
Output: bool (BOOLEAN).
That's it - two inputs, one output.
What to do with it
Branching is the obvious use, and the Eden pack is built for it - its Logic category has conditional-execution nodes, and someone in the community has literally described using Eden's "if any execute" nodes to switch graph paths conditionally. Wire this boolean into a conditional to occasionally inject a LoRA, occasionally flip a denoise level, or pick between two prompt paths. The probability input lets you tune how often the branch fires without editing the graph. And because it's seed-driven, when you're debugging a branch that fired when you didn't expect it, you can hold the seed and step through the logic.
Installing it
Part of the Eden.art nodesuite (edenartlab/eden_comfy_pipelines). Install via ComfyUI Manager (search "Eden.art nodesuite") or:
cd ComfyUI/custom_nodes
git clone https://github.com/edenartlab/eden_comfy_pipelines
cd eden_comfy_pipelines && pip install -r requirements.txt
Restart ComfyUI.
Common issues
The classic confusion: people expect a "random" node to differ every run. If you change the seed and nothing seems to change, check the probability - with probability at the extremes (0 or 1) the coin always lands one way regardless of seed. And remember the node's seed is independent of your sampler's seed; if you want the boolean to re-roll every time you change the image seed, you have to feed it a seed that changes too - otherwise the same flip rides along.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 0 | β |
| probability | FLOAT | 0.50 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| bool | BOOLEAN | β |