π« Finalize Prompt
Turn a pile of weighted prompt fragments into one clean positive and negative
- partial_prompt
- positive
- negative
In a frame-by-frame animation the prompt shouldn't be a static string - it should morph as the shot progresses. Finalize Prompt [Dream] is the end of a pipeline that lets you build exactly that: you chain weighted prompt fragments together, then this node flattens them into a single positive and negative prompt pair you can feed to a CLIP Text Encode.
It's the termination node for the pack's prompt-morphing system. In this pack, "Build Prompt [Dream]" nodes each add a piece of text with a weight, passing a PARTIAL_PROMPT along a chain; Finalize Prompt is what turns that accumulated structure into plain text. Since the weights can come from curve nodes (drive a fragment's weight with a Sine Curve, for instance), your prompt literally shifts meaning across the animation.
The inputs that matter
partial_prompt- the accumulated weighted prompt from one or more Build Prompt nodesadjustment- how to normalize the weights:raw(no normalization),by_abs_max(scale so the largest absolute weight equalsadjustment_reference), orby_abs_sum(scale so the absolute weights sum toadjustment_reference)clamp(FLOAT, default 2.0) - caps how extreme any single weight can getadjustment_reference(FLOAT, default 1.0) - the target the normalization scales toward
Outputs are positive and negative STRINGs. Weighted fragments that came in negative land in the negative prompt; positive ones go to positive. That split is the whole trick - you don't maintain two prompt strings, you just add pieces with the right sign and let Finalize sort them.
Why the adjustment settings exist
Prompt morphing gets out of hand fast when fragments have wildly different weights - one fragment at 3.0 can drown everything. by_abs_sum keeps the total energy of the prompt stable frame to frame, which is what you want when weights are animated and you don't want the overall prompt to suddenly scream. by_abs_max is the gentler option. If you're just building a one-off weighted prompt, raw with a clamp is fine.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-project.git
Or via ComfyUI Manager ("Dream Project Animation"). No model downloads. The pack's runtime deps are imageio, scipy, torchvision, pilgram, and evalidate - and the numpy<2.0 pin is the usual suspect if you see NumPy errors. Find it under Dream β conditioning. Its companion, "Build Prompt", sits right next to it - you'll almost always use both together.
A note on context: this pack predates the current video-model era and isn't maintained, but weighted prompt morphing is a technique that outlives any single tool, and the Deforum-style workflow it supports is still how a lot of people approach narrative animation.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| partial_prompt | PARTIAL_PROMPT | β | |
| adjustment | COMBO | 3 options: raw, by_abs_max, by_abs_sum | |
| clamp | FLOAT | 2.0 | β |
| adjustment_reference | FLOAT | 1.00 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | STRING | β |
| negative | STRING | β |