Unprompted v0.3.0
Your prompt box just grew a templating language
- anything
- STRING
- IMAGE
If you've ever wanted a prompt that decides things for itself - pick a random character, swap the lighting, branch on a condition - this is the node that makes it happen. The Unprompted node takes whatever text you put in it and runs it through the Unprompted templating language, the same engine that powers a popular A1111 extension. You get wildcards, variables, conditional logic, loops, and file inclusion, all inside a single string field. That old A1111 bracket syntax people keep rediscovering - {brown|blonde|black} hair - is Unprompted's bread and butter, and it works here exactly the way you remember it.
The name is worth taking literally: it's a template engine, not a prompt writer. There's no LLM call, no API key, nothing to download beyond the pack itself. You hand it a string with Unprompted's [...] shortcodes and {...} variable syntax, and it hands back the resolved result.
How it works
Under the hood the pack imports the real unprompted Python package (pinned at v11.2.0) and spins up a single shared Unprompted engine object. When the node runs, it concatenates string_prefix + string_field + string_suffix and passes the lot through Unprompted.start(), which parses every shortcode and substitutes every variable. Your templates live in the pip-installed package itself - the README points to ComfyUI/venv/Lib/site-packages/unprompted/templates - and you can pull any of them in with [call common/examples/human/main], that sort of thing.
Because the engine is one shared singleton, variables set anywhere in the pack are visible here. You can also feed it non-text data: connect an image (or anything else) to the anything input and it's stored under the variable name you set in set_anything_to (default comfy_var), then reachable inside your string. From there an Unprompted shortcode like [image_edit input="comfy_var" add_noise=500] can even modify it - the README ships an example workflow doing exactly that.
The inputs that matter
string_field- the template itself. This is the one you'll spend your life in.string_prefix/string_suffix- text glued onto the front and back of the field. Convenience only, per the author's own FAQ; useful if you have a shared prefix you don't want to paste into every template.anything+set_anything_to- pipe an image or value in from another node, tagged with a variable name.return_image_var- name of the variable holding an image you want passed out through the IMAGE output (defaults tocomfy_var).always_rerun- forces the node to re-execute every queue even when no input changed. If you're relying on randomness, flip this on; otherwise ComfyUI's caching quietly serves you the same result forever.goodbye_routines- runs Unprompted's cleanup and clears its variables. The author recommends enabling it on the last Unprompted node in a workflow so state doesn't leak between runs.
The outputs
Two of them. STRING is the resolved prompt - wire it into your CLIP Text Encode (or SDXL's two encoders) and you're done. IMAGE stays None unless you stuffed an image into a variable and named it in return_image_var, which is a genuinely niche thing to do; don't feel bad ignoring it.
Installing it
Easiest via ComfyUI Manager - search for ComfyUI-Unprompted (or just "Unprompted"). Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/ThereforeGames/ComfyUI-Unprompted
then restart ComfyUI. The one wrinkle: on first load, install.py runs and pip-installs the pinned dependencies - the unprompted engine from GitHub, plus opencv-python, nltk, and pattern. That's a chunky install (OpenCV is big), and pattern is an old package, so the first startup can take a couple of minutes and occasionally grumbles on exotic Python builds. It's one-time, and Manager's install will handle it too.
Where people get burned
This is still an early alpha (the version in the header, 0.3.0, is the node's, not the language's). The README is upfront that some shortcodes were built for the A1111 UI and won't work in ComfyUI - this port is primarily for text-side stuff like wildcards, not full image pipelines. So if a fancy [image_edit]-style shortcode misbehaves, that's the known frontier, not your mistake. And remember the shared-engine catch: because variables persist across the whole graph, a stale value from an earlier queue can leak into your next prompt if you don't clean up with goodbye_routines. For pure prompt-variety workflows - batch 32 and get a different face every time - this is the node most other options (Dynamic Prompts, the bracket trick done by hand) are slowly converging on.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| string_field | STRING | — | |
| anythingopt | * | — | |
| set_anything_toopt | STRING | comfy_var | — |
| return_image_varopt | STRING | comfy_var | — |
| always_rerunopt | BOOLEAN | false | — |
| goodbye_routinesopt | BOOLEAN | false | — |
| string_prefixopt | STRING | — | |
| string_suffixopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |
| IMAGE | IMAGE | — |