Eric Qwen-Edit Composite Unify
Make a pasted-together collage read as one photograph
- pipeline
- composite_image
- composer_layers
- seam_mask
- foreground_mask
- manual_mask
- segment_1
- segment_2
- segment_3
- segment_4
- segment_5
- image
- used_mask
Compositing is the easy part; making the composite look real is the hard part. You've cut a subject out, dropped it onto a new background, and now the lighting doesn't match, the shadow's missing, and the seam is visible to anyone looking. Eric Qwen-Edit Composite Unify is the "fix it so it looks shot in one go" node - it runs a single Qwen-Image-Edit pass over the composite and lets the model relight, re-shadow, and re-blend the whole image into something coherent.
It's built to sit directly downstream of ImageComposer from the author's companion pack (Eric_Composer_Studio), which is why it accepts a COMPOSER_LAYERS bundle plus seam_mask / foreground_mask inputs. But it works fine with a plain pasted image from any source - you just lose the smart masking.
The three modes, and which one to actually use
harmonize_only(default, and the README and source both say RECOMMENDED) - sends only the composite to Qwen-Edit with a baked-in harmonization prompt. No segments, no masks, no post-compositing. The model relights the entire image coherently. Start here, always.whole- same as harmonize_only but also forwards your original segments (or the relayed composer layers) as extra VL/ref images. The theory is that it keeps each subject's identity straight; the practice is that segments shot under different lighting fight the harmonization. Only switch to this if a subject's identity is being lost.seam_inpaint- the advanced one. Qwen runs on the full composite, then the result is composited back over the original through a feathered mask so untouched regions stay pixel-identical. This is the answer when you need the pixels outside the edit to not move (Qwen-Edit re-emits the whole frame, so harmonize_only shifts everything a little). It needs well-aligned masks; the author's own words are that misaligned masks produce "dissolved subjects or halos."
The inputs you'll touch
composite_image(required) - the collage to fix.mode- the dropdown above.user_prompt/prompt_mode- optional extra instruction.appendtacks your words onto the baked preamble;replacelets you throw the preamble away and write your own.composer_layersand the mask inputs (seam_mask,foreground_mask,manual_mask) - only relevant forseam_inpaint, and mostly only if you came from ImageComposer.manual_maskoverrides everything else if you'd rather hand-paint the region.seam_dilate_px,subject_protect,ground_contact_px,seam_feather_px- seam shaping forseam_inpaint.subject_protect(default True) keeps the seam band outside each subject's silhouette so subject pixels stay identical;ground_contact_px(48) extends a strip below subjects so the model can paint cast shadows and ground contact. Leave these alone until the default results bug you.steps/true_cfg_scale/seed/max_mp- shared controls. Note the tooltip's advice: keeptrue_cfg_scalelow (2.5-3.0) for harmonization, because high CFG over-applies the prompt and can make Qwen delete out-of-place subjects.
Outputs are image and used_mask (the mask the node actually used, which is handy for debugging seam_inpaint).
Realistic expectations
This is a fix-up pass over a model that re-emits whole frames, so it's not a magic "un-paste" button - for surgical seam repair where nothing else may move, seam_inpaint is the mode, and for everything else harmonize_only beats it on speed and cleanliness. It's also the wrong tool if your composite is fundamentally broken (subject lighting from outer space); the model harmonizes, it doesn't resurrect. Install: ComfyUI Manager search "Eric Qwen Edit", or git clone https://github.com/EricRollei/Eric_Qwen_Edit_Experiments into custom_nodes/, with the Qwen-Image-Edit model loaded by Eric Qwen-Edit Loader upstream.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | QWEN_EDIT_PIPELINE | — | |
| composite_image | IMAGE | Composite from ImageComposer (or any other source). This is sent to Qwen-Edit as the main reference image. | |
| mode | COMBO | harmonize_only | harmonize_only (RECOMMENDED): send ONLY the composite to Qwen-Edit. No segments, no masks, no post-compositing. Cleanest path — the model relights the whole image coherently. Try this first. whole: same as harmonize_only but ALSO forwards segments / Composer layers as extra VL/ref images. Can fight harmonisation; use only if a subject's identity is being lost. seam_inpaint: ADVANCED. Generates with Qwen, then post-composites via a feathered mask so untouched regions stay pixel-identical. Requires well-aligned foreground/seam masks; otherwise produces dissolved subjects or halos. |
| user_prompt | STRING | Optional extra instruction. If empty, the baked harmonisation prompt is used as-is. | |
| prompt_mode | COMBO | append | append: user_prompt is appended to the baked harmonise preamble. replace: user_prompt fully replaces the baked preamble (advanced). |
| composer_layersopt | COMPOSER_LAYERS | Bundle from ImageComposer's composer_layers output. Contains occlusion-baked, tightly-cropped, neutral-filled per-layer crops with visibility metadata. When connected, REPLACES the manual segment_1..5 inputs. | |
| layer_visibility_thresholdopt | FLOAT | 0.080–1 | Drop relayed layers whose visible footprint is below this fraction of their own area (default 8%). Avoids feeding heavily-occluded slivers. |
| layer_max_countopt | INT | 40–5 | Cap on relayed layers (Qwen-Edit handles up to ~4-5 images including the composite). Lowest-visibility layers are dropped first. 0 = ignore the bundle. |
| seam_maskopt | MASK | Seam mask from ImageComposer (silhouette borders of each layer). Used as the base for seam_inpaint mode. If absent, a fallback edge band is derived from foreground_mask. | |
| foreground_maskopt | MASK | Combined foreground mask from ImageComposer. Used for ground-contact extension (strip below subjects) and as fallback if seam_mask is absent. | |
| manual_maskopt | MASK | Optional manual mask. If provided, OVERRIDES seam_mask + auto extensions (use this to constrain edits to a hand-painted region). | |
| seam_dilate_pxopt | INT | 160–256 | Outward growth of the seam band in pixels. Larger = wider halo of surrounding pixels gets harmonised. With subject_protect ON this band lives entirely OUTSIDE each subject — subject pixels are preserved. |
| subject_protectopt | BOOLEAN | true | ON (recommended): seam band lives entirely outside each subject's silhouette — subject edges and interior stay pixel-identical to the composite. OFF: seam straddles the silhouette (more aggressive harmonisation but can blur / halo subject edges). Requires foreground_mask to take effect. |
| subject_edge_blend_pxopt | INT | 10–16 | With subject_protect ON, allow this many pixels of soft blending INSIDE the subject silhouette so the join doesn't look stamped. 0 = perfectly hard edge. 1–2 px is invisible but smoother. |
| ground_contact_pxopt | INT | 480–512 | Vertical strip extended DOWN from foreground silhouettes so the model can paint cast/contact shadows and ground/water interaction. 0 disables. |
| seam_feather_pxopt | INT | 160–128 | Final Gaussian feather of the seam mask for smooth blend back into the composite. |
| segment_1opt | IMAGE | Optional original segment (Picture 2). VL-only by default. | |
| segment_2opt | IMAGE | Optional original segment (Picture 3). | |
| segment_3opt | IMAGE | Optional original segment (Picture 4). | |
| segment_4opt | IMAGE | Optional original segment (Picture 5). | |
| segment_5opt | IMAGE | Optional original segment (Picture 6). | |
| vl_segmentsopt | BOOLEAN | true | Send segments through the VL/semantic path so the model keeps each subject's identity straight. |
| ref_segmentsopt | BOOLEAN | false | Send segments through the VAE/ref pixel path. Default OFF — segments at DIFFERENT lighting can fight harmonisation. Enable only if a subject's identity is being lost. |
| negative_promptopt | STRING | What to avoid (e.g. 'plastic look, oversharpened, mismatched lighting'). | |
| stepsopt | INT | 81–100 | Inference steps (8 for lightning LoRA, ~30-50 for base model). |
| true_cfg_scaleopt | FLOAT | 3.01–20 | True CFG scale. Lower (2.5–3.0) is better for harmonisation — high CFG over-applies the prompt and can cause Qwen to delete out-of-place subjects (statues, small animals). |
| seedopt | INT | 00–18446744073709550000 | Random seed. |
| max_mpopt | FLOAT | 8.00.5–17 | Max output megapixels (Qwen-Edit can run up to ~17 MP at high VRAM). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| used_mask | MASK | — |