Qwen2.5-VL Text Encoder
The standard encoder for Qwen-Image-Edit
- clip
- text
- template_output
- edit_image
- vae
- inpaint_mask
- conditioning
- debug_output
This is the workhorse encoder for the Qwen-Image-Edit side of the pack. You give it your Qwen2.5-VL encoder, your instruction text, and - for editing - the image you want to change, and it produces the conditioning that drives the sampler. It's the node that turns "change her dress to blue" plus a photo into something Qwen-Image-Edit can act on.
Qwen-Image-Edit is the model that quietly took a huge chunk of work away from masks and adapters: describe an edit in a sentence and it happens, no ControlNet, no IP-Adapter for a lot of jobs. This node is a more configurable front-end to it than the native ComfyUI encoder - it exposes the system prompt, handles multi-image batching, and does the pixel-alignment the model is fussy about.
How it works
The model dual-encodes your edit: the image goes into Qwen2.5-VL for semantic meaning and through the VAE for appearance, while your text rides the chat template as an instruction. This node manages that handoff and, importantly, aligns your image to a 32-pixel grid - Qwen-Image-Edit is sensitive to input resolution, and getting it wrong is the well-known cause of the "offset" problem where edited images come back geometrically shifted and proportions distort. Control the input size and the output matches; that's what the alignment is protecting you from.
The mode selector is the thing that decides what kind of operation you're doing, and it changes how tokens get dropped internally (the pack uses 34 for text, 64 for image_edit) - you mostly just pick the mode that matches your intent.
The inputs and outputs that matter
clip(required) - the Qwen2.5-VL encoder fromQwenVLCLIPLoader.text- your instruction. Plain language: "remove the watermark," "make him lie down on his back." Sentences beat comma-tag soup on this encoder.mode(defaultimage_edit) -text_to_image,image_edit,multi_image_edit, orinpainting. Pick the one that matches what you're doing.edit_image- the picture you're editing (for the edit/inpaint modes).template_output- connect aQwenTemplateBuilderhere to feed a system prompt;system_promptlets you set one inline instead.vaeandinpaint_mask- needed for the inpainting mode.
Outputs: conditioning into your KSampler, and debug_output with full prompt and character-count tracing (flip on debug_mode to populate it richly).
How to install it
ComfyUI Manager: search ComfyUI-QwenImageWanBridge, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/fblissjr/ComfyUI-QwenImageWanBridge
then restart. You need the Qwen2.5-VL-7B encoder (via QwenVLCLIPLoader) and a Qwen-Image-Edit checkpoint - the 20B model is out of reach at bf16 on consumer cards, so most people run a community GGUF plus a Lightning step-reduction LoRA to make it affordable.
Common issues & troubleshooting
Edits come back shifted / proportions look wrong. This is the Qwen-Image-Edit complaint, and it's an input-resolution issue. Let this node's 32px alignment do its job and keep your input at a sane size; don't feed it a weirdly-cropped or oddly-sized image and expect pixel-perfect registration.
Pixels you didn't ask to change moved anyway. Structural to the model - it re-emits the whole frame rather than patching. For pixel-exact preservation, mask the region and use a crop-and-stitch inpaint pattern instead of a full-frame edit.
Prompt weighting / negative embeddings do nothing. Right, they're CLIP-era and the Qwen2.5-VL path never implemented them. Write instruction-shaped sentences; that's what this encoder responds to.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| textopt | * | Your prompt. Also accepts QWEN_TEMPLATE for backward compatibility. | |
| modeopt | COMBO | image_edit | text_to_image: Generate from scratch | image_edit: Single image modify | multi_image_edit: Multiple reference images (DiffSynth pattern) | inpainting: Mask-based editing. Overridden by template_output if connected. |
| template_outputopt | QWEN_TEMPLATE | Template from Template Builder - overrides text/system_prompt/mode when connected | |
| edit_imageopt | IMAGE | Single image or batch. For multiple images, use Image Batch node first. | |
| vaeopt | VAE | Required for image editing - encodes reference latents | |
| inpaint_maskopt | MASK | Inpainting mask for selective editing (use with inpainting mode) | |
| system_promptopt | STRING | System prompt (overridden by template_output if connected) | |
| vae_max_dimensionopt | INT | 2048512–3584 | ⚠️ SINGLE-IMAGE MODE ONLY Ignored when using ImageBatch node. VAE encoder max dimension. Use ImageBatch node for multi-image workflows. |
| debug_modeopt | BOOLEAN | false | Show processing details in console |
| auto_labelopt | BOOLEAN | true | Automatically add 'Picture X:' labels for multiple images (DiffSynth standard) |
| verbose_logopt | BOOLEAN | false | Enable verbose console logging of model forward passes |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| debug_output | STRING | — |