MultiAreaConditioning
MultiAreaConditioning replaces a pile of ConditioningSetArea nodes
- conditioning0
- conditioning1
- CONDITIONING
- resolutionX
- resolutionY
Want to put "a red car" on the left side of the frame and "a brick wall" on the right, without them bleeding into each other? That's regional conditioning, and in stock ComfyUI it means one ConditioningSetArea node per region - each with its own x/y/width/height, all merged through ConditioningCombine into the sampler. Fine for two regions. Brutal for five.
MultiAreaConditioning collapses that whole spaghetti into a single node with a canvas on it. You type in a canvas size, add one conditioning input per region, and the node draws each region's rectangle on the node body so you can see exactly where every prompt lives and how the areas overlap. It's the flagship of Davemane42's small pack, and honestly it's the reason most people find the pack at all.
How it works
Every conditioning in ComfyUI is a list of (text_encoding, {area, strength, ...}) tuples. When a conditioning carries an area key, the sampler only applies that prompt inside that rectangle, in latent space. The stock ConditioningSetArea node exists purely to write that area key - one rect per node.
MultiAreaConditioning writes the same keys, just in bulk. The JS front end stores each input's [x, y, width, height, strength] in the node's properties, and the Python side reads those back from the workflow metadata, clamps them to the canvas bounds, divides by 8 (the VAE's downscale factor, so pixel coords become latent coords), and tags every conditioning entry with area, strength, plus full-range min_sigma/max_sigma. A region that covers the entire canvas is passed through untouched as a fullscreen conditioning, which is how you mix a global prompt with local ones. The conditioning0 and conditioning1 inputs are there from the start; the right-click menu adds, swaps, and removes more layers, and the color-coded zones update live on the node body. Select a region and it even highlights the node upstream that feeds that input.
The inputs and outputs that matter
conditioning0/conditioning1- CONDITIONING. Each one is a region. Wire a separate text encoder + prompt into each (or a shared positive conditioning) and give every region its own rectangle and strength.- Output
CONDITIONING- the combined list of all region conditionings. Goes straight into a KSampler'spositiveinput. - Output
resolutionX/resolutionY- the canvas dimensions as INTs. This is the neat part: wire them into anEmptyLatentImageand the latent you sample always matches the canvas you drew on. Get these wrong and your regions silently drift out of frame.
Per-region widgets on the node: x, y, width, height, and strength (0–10). Strength below 1 softens a region; start there rather than cranking it.
Installing it
Search "ComfyUI_Dave_CustomNode" in ComfyUI Manager and hit install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Davemane42/ComfyUI_Dave_CustomNode
Restart ComfyUI. That's it - no model files, no pip requirements. The __init__.py auto-copies the front-end JS into web/extensions/Davemane42 on startup, which is why it needs that restart. You get all four nodes in the pack at once: MultiLatentComposite, ConditioningUpscale, and ConditioningStretch ride along.
Where people get burned
Regional conditioning is an SD 1.5-era trick, and it shows. Expect soft seams and occasional anatomical weirdness where regions overlap - a common complaint on the r/comfyui threads about this exact node. Two guardrails: keep region strengths modest (0.8–1.2) and leave breathing room between rectangles. Also be aware this is a small, old, barely-maintained pack - last touched around 2024 - and the custom canvas UI is fragile on current ComfyUI builds; some people report the node's text overlapping the drawn regions. It still works for most people, but it's not a node you should build a mission-critical workflow around without testing first.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning0 | CONDITIONING | — | |
| conditioning1 | CONDITIONING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |
| resolutionX | INT | — |
| resolutionY | INT | — |