Nodes/Eric Qwen-Edit & Qwen-Image Nodes/Eric Qwen-Edit Inpaint Transfer
ComfyUI Node

Eric Qwen-Edit Inpaint Transfer

Paste something from one image into another, and let Qwen-Edit make it look like it always belonged

By EricRollei·Created 6 months ago·Updated 4 months ago· 20
Eric Qwen-Edit Inpaint Transfer
  • pipeline
  • image
  • mask
  • transfer_image
  • transfer_mask
  • image
prompt
negative_prompt
transfer_vl_reftrue
blend_strength1.00
feather8
steps8
true_cfg_scale4.0
seed0
max_mp8.0

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)

  1. Scale the transfer image (and optional transfer mask) proportionally so the source region fits inside the target mask's bounding box.
  2. Pre-composite the transfer into the masked area - the model sees the content already in place, not a hole.
  3. The model harmonizes lighting, color, and edges via the prompt.
  4. 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_ref is on so the model sees the source.
  • Wrong part of the transfer got moved - add a transfer_mask to 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 lower blend_strength slightly so the composite doesn't fight the original edge.
CategoryEric Qwen-Edit

Inputs (14)

NameTypeDefaultDescription
pipelineQWEN_EDIT_PIPELINE
imageIMAGEOriginal image to edit
maskMASKMask: white = area to fill with transfer content, black = keep original
transfer_imageIMAGEReference/transfer image whose content will be blended into the masked area of the original.
transfer_maskoptMASKOptional 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.
promptoptSTRINGOptional 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_promptoptSTRINGWhat to avoid
transfer_vl_refoptBOOLEANtrueAlso 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_strengthoptFLOAT1.000–1Blend 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).
featheroptINT80–50Gaussian blur radius for mask-edge feathering. Higher = softer blend at mask edges. 0 = hard cut.
stepsoptINT81–100Inference steps (8 for lightning LoRA, 50 for base model)
true_cfg_scaleoptFLOAT4.01–20True CFG scale
seedoptINT00–18446744073709550000Random seed
max_mpoptFLOAT8.00.5–16Max output megapixels.

Outputs (1)

NameTypeDescription
imageIMAGE