Nodes/comfyui_qwen_image_edit_adv/TextEncodeQwenImageEditPlusAdv
ComfyUI Node

TextEncodeQwenImageEditPlusAdv

Multi-reference Qwen editing

By lenML·Created 12 months ago·Updated 9 months ago· 38
TextEncodeQwenImageEditPlusAdv
  • clip
  • vae
  • image1
  • image2
  • image3
  • CONDITIONING
  • LATENT
prompt

Qwen-Image-Edit picked up multi-image editing in the 2509 revision: it can take one to three input images and reason across all of them. ComfyUI's built-in encoder never really surfaced that cleanly. TextEncodeQwenImageEditPlusAdv is this pack's way in - three explicit image sockets, wired in order, and the model reads them as "Picture 1", "Picture 2", "Picture 3".

This is for prompts that combine references. "Use the composition of Picture 1 and the color scheme of Picture 2." "Merge these two faces." "Put the product from image 1 on the person from image 2." Person+product, person+scene, person+person - the composition jobs that used to take an IP-Adapter and a prayer, now just a sentence and two extra wires.

How it works

From the source: the node collects whatever image1, image2, and image3 are connected, drops the empties, and hands them to the pack's shared base encoder. That base builds a prompt of the form Picture 1: <vision tokens> Picture 2: <vision tokens> User: <your prompt>, wrapped in a system instruction that tells the model to describe each image's key features and then apply your edit. Each image gets VAE-encoded and attached to the conditioning as a reference latent, so the model keeps all three in mind while it edits.

Inputs and outputs

  • clip (required) - from the CLIPLoader (qwen_image type).
  • prompt (required) - the edit instruction, referencing "Picture 1" etc. as needed.
  • vae (optional) - wire it; the LATENT output is empty without it.
  • image1, image2, image3 (optional) - all optional, so "Plus" with one image plugged in is just a wordier standard node.

Outputs: CONDITIONING and LATENT, both into the KSampler. The LATENT carries the concatenated batch of encoded references; the real multi-image signal travels in the conditioning's reference latents.

Install

Standard custom-node install: ComfyUI Manager → Install Custom Nodes → search "comfyui_qwen_image_edit_adv", or clone manually:

cd ComfyUI/custom_nodes
git clone https://github.com/lenML/comfyui_qwen_image_edit_adv

Restart ComfyUI - no dependency dance, the requirements.txt is empty, and the pack ships no weights. The 20B Qwen-Image-Edit model (practically a Q4 GGUF), the Qwen2.5-VL CLIP, and the VAE load through ComfyUI's normal Qwen loaders.

Where people trip

This is not batch generation. Three images in does not mean three outputs; it means one task with three references, and you get one result. The images don't need identical sizes - each is encoded independently - but the model behaves best when they're scaled consistently, so run each through QwenImageEditSimpleScale at 1024 before wiring them in. And multi-image is memory-hungry: three 1024 references on a quantized 20B is a real VRAM commitment. Keep CFG low (1.0–2.5); if the model ignores an image, check your wiring order - the prompt refers to Picture 1/2/3, so connect them in the order you describe them.

CategoryQwenImageEditAdv/conditioning

Inputs (6)

NameTypeDefaultDescription
clipCLIP
promptSTRING
vaeoptVAE
image1optIMAGE
image2optIMAGE
image3optIMAGE

Outputs (2)

NameTypeDescription
CONDITIONINGCONDITIONING
LATENTLATENT