Superprompt
Auto-expanding a short prompt into a detailed one
- STRING
Type "a cat on a windowsill," get back three sentences of lighting, lens, and mood detail - that's what this node does. It wraps a small T5 model, fine-tuned specifically on the SuperPrompt dataset, whose whole job is turning a short, plain prompt into a longer, more descriptive one before it ever reaches your actual image model.
Why you'd want this
Diffusion models tend to reward specificity - the more concretely you describe lighting, composition, and mood, the more control you have over the output. But writing that level of detail every time is tedious, and plenty of people just don't want to think in art-direction language. Superprompt is a pre-generation step for exactly that gap: you write the short version, it does the elaboration, and the expanded text is what actually goes into your CLIP Text Encode.
Treat it as a starting point rather than a black box, though. Automated prompt expansion is a known trade - you trade typing for control. It can add detail you didn't ask for, occasionally drift the intent of a terse prompt, or lean on descriptive habits that don't match the model you're actually generating with. The useful workflow is often: run it, read what it produced, then hand-edit before it hits your sampler - not wire it in blind and trust it every time.
How it works
It's a straightforward text-to-text model call: your short prompt goes in, the fine-tuned T5 generates an expanded version, and the expanded string comes out. There's no image awareness here - it doesn't know what checkpoint you're using downstream, it's purely a language model trained to elaborate on short descriptions the way the SuperPrompt dataset's examples did.
The inputs and outputs that matter
Three inputs: prompt - your short starting prompt (multiline, empty by default, this is the one you actually write); instruction_prompt - the instruction fed to the model alongside your prompt, defaulting to "Expand the following prompt to add more detail" (you can change the wording here if you want a different style of expansion, though results will vary since the model was fine-tuned around instructions like the default); and max_new_tokens - a cap on how long the generated expansion can get (default 128, range 1–4096).
One output: STRING, the expanded prompt text. Wire it straight into a CLIP Text Encode (or wherever your workflow takes a text prompt) in place of - or concatenated with - your original.
How to install it
- ComfyUI Manager - search KJNodes for ComfyUI, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, thenpip install -r ComfyUI-KJNodes/requirements.txt(portable:python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-KJNodes\requirements.txt), then restart.
Unlike most of the utility nodes in this pack, this one needs an actual model: expect it to pull the small T5 checkpoint from Hugging Face (roborovski/superprompt-v1, linked directly in the node's own description) the first time you run it. Have a working internet connection and a little disk space free on that first run.
Common issues & troubleshooting
First run is slow, or seems to hang. That's almost certainly the model download, not the node breaking - check your console output for a download progress bar before assuming something's wrong.
The expansion changes what you meant. This is the known limitation of any prompt-upsampling tool, not a bug specific to this one - a model trained to "add detail" doesn't know which details you'd actually pick. If a generation goes somewhere you didn't intend, check the expanded string before blaming your sampler settings; the drift usually happened here.
Output feels generic or repetitive across different prompts. instruction_prompt is your lever - the default is tuned for general elaboration, but you can rewrite it to push toward a specific style of detail (camera terms, mood words, whatever your workflow actually needs) if the default output isn't giving you enough variety.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| instruction_prompt | STRING | Expand the following prompt to add more detail | — |
| prompt | STRING | — | |
| max_new_tokens | INT | 1281–4096 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |