⚖ Build Prompt
Assemble weighted prompts the modular way
- partial_prompt
- partial_prompt
ComfyUI's native prompt box is fine until you want a prompt that changes - which is the whole point of frame-by-frame animation. Build Prompt [Dream] lets you assemble a weighted prompt from pieces: add a fragment, give it a weight, chain more fragments, and let a companion node finalize it into text. It's the structural glue behind the pack's prompt-morphing workflow, where a curve drives one fragment's weight up while another fades out.
How it works
The node takes an added_prompt string and a weight, and appends it to an accumulating PartialPrompt - a chainable data type that this pack uses instead of raw strings. Each fragment is split on commas, and any phrase containing a space gets parenthesized automatically (so golden hour becomes (golden hour)), ready for the weight syntax. Because it's a chain, you can stack any number of Build Prompt nodes, or mix in a Random Prompt Words [Dream] node, and all the fragments pile onto the same growing prompt.
It's genuinely modular: your base scene in one node, your per-frame variation in another, your style in a third - each independently tweakable without rewriting a giant text box.
The inputs that matter
- added_prompt - the fragment to add, multiline.
- weight - its emphasis, default 1.0. This is the knob you wire curves into: a sine wave here makes a fragment breathe in and out of prominence across the animation.
- partial_prompt (optional) - the incoming chain from a previous Build Prompt / Random Prompt Words node. Leave it unconnected and this node starts a fresh chain.
The single output, partial_prompt, plugs into the next builder or into Finalize Prompt [Dream].
The one gotcha
This output is not a string. You cannot wire it into a CLIP Text Encode node and expect text. It must go through Finalize Prompt [Dream], which sorts the fragments, splits them into positive and negative buckets (weighted fragments go positive, negative weights go negative), clamps their emphasis, and emits the two real strings. Forget that step and your carefully built prompt evaporates.
Installing it
Ships with Dream Project Animation Nodes - ComfyUI Manager (search Dream Project Animation) or clone https://github.com/alt-key-project/comfyui-dream-project into custom_nodes, pip install -r requirements.txt, restart. No model downloads.
Common issues
Aside from the Finalize step, the main stumble is weight surprises. A fragment with weight 1.0 is neutral - if you expect it to stand out, bump it above 1. And when you chain nodes, keep in mind the fragments merge in order but Finalize sorts them by weight before emitting, so the text you get back isn't in the order you typed it. That's fine - the emphasis is what matters. Negative weights are supported (they become the negative prompt), which is a tidy way to build positive and negative strings in one chain.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| added_prompt | STRING | — | |
| weight | FLOAT | 1.00 | — |
| partial_promptopt | PARTIAL_PROMPT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| partial_prompt | PARTIAL_PROMPT | — |