(deforum) Area Prompt
Render different prompts in different regions of the frame
- deforum_data
- deforum_data
A normal Deforum prompt describes the whole frame. (deforum) Area Prompt lets you attach a prompt to a region of the frame - "alien landscape everywhere, but a spaceship in this box." It's regional prompting in animation form: instead of one prompt fighting itself, you place a second prompt in a rectangle and let the sampler give it its own area to satisfy. If you've ever wanted a character to stay in the corner while the background evolves, this is the node.
How it works
Each instance of the node describes one region at one keyframe. You set the prompt, the rectangle (x, y, width, height), and a keyframe number, and the node appends it to the area_prompts list inside deforum_data. The downstream Iterator interpolates areas across frames (interpolate_areas) and the (deforum) Blend Conditionings node applies them using ComfyUI's area conditioning (ConditioningSetArea) - the same mechanism behind regional prompting in static graphs.
The keyframe part is the animation twist: regions can move over time. Define the spaceship box at frame 0 in one Area Prompt node and at frame 100 in another, and the box glides across the scene as the animation runs.
The inputs that matter
- prompt (multiline STRING, default "Alien landscape") - what to generate inside the region.
- keyframe (INT, 0–8192, default 0) - which frame this region definition applies to. Multiple nodes can target the same keyframe to stack regions.
- x, y (INT) - top-left corner of the region.
- width, height (INT, min 64) - region size. Values are in pixels.
- mode -
default,percentage, orstrength. Inpercentagemode, coordinates are treated as fractions of the frame instead of pixels.strengthmode feeds the value straight into the region's conditioning strength. - strength (FLOAT, 0–10, default 1.0) - how hard the regional prompt pulls. Over 1.0 and the region dominates; below and it's a suggestion.
Output:
- deforum_data - the chain, now carrying the new area prompt.
Installing this pack
Part of Deforum Nodes by XmYx. ComfyUI Manager: search Deforum Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes
Restart, let install.py pull the deforum-studio backend from GitHub plus the scientific-Python stack (numpy < 2.0, Python 3.10 required). No model downloads.
Common issues
- The area prompt does nothing. Area conditioning only applies if the downstream
(deforum) Blend Conditioningsnode is in the graph and receivingdeforum_frame_data. The plain KSampler path won't apply areas - the areas ride in the frame data, not the prompt string. - Regions flicker or jump. If you define a region at only one keyframe, it gets interpolated from nothing - define the same region's position over several keyframes to keep it stable.
- Seams at the region border. Lower
strengthto ~0.7 so the region blends into the surrounding prompt instead of a hard edge. Areas are soft by design, but high strength makes the boundary obvious. - Coordinates confuse you. If the region lands somewhere unexpected, switch
modetopercentage- thinking in fractions of the frame is a lot easier than raw pixels when your resolution changes.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| keyframe | INT | 00–8192 | — |
| mode | COMBO | 3 options: default, percentage, strength | |
| prompt | STRING | Alien landscape | — |
| width | INT | 6464–16384 | — |
| height | INT | 6464–16384 | — |
| x | INT | 00–16384 | — |
| y | INT | 00–16384 | — |
| strength | FLOAT | 1.000–10 | — |
| deforum_dataopt | deforum_data | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| deforum_data | deforum_data | — |