You set up a portrait against a deep red wall and the subject’s skin comes out flushed pink, their white shirt looks rose-tinted, and their hair has a red sheen that wasn’t in any reference. This is “background color bleed”: the model’s cross-attention layers don’t cleanly separate foreground from background in the latent, so high-saturation background colors leak into the subject. It hits hardest with strong primary backgrounds (red, blue, green) and busy patterns.
Fastest fix (works in 60 seconds): send the image to inpaint, mask just the subject, set Inpaint area to Only masked, denoise 0.4, and re-prompt with subject-only words plus a color cast, color spill negative. That re-renders the subject without the wall color in view. If you keep hitting it on every gen, move the fix upstream with BREAK, regional prompting, or a two-stage gen (below).
Which bucket are you in?
| Symptom | Most likely cause | Go to |
|---|---|---|
| One prompt describes subject and background together | Shared attention window | Cause 1 / BREAK |
| Background is a saturated primary (red/blue/green) | Saturation read as global light | Cause 2 / Step 3 |
| One-pass gen, no mask anywhere in the graph | No spatial constraint | Cause 3 / Step 1 or 2 |
| Bleed only appears with a painterly/style LoRA | LoRA enforces a unified palette | Cause 4 |
| Base output clean, refiner output tinted | Refiner averages regions | Cause 5 / Step 4 |
Common causes
Ordered by hit rate, highest first.
1. Single prompt does both subject and background
When the prompt says portrait of a woman against a red brick wall, the words red, woman, and wall all sit in the same attention window. The cross-attention map can’t fully separate “red applies to the wall, not the skin,” so the skin picks up some red. The cheapest in-prompt fix is the BREAK keyword (see Step 0), which resets the context window between the subject clause and the background clause.
How to spot it: one sentence does both subject and background, and the background uses a strong primary color.
2. High-saturation background
A muted gray or beige background almost never bleeds. A pure red, blue, or green wall almost always does. The model treats the saturation as global lighting and applies a tint everywhere.
How to spot it: the background sits at roughly 80%+ saturation and the subject carries a faint matching cast.
3. No segmentation or mask in the pipeline
If you generate in one pass with no subject mask, the model has no spatial constraint. Nothing tells it “this area is subject, that area is background, do not mix their attributes.”
How to spot it: the workflow has no segmentation node, no inpaint, and no regional prompter.
4. Aggressive style LoRA
Some painterly or stylized LoRAs amplify bleed by design. They were trained on artwork where a unified color palette is the goal, so they reinforce the spill.
How to spot it: the same prompt without the LoRA bleeds less; with it, more. Try lowering the LoRA weight to 0.6-0.7 before anything else.
5. Refiner pass mixing colors
The SDXL refiner at high denoise (0.4+) can re-introduce bleed by averaging adjacent regions. Lower it or skip it if bleed is the issue. (On Flux and other single-stage models there is no separate refiner, so skip this cause.)
How to spot it: the base output is clean and the refiner output bleeds.
Shortest path to fix
Step 0: Try BREAK first (10 seconds, no new tools)
Before reaching for extensions, split the prompt with BREAK. It resets the token context window so the subject clause and background clause are encoded separately, then merged. This alone clears mild bleed:
portrait of a woman, natural skin tone, white cotton shirt, clean colors
BREAK
red brick wall, weathered texture, urban background
BREAK works in Automatic1111, Forge, and ComfyUI prompt nodes with no extension. If bleed survives, move to a real spatial method below.
Step 1: Inpaint the subject region with a clean prompt
The most surgical fix, and the fastest one-off:
- Generate the image normally.
- Send it to the Inpaint tab (img2img in A1111/Forge, or an
InpaintModelConditioningnode in ComfyUI). - Mask just the subject (skin + clothes), with Mask blur
8. - Re-prompt with subject-only detail:
clear skin tone, natural complexion, white cotton shirt, no color cast. - Negative prompt:
red tint, pink skin, color cast, ambient color spill. - Denoising strength
0.4(raise toward0.55if the cast is heavy, lower to0.3if you only need a nudge). - Inpaint area:
Only masked(critical —Whole picturelets the wall back into context). - Masked content:
original.
This re-renders only the subject, so the background colors no longer influence it.
Step 2: Use regional prompting from the start
This is the part that changed most. Verify which UI you are on, because the tooling diverged in 2025:
- Automatic1111 / classic WebUI: use the Regional Prompter extension.
- Forge: Regional Prompter no longer works after Forge adopted Flux. Use the built-in Forge Couple instead (set Mode to
Attentionfor SDXL/Pony/Illustrious). - ComfyUI: use an Attention Couple node (Comfy Couple / Enhanced Multi-Region) with one mask per region.
In Regional Prompter, you do not write the split ratio inside the prompt. Regions are separated by BREAK, and the geometry is set in the extension panel:
soft daylight, 35mm film, photograph ADDCOMM
red brick wall, weathered texture, urban background
BREAK
portrait of a woman, natural skin tone, white cotton shirt, clean colors, no color cast from environment
Then in the Regional Prompter panel set:
- Active: on
- Divide mode:
Rows(Vertical) - Divide Ratio:
1,2(top third = background, bottom two-thirds = subject) - Base prompt: off (the
ADDCOMMclause already shares the lighting line to both regions)
Each region gets its own attention budget, so the wall’s red cannot leak into the woman’s skin description. Tip: in ComfyUI’s Attention Couple, keep overlap_factor low (0.10-0.20) so region edges soften without spilling color.
Step 3: Two-stage generation — subject then background
When you need full control:
- Generate the subject against a neutral gray/white background first.
- Cut out the subject with a segmentation tool:
rembg, ComfyUI-RMBG (v3.0.0, the current node as of June 2026 — BiRefNet/SAM2/SAM3 models, text-prompted masks via GroundingDINO), Photoshop Select Subject, or Affinity smart selection. - Generate the background separately.
- Composite in any image editor.
This eliminates bleed completely because the subject was never near the colored background in the latent. A faster all-in-ComfyUI version:
ComfyUI: SAM2/SAM3 (via ComfyUI-RMBG) -> InpaintModelConditioning to swap the background
After-render: rembg cuts subject -> generate bg in img2img with subject pasted on top -> final refiner pass at low denoise 0.15
Step 4: SDXL refiner on the masked area only
If you must use one-pass SDXL generation:
SDXL base: full image at standard denoise
SDXL refiner: ONLY on the subject mask, denoise 0.15-0.2 (not 0.3+)
skip the refiner on the background entirely
This stops the refiner from re-introducing bleed across the masked boundary. (Not applicable to Flux, which has no second-stage refiner.)
How to confirm it’s fixed
- Open the result at 100% zoom and pick a neutral patch (white shirt, sclera of the eye, gray hair). With the eyedropper, the RGB channels should be near-equal (a true white reads roughly
245,245,245, not245,225,225). - Toggle the new gen against the old one. The faint matching cast on skin/whites should be gone, not just dimmer.
- Generate the same seed twice. If the cast comes back, your fix is upstream of where it needs to be — escalate from
BREAK(Step 0) to a real mask (Step 1 or 2).
Prevention
- Default to neutral / desaturated backgrounds for portraits; add the background color in post if needed.
- For high-saturation backgrounds, plan a two-stage workflow with segmentation up front.
- Save a Regional Prompter / Forge Couple preset that splits “background top + subject bottom” (
Divide Ratio 1,2) for environmental portraits. - Add
clean colors, no color cast, isolated subjectto your portrait prompt template, and split the background clause off withBREAK. - Check skin patches at 100% zoom for a cast before final export; the tint hides at small sizes.
FAQ
Does BREAK alone fix this, or do I always need an extension?
For mild bleed against a moderately saturated background, BREAK plus a color cast negative is often enough and needs no extension. For pure-primary walls or precise compositions, you need a spatial method (inpaint mask or regional prompting). Start with BREAK, escalate only if it survives.
My Regional Prompter stopped working after I switched to Forge. Why?
Forge dropped compatibility with the Regional Prompter extension when it adopted the Flux pipeline. Use the built-in Forge Couple instead and set its mode to Attention for SDXL-family models. In ComfyUI, the equivalent is an Attention Couple node.
Why does only a strong color bleed, while gray backgrounds are fine? The model reads high saturation as if it were colored ambient light filling the whole scene, so it tints everything. A desaturated background carries no such “lighting” signal, so there’s nothing to spread.
Inpaint denoise: 0.4 didn’t remove the cast — now what?
Raise denoise toward 0.55, confirm Inpaint area is Only masked (not Whole picture), widen the mask slightly so the cast at the subject’s edge is inside it, and add the offending color to the negative (red tint, red spill). If it still returns on a fixed seed, the cause is upstream — switch to two-stage generation (Step 3).
Does this happen on Flux and Midjourney too, or only Stable Diffusion / SDXL? It happens on any diffusion model, including Flux and Midjourney, because the cause is shared cross-attention, not a specific architecture. The masked-inpaint fix (Step 1) and two-stage gen (Step 3) work everywhere. The refiner-specific advice (Step 4) is SDXL-only; Flux and Midjourney have no separate refiner stage.