🔡 QwenEdit TextEncoder
The dedicated text encoder for Qwen-Image-Edit workflows
- clip
- image
- vae
- mask
- conditioning
- width
- height
- latent
Qwen-Image-Edit doesn't just take a prompt and generate - it takes an instruction about an image and re-emits the whole frame with that instruction applied. That means its text encoding step needs to know about the reference image too, not just the words. This node is the pack's purpose-built encoder for that: instead of a plain CLIP Text Encode, it wires the prompt, the reference image, and (optionally) a mask together into the conditioning Qwen-Image-Edit actually expects, and it hands back a properly sized latent to match.
Why a regular text encoder doesn't cut it here
Qwen-Image-Edit's architecture dual-encodes the input image - once through its vision-language model for semantic understanding of what's in the picture, and once through the VAE for pixel-level detail - and both feed the conditioning alongside your text. A generic text-only encoder has no path for any of that; it can only turn words into vectors, with no awareness that there's a source image the model is supposed to edit rather than ignore. This node exists specifically to wire that image-aware conditioning together, which is also why it's a distinct node in this pack rather than an option flag on the regular CLIP Text Encode.
The model is genuinely good at instruction-following edits - object removal, recoloring, relighting, re-posing - the kind of thing that used to need a mask plus a ControlNet plus an adapter stacked together. Its one honest limitation, which its own community says loudly: because it re-emits the entire frame rather than editing a masked region, pixels you didn't ask about can drift, especially across a chain of several edits in a row. The standard workaround is bolting a mask back on around the edit region - which is exactly what the optional mask input here is for.
The inputs and outputs that matter
prompt- the edit instruction in plain language ("remove the sign in the background," "make the jacket red").clip- the CLIP/text model input, same as any text encoder.image(optional) - the reference image to edit.img_size- a target size cap (0–4096, default 0 meaning no resize) applied to the reference image before encoding.mask(optional) - constrain the edit to a region, the standard fix for frame-wide drift on anything beyond a simple one-shot edit.vae(optional) - needed if you want thelatentoutput actually populated from the image.translate- auto-translate the prompt from any of over a hundred languages.seed- for reproducibility.
Four outputs: conditioning (feed this into your KSampler), width / height (the resolved dimensions after any resize), and latent (a properly sized empty or image-derived latent, ready for the sampler - no separate Empty Latent Image node needed).
Installing it
ComfyUI Manager: search SDVN_Comfy_node, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
Then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root, and restart. You'll separately need the Qwen-Image-Edit checkpoint and its own CLIP/text encoder weights loaded - this node encodes the conditioning, it doesn't ship the model itself.
Where people get burned
Multi-step edit chains drift. Run the output of one edit back through as the input to another a few times and unrelated parts of the image start shifting - a known, structural limitation of how this model works, not something this node can prevent. Use the mask input to pin down what shouldn't change once you're past a single edit.
No vae means no usable latent. If you leave vae unwired, you'll still get conditioning, width, and height, but the latent output won't reflect your actual reference image - wire the VAE if you want img2img-style editing rather than a fresh generation guided only by text.
This is not the multi-image node. If you need to combine two or three reference images in one edit, use the pack's QwenEdit TextEncoder Plus instead - this one takes a single image input.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Prompt mô tả nội dung bạn muốn sinh ra. | |
| img_size | INT | 00–4096 | — |
| translate | COMBO | Ngôn ngữ dịch prompt. | |
| seed | INT | 00–18446744073709550000 | Seed ngẫu nhiên cho prompt. |
| clip | CLIP | Mô hình CLIP dùng để mã hóa prompt. | |
| imageopt | IMAGE | Ảnh đầu vào để mã hóa, nếu có. | |
| vaeopt | VAE | — | |
| maskopt | MASK | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| width | INT | — |
| height | INT | — |
| latent | LATENT | — |