IC Structured Image Prompt
IC Structured Image Prompt builds clean multi-character prompts from fields
- prompt
- negative_prompt
- character_summary
- warnings
The name is a lie in the best way. "Structured Image Prompt" sounds like it should be calling some API or spinning up an LLM, but IC Structured Image Prompt does neither. It's a pure-Python, deterministic node that turns ten text fields into one finished prompt - no model downloads, no API key, no Ollama sitting in your tray. If you've been watching the local-LLM prompt-enhancer trend and thinking "I don't want a 7B model rewriting my one sentence," this is the antidote.
What it actually is
It's a prompt-assembly node, the kind of plumbing that lives between your text and the CLIP encoder. You get separate multiline boxes for style, camera angle, lighting, background, characters, action, clothing, assets, quality tags, and a negative prompt. Fill them in, and the node assembles them into one string based on a prompt format you pick. Because it's just string munging with the Python standard library (seriously - the only import is re), the same inputs give the same output every single run. That makes it deterministic in a way no LLM node can be, and it plays nicely with ComfyUI's cache: it only re-runs when you change something.
Where it earns its keep is multi-character scenes. The knowledge base is full of warnings that word order binds attributes and that even vision-language models mix up who's wearing what. This node's answer is structure: you define characters as a name: description block, then reference those names everywhere else, and it keeps everything attached to the right person.
How it works
Each field's text starts with a label like style: or characters: - a workaround because ComfyUI hides multiline widget names. The node strips those prefixes automatically, so they never leak into your prompt. The characters/clothing/assets fields use a YAML-ish block:
characters:
Mira: young rogue mage, short silver hair, confident expression
Oskar: old mechanic, heavy beard, tired eyes
From that it builds a character_summary output, one sentence per character - "Mira is young rogue mage, short silver hair, confident expression, wearing black tactical coat...". Reference characters in the action box with [Mira] and the brackets get resolved away (they only resolve if the name actually exists in your character block). The node also validates cross-references and reports anything unmatched through a warnings output, gated by the check character refs toggle.
The prompt format dropdown picks the assembly style, and this is where you want to match it to your checkpoint:
naturalandcinematicbuild full director-style sentences.taggedjust comma-joins the sections for tag-heavy workflows.sdxlprependsmasterpiece, best quality, highly detailedstyle anchors - right for SDXL and its Illustrious/Pony lineage.fluxemits clean descriptive sentences and skips the SDXL boilerplate, because Flux's T5 encoder reads sentences, not tag soup.
The inputs that matter
You'll set most of these once and forget them. The ones you actually touch:
- characters - the heart of the node. Keep names short and reuse them exactly (case and spacing get normalized, but close enough still helps).
- prompt format - set it once per model family.
- prompt prefix / prompt suffix - optional strings pasted before and after everything, which is your hook for LoRA trigger words or a house-style tag.
- negative prompt - remember this output is only meaningfully honored by CLIP-based models at normal CFG. On distilled models running at CFG 1, the negative box is largely inert regardless of what this node feeds it.
The four outputs are prompt, negative_prompt, character_summary, and warnings. Wire prompt and negative_prompt into your CLIP Text Encode nodes; the other two are for your eyes and for debugging.
Installing it
ComfyUI Manager should find it by searching the pack title, comfyui-structured-image-prompt:
cd ComfyUI/custom_nodes
git clone https://github.com/suchschlumpf-arch/comfyui-structured-image-prompt
Then restart ComfyUI and look under IC/Prompting. There's no requirements.txt and no model files, so install is genuinely just clone-and-restart - the rare custom node that can't break your dependency environment.
The gotchas
The prefix-stripping catches people: type style: noir lighting and the output won't contain style: - that's by design, not a bug. If you want the section labels kept in the final prompt, flip include labels on. And if a [name] in your action or a clothing entry isn't matching, check the warnings output first - it literally tells you which reference is unknown. The one real limitation to know: the assembly logic is simple by intent, so it's a prompt builder, not a prompt rewriter. It won't fix your prose; it just stops your two characters from bleeding into one another.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| style | STRING | style: cinematic fantasy realism, detailed materials, coherent composition | Overall visual style: genre, medium, render look, era, and detail level. |
| camera angle | STRING | camera angle: medium full shot, slight low angle, 35mm lens perspective | Camera perspective, framing, lens feel, composition, and viewing angle. |
| lighting | STRING | lighting: soft rim light, warm key light, atmospheric depth | Light sources, mood, shadows, contrast, time of day, and atmosphere. |
| background | STRING | background: ancient city street after rain, distant lanterns, subtle mist | Location, environment, weather, architecture, depth, and visible background elements. |
| characters | STRING | characters: Mira: young rogue mage, short silver hair, confident expression Oskar: old mechanic, heavy beard, tired eyes | Characters as name: description. Reuse these names in action, clothing, and assets. |
| action | STRING | action: [Mira] watches the rooftops while [Oskar] repairs a small flying drone beside her | What happens in the image. Use [name] to reference characters clearly. |
| clothing | STRING | clothing: Mira: black tactical coat, blue scarf, leather boots Oskar: worn orange work jacket, welding gloves | Clothing per character as name: clothing. Names should match the characters field. |
| assets | STRING | assets: Mira: engraved wand, glowing wrist charm Oskar: toolbox, brass repair drone | Objects, weapons, props, companions, or important items per character. |
| quality tags | STRING | quality tags: high quality, sharp focus, rich texture detail, natural color harmony | Quality and detail terms appended near the end of the positive prompt. |
| negative prompt | STRING | negative prompt: low quality, blurry, distorted anatomy, extra fingers, missing fingers, bad hands, deformed face, duplicate subject, unreadable text, watermark | Terms that should be avoided in the image. |
| prompt format | COMBO | natural | Controls how the sections are assembled into one prompt. |
| include labels | BOOLEAN | false | When enabled, section labels such as style/background remain in the final prompt. |
| check character refs | BOOLEAN | true | Warns when clothing, assets, or [name] references do not match a character. |
| show debug | BOOLEAN | true | Shows prompt, negative prompt, character summary, and warnings in the node output. |
| prompt prefixopt | STRING | Text placed before the final prompt, for example a LoRA trigger. | |
| prompt suffixopt | STRING | Text placed after the final prompt. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| negative_prompt | STRING | — |
| character_summary | STRING | — |
| warnings | STRING | — |