Nodes/ComfyUI-CreaPrompt/CreaPrompt Dynamic node
ComfyUI Node

CreaPrompt Dynamic node

Random prompts, plus a local vision model that rewrites them

By tritant·Created 2 years ago·Updated 2 months ago· 95
CreaPrompt Dynamic node
  • image
  • image_2
  • image_3
  • video
  • prompt
  • seed
__csv_json{}
Prompt_count1
CreaPrompt_Collectiondisabled
Choose_collectionKrea2_collection
seed0
Enhancerdisabled
Enhancer_modelhfmaster/Qwen3-VL-4B
Enhancer_precisionfp16
Enhancer_presetFlux (natural prose)
Enhancer_instruction
Enhancer_max_tokens512
Use_imagetrue
Use_textfalse
Use_categoriestrue
Unload_after_generationtrue
text

This is the flagship of the CreaPrompt pack and the one the author has clearly been spending the most time on. It keeps the random-prompt idea from the other nodes, but it does two things the rest can't: it builds its category list dynamically through a button in the UI instead of a fixed wall of dropdowns, and it can hand its output to a local vision-language model that rewrites the result to match whatever image model you're actually targeting. No API key, no cloud call - the whole thing runs on your GPU.

The "Dynamic" in the name is about the UI. Instead of every category baked in as a dropdown, the node has an Add a Category button that lets you pick categories from the pack's csv folder on the fly, add and remove them without rebuilding the node. Your selections are stored in a JSON config field (__csv_json) that the node's frontend writes for you - you don't hand-edit it, the button does. The default set of categories is loaded from presets/default_combos.txt, and you can change that file to change what a fresh node starts with.

The inputs that matter

  • Choose_collection - this is a hint about what era of prompt you're in. Krea2_collection holds newer, full-sentence prompts written for LLM-based models; OLD_collection is the legacy tag-style collection. Pick the one that matches your checkpoint's era, or you'll get prompts that read like a different decade.
  • Enhancer - the big switch. Off by default (and the node works fine off). Flip it on and the generated prompt goes through a local Qwen3-VL-4B model (default Enhancer_model, changeable) that restructures it. Enhancer_preset picks the target model family - Flux (natural prose), Z-Image/Qwen-Image, Krea 2 (natural clauses), SDXL (enriched tags), Video (Wan), or "Your instruction" for a free-form rule. Enhancer_max_tokens caps how long the rewrite can be (64–4096).
  • Use_image / Use_text / Use_categories - what the enhancer gets to look at. Feed it up to three reference images (image, image_2, image_3), a video tensor, or an existing text prompt, and it merges those into the generated prompt. Turn everything off and it's just a prompt rewriter.
  • Unload_after_generation - default on, and leave it on. The VL model is gigabytes of VRAM; unloading it between runs keeps it from squatting on your card while you do other things.

How the enhancer actually works

The source splits this into passes for a reason: it first makes the vision model describe each input image in ~200 words (so it names the specific colors and poses - "pale faded denim", "three-quarter view, head turned right"), then feeds those descriptions plus your random category keywords into a second call that fuses everything into one coherent prompt, with a checklist at the end telling the model nothing may be dropped. That's a genuinely thoughtful way to keep a small 4B model from losing the plot - you can read the whole prompt-assembly logic in creaprompt.py. It's the same "have an LLM translate what you want into a well-structured prompt" pattern the prompting community converged on, just running locally with vision thrown in.

Model files land in ComfyUI/models/LLM/ on first use. Precision is fp16/bf16 by default; the int4/int8 options only appear if you have bitsandbytes installed.

Installing it

Same as the rest of the pack - Manager, search "CreaPrompt", or:

cd ComfyUI/custom_nodes
git clone https://github.com/tritant/ComfyUI_CreaPrompt

Then restart. The bare node needs no pip installs. The Enhancer, though, is lazy-imported and pulls in transformers and huggingface_hub on demand - and if those aren't in your environment you'll see it error only when you flip Enhancer on. For the quantized options:

pip install bitsandbytes

Common issues

  • First enhancer run is slow and huge. It downloads the Qwen3-VL model (several GB) into ComfyUI/models/LLM/ before anything happens. That's a one-time cost, but don't panic when the first prompt takes minutes.
  • Enhancer errors, raw prompt returned. The code catches enhancer failures and falls back to the un-rewritten prompt - you'll see CreaPrompt Enhancer error in the console. Nine times out of ten it's missing transformers or huggingface_hub.
  • VRAM pressure. A 4B VL model plus a diffusion checkpoint plus a VAE is a lot. Use int4, keep Unload_after_generation on, and don't stack three reference images if you're on 8 GB.
  • Wrong collection era = wrong vibe. If the enhanced prompts keep coming out in a style that doesn't fit your model, check Choose_collection before blaming the enhancer.
CategoryCreaPrompt

Inputs (20)

NameTypeDefaultDescription
__csv_jsonSTRING{}
Prompt_countoptINT11–1000
CreaPrompt_CollectionoptCOMBOdisabled2 options: disabled, enabled
Choose_collectionoptCOMBOKrea2_collection2 options: Krea2_collection, OLD_collection
seedoptINT00–1125899906842624
EnhanceroptCOMBOdisabled2 options: disabled, enabled
Enhancer_modeloptSTRINGhfmaster/Qwen3-VL-4B
Enhancer_precisionoptCOMBOfp164 options: int4, int8, fp16, bf16
Enhancer_presetoptCOMBOFlux (natural prose)6 options: Flux (natural prose), Z-Image / Qwen-Image (detailed description), Krea 2 (natural clauses), SDXL (enriched tags), Video (Wan), Your instruction
Enhancer_instructionoptSTRING
Enhancer_max_tokensoptINT51264–4096
Use_imageoptBOOLEANtrue
Use_textoptBOOLEANfalse
Use_categoriesoptBOOLEANtrue
Unload_after_generationoptBOOLEANtrue
textoptSTRING
imageoptIMAGE
image_2optIMAGE
image_3optIMAGE
videooptIMAGE

Outputs (2)

NameTypeDescription
promptSTRING
seedINT