Nodes/RES4LYF/ClownRegionalConditioning_AB
ComfyUI Node Runs on cloud

ClownRegionalConditioning_AB

Two prompts, two masked regions, one image

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
ClownRegionalConditioning_AB
  • conditioning_A
  • conditioning_B
  • mask_A
  • mask_B
  • weights
  • region_bleeds
  • conditioning
weight1.00
region_bleed0.00
region_bleed_start_step0
weight_schedulerconstant
start_step0
end_step-1
mask_typeboolean
edge_width0
invert_maskfalse

Regional prompting is the "put this thing on the left, that thing on the right" feature. You draw a mask for each area, give each area its own prompt, and the model paints them separately in one pass instead of blending everything into mush. This is RES4LYF's two-region version: prompt A goes where mask A is, prompt B goes where mask B is. Clean split, two zones.

RES4LYF's regional system is one of its headline features - the author advertises "unlimited zones" (over ten in a single image) across HiDream, Flux, Chroma, SD3.5, SD1.5, SDXL, AuraFlow, and Wan. The AB node is the friendly entry point: if you just need a left/right or subject/background split, you don't want the full unlimited-zones machinery, you want this.

How it works

You encode two prompts into CONDITIONING and draw two MASKs. The node fuses them into a single combined CONDITIONING output, tagged so the sampler applies prompt A inside mask A and prompt B inside mask B. That output wires into your sampler's positive conditioning input like any normal conditioning - the regional magic is baked in.

The catch worth knowing: this works through RES4LYF's own sampling path, so it's meant to be used with the pack's samplers, not dropped onto a stock KSampler and expected to behave.

The inputs that matter

  • conditioning_A + mask_A, conditioning_B + mask_B - the two prompt/region pairs. This is the core wiring.
  • weight (default 1) - how strongly the regional conditioning is imposed. 1.0 is full strength; back it off if the regions look too forcibly separated.
  • mask_type (default boolean) - boolean gives hard-edged regions; the gradient options blend between zones. Boolean for crisp boundaries, gradient for soft transitions.
  • region_bleed (default 0) - how much the prompts are allowed to leak across their borders. Zero keeps them separate; a little bleed can help two regions feel like one coherent scene rather than a collage.
  • edge_width (default 0) - feathering at the mask boundary to soften the seam.

start_step / end_step, weight_scheduler, and invert_mask give you finer control over when and how the regional effect applies; the optional weights / region_bleeds (SIGMAS) let you schedule those over steps. The single output is conditioning (CONDITIONING).

Installing RES4LYF

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

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

Portable users use the embedded pip under python_embedded/Scripts/. Restart, hard-refresh with F5. No models to download - but your base model must be one of the supported families (Flux, Chroma, SD3.5, SDXL, HiDream, AuraFlow, Wan).

Common issues

The regions bled into each other. Raise the separation: set region_bleed to 0 and use boolean mask_type. If prompts are still leaking, your masks probably overlap - check them.

Hard seams between zones. The opposite fix: switch to a gradient mask_type and add some edge_width to feather the boundary, and allow a little region_bleed so the scene reads as unified.

It did nothing on my KSampler. Regional conditioning here is tied to RES4LYF's sampling. Run it through the pack's sampler, not a stock one.

Wrong region got the prompt. Flip invert_mask, or double-check which mask you wired to A vs B - it's an easy swap to make.

CategoryRES4LYF/conditioning

Inputs (15)

NameTypeDefaultDescription
weightFLOAT1.00-10000–10000
region_bleedFLOAT0.00-10000–10000
region_bleed_start_stepINT00–10000
weight_schedulerCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
start_stepINT00–10000
end_stepINT-1-1–10000
mask_typeCOMBOboolean6 options: gradient, gradient_A, gradient_B, boolean, boolean_A, boolean_B
edge_widthINT00–10000
invert_maskBOOLEANfalse
conditioning_AoptCONDITIONING
conditioning_BoptCONDITIONING
mask_AoptMASK
mask_BoptMASK
weightsoptSIGMAS
region_bleedsoptSIGMAS

Outputs (1)

NameTypeDescription
conditioningCONDITIONING