Seed
A Seed Node That Shows You the Seed You Just Heard
- seed
You know the injury. You queue a run, the result is great, you reach for the seed box to lock it - and the number in it belongs to something that hasn't been generated yet. ComfyUI's control_after_generate fires after the run, so by the time you see something you like, its seed is already gone.
Plenio Seed fixes exactly that: it draws the new seed before the run instead of after, so the number in the box is always the one that made what you're listening to. Switch it to 🔒 and the next run repeats it. That's the whole pitch.
Why a music pack needed one
Plenio is a local song-production system for ComfyUI: a brief goes in, a writer model drafts title, style and lyrics, YuE2 or MiniMax Music 3 performs it, and the pack masters and exports the file. Along the way sit four or five separate random choices - the draft, YuE2's plan for the score, the render ("take"), the cover art - and each is a knob you want on its own. Draft locked plus take renewed is how you get five performances of lyrics you like.
A lot of seeds to keep straight - so since 1.0.0 the templates use this node in place of ComfyUI's own Seed, with the same input name and node titles so older release records still resolve. It's just an INT, so it works anywhere else a seed is wanted.
How it works
Two widgets, no cleverness in the Python. seed is an INT (0 to 2^63−1); keep_seed is a boolean labelled 🎲 new seed and 🔒 same seed. On execution the node returns that integer unchanged - one output, seed.
The behaviour lives in the frontend extension. It hooks the node so every queued run - including each run of a batch - draws a fresh number before the prompt is built, and only when the switch is off. The node declares control_after_generate=False, so ComfyUI's after-the-fact control isn't attached and your "widget control mode" setting can't muddy it. The node turns amber for 🎲 and blue for 🔒, so the next run's behaviour reads at a glance, and a 🎲 new seed now button rolls one on demand even while 🔒 is on - for that one-more-variant you intend to keep. Drawn numbers stay under 2^32 on purpose, because every sampler and model server downstream has to accept them.
Inputs and outputs that matter
- seed - the number. Type one in to go back to a take you liked; every exported song's release record lists the seeds it used.
- each run (
keep_seed) - the one switch. 🎲 draws new, 🔒 holds. - seed (INT, out) - wire it into anything that takes a seed. In the templates that's the render and the writer; in your graphs it's a
RandomNoiseor a sampler seed, converted from widget to input. If that input is fed by a link, the extension leaves your number alone.
Install
You get it by installing the pack; there's no separate package.
cd ComfyUI/custom_nodes
git clone https://github.com/jplenio/Plenio-Music-Production-System
Restart ComfyUI. Or find Plenio Music Production System in Manager, or comfy node install comfyui-plenio-music. You need ComfyUI 0.37.0 or newer and nothing else - the pack's requirements.txt installs no Python packages. Model downloads only matter for the music templates; a bare seed node needs none, and no GPU.
Common issues
"The number changed and I didn't queue anything." You pressed 🎲 new seed now, or you were still on 🎲 when you queued. The switch controls the next run; the number is what the last run used.
"I switched to 🔒 and still got a different result." A seed only reproduces a result when everything else is identical - same model file, same documents, same settings. In Plenio that means the drafted lyrics and the score too, so a locked take seed with a fresh draft seed gives you a different song wearing a familiar number. The pack's guide is blunt about the useful pairings: draft 🔒 + take 🎲 for more performances of the same words, take 🔒 to pull a render from ComfyUI's cache and skip straight to mastering.
"The seed never changes from a script." No browser, no before-run hook - a headless prompt sends whatever number the node holds. Randomise it in your loop.
Worth saying plainly: this problem has other answers. rgthree's Seed node and the Inspire Pack's global seed both exist because of it, and the free fix is one settings change - widget control mode to Before, and stock nodes stop eating your seed. Plenio Seed is the smallest version of the idea: one toggle instead of a four-mode dropdown, plus the number that actually produced the take. Installing a whole music system for one utility is a lot of pack, though. Want seed bookkeeping and nothing else? Reach for rgthree. Making songs in Plenio anyway? Leave it in every template.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–9223372036854776000 | The number behind this part's random choices: the same number gives the same result. |
| keep_seed | BOOLEAN | false | 🎲 new seed: every run draws a new number before it starts - something new each time. 🔒 same seed: every run uses this number again - the same result while you change other things. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| seed | INT | The seed of this run. |