Nodes/ComfyUI/TextEncodeQwenImageEdit
ComfyUI Node Runs on cloud

TextEncodeQwenImageEdit

The Qwen-Image-Edit encoder

By Comfy-Org·Created 4 years ago·Updated 4 minutes ago· 129,910
TextEncodeQwenImageEdit
  • clip
  • vae
  • image
  • CONDITIONING
prompt

Qwen-Image-Edit is the model that killed the "mask + ControlNet + adapter" edit stack for a lot of people - you hand it an image and a sentence and the change just happens. This node is the sentence side of that. Where a normal text-encode node would just embed your prompt, TextEncodeQwenImageEdit is built for instruction editing: it can look at the image you want to change, understand what's in it, and encode your edit instruction in a way the model can actually act on.

The mechanism is a CLIP encode with vision attached. The clip input is Qwen-Image's text encoder; the prompt is your instruction ("turn the sunset into a thunderstorm", "make this character raise their right hand"). If you connect optional image and vae, the node first resizes the image to about a megapixel (the vision model's comfort zone), hands the pixels to the tokenizer so the LLM inside the encoder can see what you're editing, and VAE-encodes a ref_latent that gets appended to the conditioning as a reference. The output is a single CONDITIONING ready for the sampler.

Two inputs beyond clip and prompt, and they're both optional: vae and image. The image is what you're editing; vae encodes it into the latent space the edit model reads. You can skip both and just use it as a text encoder, but then you've bought a fancy CLIP for a plain text-to-image job - the whole point is feeding it the source.

It's core (comfy_extras/nodes_qwen.py), ships with ComfyUI, no install. You need the Qwen-Image-Edit checkpoint and its text encoder via the standard loaders.

The honest caveats, from people who've beaten on this stack since 2509: the model re-emits the whole frame, so pixels you didn't ask to move will drift - the standard fix is bolting a mask back on around it for surgical edits. And on chained edits (edit A, then edit B, then edit C) identity drifts a little each hop; re-supplying the original as the reference image on later steps helps. The TextEncodeQwenImageEditPlus sibling is the one to reach for when you need multiple reference images - this node handles exactly one, and feeding it a batch of images doesn't give you multi-reference behavior, just a confused model.

Categorymodel/conditioning/qwen image

Inputs (4)

NameTypeDefaultDescription
clipCLIP
promptSTRING
vaeoptVAE
imageoptIMAGE

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING