๐ Seed (Drawer)
A seed node that shows the seed you actually used
- seed
Here's the most reliable beginner injury in ComfyUI: control_after_generate fires after the run, so the seed shown in the box is the one that will be used next, not the one that just made the image you're staring at. Flip it to "fixed" to save a great result and you've already lost it. DrawerSeed is a seed node designed so that never happens to you.
It ships in ComfyUI-Drawer, Kuroi's mobile-friendly drawer platform. The pack's whole pitch is turning a node graph into touch-friendly controls, and DrawerSeed is one of its nine utility nodes with dedicated Deck-side UI - in the drawer you get a clean randomize/fixed toggle instead of digging for a dropdown.
How it dodges the trap
The input isn't named seed, it's named seed_value. That name matters: ComfyUI's frontend auto-attaches control_after_generate to any widget literally called seed, and DrawerSeed sidesteps the whole mechanism. Randomization happens in the pack's frontend, before the queue, so the number you see is the number that runs. No "before/after" ambiguity to reason about.
Two inputs:
- seed_value - INT, 0 to 2ยณยฒโ1. The actual seed.
- mode -
randomize(default) orfixed. Randomize rolls a new seed before each queue; fixed locks what's there.
One output, seed, an INT. Feed it into a KSampler - right-click the sampler's seed widget, Convert to input, and wire it in. The clever bit is that mode is stripped from the executed prompt by an on_prompt handler, so it never touches the cache signature. Only seed_value counts for caching. That means flipping randomizeโfixed costs you nothing, and the backend always receives a concrete number, so caching behaves like ComfyUI expects - no surprise re-execution.
There's a nice integration too: if you run an XYZ Plot sweep in the drawer, DrawerSeed's randomization fires exactly once before the sweep and is suppressed during it. A sweep stays reproducible from a single seed.
Installing it
DrawerSeed comes with the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Kuroi961/ComfyUI-Drawer.git
pip install -r ComfyUI-Drawer/requirements.txt
Or search for ComfyUI-Drawer in ComfyUI Manager - easier. requirements.txt is just Send2Trash; no models, no ffmpeg needed.
Gotchas
- Keep
modeonrandomizewhile you're farming seeds, then flip tofixedthe moment you find one - that's the whole workflow. - Unlike the core widget, the seed in the box here is the one that just ran. That's the feature, not a bug.
- Don't convert
seed_valueto an input from another node and then wonder why randomize seems dead - if an upstream value is feeding it, the upstream wins.
DrawerSeed is a small node, but it fixes a genuinely annoying ComfyUI behavior, and on a tablet or phone - the pack's target use - it's a much easier control to live with than a dropdown buried in a sampler.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| seed_value | INT | 00โ4294967295 | โ |
| modeopt | COMBO | randomize | 2 options: randomize, fixed |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| seed | INT | โ |