Eric Qwen-Edit Inpaint Transfer
Paste something from one image into another, and let Qwen-Edit make it look like it always belonged
- pipeline
- image
- mask
- transfer_image
- transfer_mask
- image
The most "oh, that's clever" node in the pack. Eric Qwen-Edit Inpaint Transfer moves content from a reference image into a masked region of another image - you want that jacket from photo B on the person in photo A, or that car dropped into a different street - and it's built to make the result look placed, not pasted.
A naive version of this is just cut-and-paste with a soft edge, which always looks composited because the lighting, color, and perspective never match. This node's trick is to let the model fix that: it composites the transfer content in first, then runs Qwen-Edit over the region with a prompt telling it to harmonize, then composites again with a feathered mask to protect the original outside the mask.
The strategy (from the README)
- Scale the transfer image (and optional transfer mask) proportionally so the source region fits inside the target mask's bounding box.
- Pre-composite the transfer into the masked area - the model sees the content already in place, not a hole.
- The model harmonizes lighting, color, and edges via the prompt.
- Post-composite with a feathered mask to keep the original pixels outside the mask untouched.
That pre-composite step is the clever bit. Because Qwen-Edit sees content already sitting in the region, it doesn't have to hallucinate what belongs there - it just has to make it blend.
Inputs that matter
image- the target.mask- white = where the transfer content goes, black = keep original.transfer_image- the reference whose content you're moving in.transfer_mask- optional, and underrated: mark which part of the transfer image to use (white = keep). When omitted, the full transfer image is used. Provide it when the reference has background you don't want to drag along.prompt- optional guidance. Empty = a default prompt that tells the model to harmonize the inserted content. Add detail to steer the blend ("match the warm window light").transfer_vl_ref- when on, the full un-cropped transfer image also goes in as a second VL semantic reference, giving the model extra context. Disable if the pre-composite alone is enough.blend_strength- 1.0 fully replaces the masked area with generated content; lower mixes in some original for subtle blends.feather- post-composite edge softness (0–50, default 8).steps,true_cfg_scale,seed,max_mp- the standard edit knobs.
Output: one image.
Wiring it
Loader → Apply LoRA → Inpaint Transfer(image, mask, transfer_image) → Preview/Save
Installing it
ComfyUI Manager → "Eric Qwen-Edit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Eric_Qwen_Edit_Experiments.git
Restart, download Qwen/Qwen-Image-Edit-2511 (~54 GB), load via the pack's loader. Dependencies pinned by the pack's requirements: diffusers>=0.34,<0.38, transformers>=4.50,<5.
Troubleshooting
- The transfer looks pasted, not lit - give the model context in the prompt ("harmonise the pasted element with its surroundings" is the pack's own example), and make sure
transfer_vl_refis on so the model sees the source. - Wrong part of the transfer got moved - add a
transfer_maskto select exactly the region you want; without it, the whole reference comes along. - Region too small for the content - the node scales the transfer to fit the target mask bounding box, but a wildly mismatched aspect ratio means heavy cropping. Resize the mask or pick a closer crop of the transfer.
- Seams at the boundary - raise
feather(8 → 12–16) and lowerblend_strengthslightly so the composite doesn't fight the original edge.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | QWEN_EDIT_PIPELINE | — | |
| image | IMAGE | Original image to edit | |
| mask | MASK | Mask: white = area to fill with transfer content, black = keep original | |
| transfer_image | IMAGE | Reference/transfer image whose content will be blended into the masked area of the original. | |
| transfer_maskopt | MASK | Optional mask on the transfer image: white = region to extract. When provided, only the selected part of the transfer image is used. When omitted, the full transfer image is used. | |
| promptopt | STRING | Optional guidance text. If empty, a default prompt is used that tells the model to harmonise the inserted content. Add detail to steer the blend. | |
| negative_promptopt | STRING | What to avoid | |
| transfer_vl_refopt | BOOLEAN | true | Also send the full (un-cropped) transfer image as a second VL reference. Gives the model extra semantic context about the transfer content. Disable if the pre-composite alone is sufficient. |
| blend_strengthopt | FLOAT | 1.000–1 | Blend strength for the post-compositing. 1.0 = fully replace masked area with generated content. Lower values mix in some of the original (useful for subtle blends). |
| featheropt | INT | 80–50 | Gaussian blur radius for mask-edge feathering. Higher = softer blend at mask edges. 0 = hard cut. |
| stepsopt | INT | 81–100 | Inference steps (8 for lightning LoRA, 50 for base model) |
| true_cfg_scaleopt | FLOAT | 4.01–20 | True CFG scale |
| seedopt | INT | 00–18446744073709550000 | Random seed |
| max_mpopt | FLOAT | 8.00.5–16 | Max output megapixels. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |