Mayhem Randomizer
A Parameter Randomizer With Sanity Checks
- steps
- cfg_scale
- cfg_guidance
- height
- width
- seed
Mayhem Randomizer is a "chaos you control" parameter randomizer: you set minimum and maximum ranges for steps, CFG, guidance, height, width, and seed, and each run it rolls fresh values inside those bounds and feeds them to your KSampler and Empty Latent Image. The whole point is seed farming at scale - instead of hand-tweaking four settings per attempt, you define a sane envelope and let the node explore it for you.
How it works
Every run re-seeds Python's random generator with your seed input, then rolls each parameter within its min/max. Three details keep it from being a footgun:
- Automatic min/max fixing. If you type 10 for
steps_minand 3 forsteps_max- the classic swap - the node silently flips them so the lower is always the min. Nice touch, and it means a typo doesn't nuke your runs. - Divisibility rounding. Dimensions are snapped so height/width come out divisible by 16, or by 64 if you flip
divisible_by_64on. Diffusion models want multiples of 16 (64 for some architectures); leaving this to chance produces errors. Default is 16. - The flip.
flip_dimensions(on by default) randomly swaps width and height about half the time, turning a portrait roll into a landscape one. The author says this is a relic from a 2021 Colab hack, and it's the "why not" feature of the pack. If you want orientation to stay put, turn it off.
Inputs and outputs
The four that matter most for a beginner:
- steps_min / steps_max (INT) - sampling steps envelope. Defaults 20β40.
- height_min/max, width_min/max (INT) - dimension envelope. Defaults 512β768.
- divisible_by_64 (BOOLEAN) - 16-multiple (off) vs 64-multiple (on) rounding.
- seed (INT) - the master seed that makes the whole roll reproducible. Same seed, same random values. Set it to fixed to replay a good roll, or drive it from an AutoSeed-style node to keep things fresh.
Outputs, which map directly onto your sampler:
- steps (INT) β KSampler steps
- cfg_scale (FLOAT) β KSampler CFG
- cfg_guidance (FLOAT) β the Flux-family guidance input (this is why the output trio exists - the pack added it when Flux arrived)
- height / width (INT) β Empty Latent Image
- seed (INT) β KSampler seed
The realistic take
This is a genuinely handy quality-of-life node, and the sanity checks are what separate it from a pile of random number generators. Two cautions: randomizing CFG and dimensions wildly will hand you plenty of unusable outputs (the KB's own guidance is that CFG outside 4β7 is wasted rolls on SD-family models, and every 64-multiple or not, big resolution swings cost VRAM), and remember the range envelope is your job - the node is only as sane as the bounds you give it. Keep the envelope tight and Mayhem is a fun exploration tool; loosen it and you're gambling with a 12GB card.
Installing
ComfyUI Manager (search Endless Nodes) or:
cd ComfyUI/custom_nodes
git clone https://github.com/tusharbhutt/Endless-Nodes
Restart, find it under Endless πβ¨ β Randomizers. Single-author hobby pack, GPL v3 - works, but test before you trust.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| steps_min | INT | 201β150 | β |
| steps_max | INT | 401β150 | β |
| cfg_min | FLOAT | 6.001β20 | β |
| cfg_max | FLOAT | 12.001β20 | β |
| guidance_min | FLOAT | 1.000β6 | β |
| guidance_max | FLOAT | 3.500β6 | β |
| height_min | INT | 512256β4096 | β |
| height_max | INT | 768256β4096 | β |
| width_min | INT | 512256β4096 | β |
| width_max | INT | 768256β4096 | β |
| flip_dimensions | BOOLEAN | true | β |
| divisible_by_64 | BOOLEAN | false | β |
| seed_min | INT | 00β4294967295 | β |
| seed_max | INT | 86753090β4294967295 | β |
| seed | INT | 00β4294967295 | β |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| steps | INT | β |
| cfg_scale | FLOAT | β |
| cfg_guidance | FLOAT | β |
| height | INT | β |
| width | INT | β |
| seed | INT | β |