Conditioning (Set Area with Percentage)
Regional prompts that survive a resolution change
- conditioning
- CONDITIONING
Conditioning (Set Area with Percentage) is the regional prompting node for people who get tired of recomputing pixel coordinates. It does what Conditioning Set Area does - assign one prompt to one rectangle of the canvas - but every coordinate is a fraction from 0 to 1 instead of a pixel count. Left edge, right edge, top, bottom: it all scales automatically with your generation resolution.
That's the entire pitch, and it's a good one. Regional prompting is the standing answer to "two characters whose attributes bleed into each other" - the girl on the left keeps her red hair, the one on the right keeps her blue, because each region has its own prompt. The classic Set Area node takes pixel integers, which means every time you change the resolution you recompute the boxes. Percentage makes the region definition resolution-proof: the same 0.5/0.5 split works at 512×512 and 1024×1024 and 832×1216.
How it works
The metadata it writes is an area entry with a "percentage" marker plus the four normalized values and a strength. The sampler scales those fractions against the actual latent at sample time, so the region follows whatever resolution you run. The values are all floats from 0 to 1:
- width / height - the region's size as a fraction of the canvas (both default 1.0 = the whole image).
- x / y - the region's top-left corner as a fraction (both default 0.0).
- strength - 0 to 10, default 1. How hard the prompt pulls inside the region.
One output, CONDITIONING, ready for a ConditioningCombine with its sibling regions.
The pattern that uses it
The standard two-subject graph: encode prompt A → Set Area Percentage (width 0.5, x 0) → encode prompt B → Set Area Percentage (width 0.5, x 0.5) → Combine → KSampler. Because everything is fractional, you can drop the whole graph into a different resolution and the composition holds. That's the real-world win - it's the regional setup you stop thinking about.
Gotchas
- The old overlap trap still applies. Regions overlap → double attention in the overlap → attributes fight. Keep small gaps between fractions, or feather with masks instead.
- It's spatial, not mask-based. Set Area Percentage is rectangles only. If your region is a person's silhouette, you want Conditioning Set Mask, not this. Rectangles for composition, masks for shapes.
- Fractions, not pixels - obvious, but the trap is mixing them. If you wire one branch through Set Area (pixels) and another through Percentage, they don't scale together when the resolution changes. Pick one system per graph.
- Strength ordering. Like its sibling nodes, the last strength write wins. If you chain a strength-changing node after this one, your regional gain gets overwritten.
Ships with ComfyUI core. For anyone doing character-composition work, it's the difference between maintaining a spreadsheet of coordinates and actually making images.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| width | FLOAT | 1.000–1 | — |
| height | FLOAT | 1.000–1 | — |
| x | FLOAT | 0.000–1 | — |
| y | FLOAT | 0.000–1 | — |
| strength | FLOAT | 1.000–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |