Nodes/RES4LYF/ClownRegionalConditioning
ComfyUI Node Runs on cloud

ClownRegionalConditioning

Different prompts for different regions

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
ClownRegionalConditioning
  • cond_regions
  • conditioning
  • mask
  • cond_regions
spinelessfalse
edge_width0

Regional conditioning is how you put "a red car" on the left and "a blue house" on the right in one image without them bleeding into each other. ClownRegionalConditioning is RES4LYF's node for it: you pair a prompt with a mask marking where that prompt applies, and the region joins a COND_REGIONS bundle the sampler reads. Chain several of these and you build up a whole map of zones - the README claims unlimited, with more than ten used in a single image - supported across HiDream, Flux, Chroma, SD3.5, SD1.5, SDXL, AuraFlow, and Wan.

This is the pack's version of the regional-prompting tools people know from other packs, but built into RES4LYF's sampling path rather than bolted on, so it works with the pack's solvers and guides. It's the image-space cousin of the temporal (per-frame) conditioning RES4LYF offers for video.

How it works

Each node takes one piece of conditioning and one mask and attaches them together as a region. You stack them by feeding one node's cond_regions output into the next node's cond_regions input, adding a zone each time. The accumulated bundle goes to a sampler that understands regional conditioning, which then applies each prompt only where its mask says to. Masks can be freehand-drawn or rigid rectangles - whatever you can produce as a MASK.

The inputs and outputs that matter

  • conditioning (optional CONDITIONING) - the prompt for this region, from a CLIP Text Encode.
  • mask (optional MASK) - where that prompt applies. Draw it or generate it; one mask per region.
  • cond_regions (optional COND_REGIONS) - the running bundle from upstream regional nodes. Leave it empty on the first node in the chain, then wire each node's output into the next node's input to add zones.
  • edge_width (INT, default 0) - feathering at the region borders; a little softening blends adjacent zones so seams don't show hard.
  • spineless (BOOLEAN, default false) - a mode toggle for how the region is handled; leave it default unless a workflow you're copying sets it.

The single output is cond_regions (COND_REGIONS) - chain it to the next regional node, and feed the final one into your sampler.

Installing it

ComfyUI Manager: search RES4LYF, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF/
cd RES4LYF
pip install -r requirements.txt

pip install in the venv or portable Python, restart, hard-refresh (F5). No downloads, but you'll want a mask-drawing node or an external mask source.

Where people get tripped up

The most common mess is overlapping or gapped masks. Where two regions overlap, the prompts fight and you get a muddy blend; where masks leave a gap, that area gets no regional guidance and defaults to whatever the base conditioning is. Plan your masks so they tile the frame cleanly, and use edge_width to feather the joins rather than leaving hard seams.

Second, this is model-dependent - it works on the listed architectures, and results vary by how well each model separates concepts. It's also not a substitute for a good base prompt: regional conditioning steers where things go, but a region still needs a coherent prompt to render well. And mind the chain - it's easy to forget to wire one node's cond_regions into the next, which silently drops zones. If a region isn't showing up, check the chain is actually connected end to end before blaming the mask.

CategoryRES4LYF/conditioning

Inputs (5)

NameTypeDefaultDescription
spinelessBOOLEANfalse
edge_widthINT0-10000–10000
cond_regionsoptCOND_REGIONS
conditioningoptCONDITIONING
maskoptMASK

Outputs (1)

NameTypeDescription
cond_regionsCOND_REGIONS