Nodes/AQnodes for ComfyUI/AQ_TextEncodeQwenImageEditPlus
ComfyUI Node

AQ_TextEncodeQwenImageEditPlus

The Qwen-Image-Edit text encoder, now with three reference images and a dozen prompt templates

By 2frames·Created about a year ago·Updated 6 months ago· 1
AQ_TextEncodeQwenImageEditPlus
  • clip
  • vae
  • image1
  • image2
  • image3
  • CONDITIONING
prompt
use_image1true
use_image2true
use_image3true
prompt_templateoriginal

If you've been editing images with text instructions lately, you know the drill: give Qwen-Image-Edit a picture and a sentence - "change the shirt to red," "remove the watermark" - and the model re-emits the frame to match. It's the open, Apache-2.0 editor that took the job away from masks-plus-ControlNet-plus-IP-Adapter, and it won the category over Flux Kontext on licensing rather than raw quality. ComfyUI got native Qwen-Image-Edit text encoding in core around mid-2025, so you can do this without this pack. What AQ_TextEncodeQwenImageEditPlus adds is headroom: up to three reference images instead of one, and fourteen canned prompt templates that change how the model behaves on every edit.

That's the "Plus" in the name, and honestly it's the interesting part. The core node gives you one image and one framing. This one gives you image1, image2, image3 with independent on/off switches, plus a prompt_template dropdown that swaps the entire system prompt underneath the edit.

How it works

Under the hood it's the same native mechanism ComfyUI uses for Qwen-Image-Edit, just pushed wider. For every enabled input image the node:

  1. downsizes it to roughly 384×384 for the vision tokens (the model "sees" the reference),
  2. if you wired a VAE, VAE-encodes a ~1-megapixel version into a reference_latent,
  3. builds an image prompt with the vision placeholders (<|vision_start|><|image_pad|><|vision_end|>),
  4. tokenizes with the selected chat template and encodes to CONDITIONING,
  5. attaches all the reference_latents onto that conditioning.

The reference latents are what actually carry the pixels into the diffusion model - without a VAE connected, you lose that half of the conditioning and edits degrade badly. So yes, wire the VAE.

The prompt_template dropdown is where the node earns its keep. Each entry is a full system prompt shipped in the code, and a few are genuinely different tools:

  • original - the default balanced "describe, then modify" framing.
  • precise_surgical - "make ONLY the specific change, nothing more." The one to use for minimal edits where the rest of the frame should hold still (and the honest Qwen-Image-Edit limitation is that nothing truly pins unedited pixels, so even here faces can drift across a chain of edits).
  • multi_image_blend - for blending several reference images into one coherent result instead of a collage.
  • view_angle_control - re-render the scene from a different camera angle while keeping objects in their 3D positions.
  • style_transfer, scene_reimagining, playful, descriptive, technical… - progressively specific framings for those jobs.

Some of these overlap heavily (there are four or five "describe the image and follow the instruction" variants in slightly different words). Don't overthink the full list; original, precise_surgical, multi_image_blend, and view_angle_control are the ones with real personality.

Inputs and output

Required: clip (the Qwen-Image-Edit CLIP from a Qwen loader node), prompt (multiline - your instruction), use_image1/2/3 (booleans that let you leave an image slot connected but disable it), and prompt_template. Optional: vae, image1, image2, image3. Output: one CONDITIONING, wired into the KSampler's positive input.

One more thing, grounded in how these models actually work: Qwen-Image-Edit is guidance-distilled, so negative prompts are largely inert - not weak, dead. Use this node for the positive conditioning and don't bother building a negative version of the prompt.

Installing and what it costs

cd ComfyUI/custom_nodes
git clone https://github.com/2frames/ComfyUI-AQnodes

restart, or use ComfyUI Manager and search "AQnodes". Real requirements: a recent ComfyUI (native Qwen-Image-Edit support is what this node leans on - the source calls clip.tokenize(..., llama_template=...) and sets reference_latents via ComfyUI's conditioning_set_values), plus the Qwen-Image-Edit checkpoint and its VAE. That's a 20B model - roughly 40 GB at fp16, or a big GGUF-quantized download if you want it smaller. The pack's README notes Qwen models download automatically on first use, so budget the disk and a patient first run.

Gotchas

  • Missing VAE → conditioning without reference latents → weak, garbled edits. Check that connection first.
  • This node encodes conditioning; it doesn't load the model. You still need a Qwen loader and a compatible checkpoint wired to clip.
  • use_image2/use_image3 default to true, so if a slot has a stale image connected it will be used. Toggle it off when you only want one reference.
  • Three 20B-scale reference encodings is a heavier prompt than you're used to - expect slower queue times than a plain SDXL encode.
Categoryadvanced/conditioning

Inputs (10)

NameTypeDefaultDescription
clipCLIP
promptSTRING
use_image1BOOLEANtrue
use_image2BOOLEANtrue
use_image3BOOLEANtrue
prompt_templateCOMBOoriginal14 options: original, detailed, transformation_focused, preserving, creative, technical, +8
vaeoptVAE
image1optIMAGE
image2optIMAGE
image3optIMAGE

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING