Nodes/ComfyUI Smart Model Loader/Text Encode Qwen Image 2.1
ComfyUI Node

Text Encode Qwen Image 2.1

Text Encode Qwen Image 2.1 has no prompt box, and that's the point

By r-vage·Created about a month ago·Updated about 19 hours ago· 3
Text Encode Qwen Image 2.1
  • clip
  • vae
  • image_1
  • images
  • positive
  • negative
  • latent
positive
negative
resolution1024

You drag the node out, and it's broken. There's no text field. Just two empty sockets labelled positive and negative staring at you, and nothing to type in.

That's not a bug. In this pack both prompts are STRING sockets on purpose, so a prompt can come from anywhere - a Primitive node, a string output, a text node upstream - instead of being retyped on every encoder in the graph. Wire something into each one and it runs. An empty string is legal, so a lone Primitive set to "" is a perfectly good negative.

What it actually is

It's ComfyUI's own Qwen Image 2.1 conditioning, wearing this pack's clothes. Under the hood the node imports comfy_extras.nodes_qwen.TextEncodeQwenImage21 and hands your settings straight to it. The output is identical to the built-in node with the same name. What you get by using this one is placement in the Smart Model Loader → Conditioning menu, a fixed socket order, and a schema the pack keeps stable across versions so saved workflows keep loading.

Worth knowing why you'd want Qwen Image 2.1 at all: Qwen-Image is where open instruction editing landed, and it's been the default since the Edit line beat Flux Kontext on licensing rather than prettiness. 2511 was the open editor for most of 2026 precisely because 2.0 launched API-only with no weights. 2.1 is the open successor, and it's new enough that half the guides you'll find still assume 2511.

How the encoding works

A Qwen Image model is LLM-encoded, so the usual rules change. Write sentences, not tag soup. masterpiece, best quality does nothing here, prompt weighting is passed through as literal punctuation, and there's no CLIP skip to tune. Your prompt goes into a Qwen3-VL-8B vision-language encoder, which is exactly why this node can accept reference images at all - a plain text LLM couldn't look at them.

Each connected reference is handled twice. Only the first frame of a batch counts (image[:1]). It gets resized toward roughly resolution × resolution pixels with the aspect ratio preserved and both sides rounded to multiples of 32 - or left alone at resolution = 0 (still rounded to 32, minimum 32 an axis). The RGB, with any alpha composited over white, goes to the vision tower. If a VAE is connected, the full RGBA image is encoded separately and appended to both conditionings as reference_latents. That's the split that lets the model do appearance edits and semantic edits from one picture, and it's the same dual-encoding idea the Edit line is built on.

The output latent is 64-channel at 16× compression, sized from the first reference's resized dimensions. The author's tooltip is blunt about why it's handed to you: feed the sampler this latent, because any other size shifts the edit.

The inputs that matter

Required: clip - your external Qwen3-VL-8B encoder, loaded with the existing qwen_image CLIP type, no separate 2.1 type exists. vae - a Qwen Image 2.1 RGBA VAE. This pack makes the socket required where the upstream node leaves it optional, so wire a VAE even for a reference-free text-to-image pass; it goes unused without references, but the socket still wants something. positive and negative - the string sockets above. resolution - the resize target for references.

Optional: image_1, plus an autogrow images group that grows from a second socket up to image_16. References are read in numeric socket order, first image of each batch. The fixed image_1 is deliberate - autogrow's prefix matching confuses image_1 with image_10 through image_16 when restoring a saved workflow.

Outputs: positive and negative CONDITIONING into your sampler's positive/negative, and latent into the sampler directly.

Install

ComfyUI Manager, search ComfyUI Smart Model Loader, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_SmartModelLoader.git
cd ComfyUI_SmartModelLoader
python -m pip install -r requirements.txt

That pulls torch, numpy, safetensors, requests, aiohttp, huggingface_hub, gguf, tqdm and einops. Nunchaku is optional and this node doesn't need it. You'll also want a ComfyUI recent enough to have Qwen Image 2.1 support - v0.37.0 does.

Where people get burned

"Qwen Image 2.1 encoding requires ComfyUI with TextEncodeQwenImage21 support. Update ComfyUI." That's the node's own error, and it's the single most likely one. The node registers on older installs, so it looks fine in the menu and only dies at queue time. Update ComfyUI, not the pack.

Wrong encoder weights. Older Qwen Image text encoders are not interchangeable with the 2.1 encoder. Same qwen_image type, different file - check you grabbed Qwen3-VL-8B.

Postage-stamp output or a shifted edit. You passed a latent from an EmptyLatentImage you set by hand instead of the node's own latent. The 2.1 VAE is 64-channel/16×; the numbers have to match the references, not your intuition.

Drifting, close-but-not-identical edits are the family's known weakness, not this node's - the model re-emits the whole frame, so unedited regions come back slightly changed and the error compounds. If pixels must not move at all, that's still the mask hybrid: inpaint crop, edit, stitch.

Category🌒 Smart Model Loader/ Conditioning

Inputs (7)

NameTypeDefaultDescription
clipCLIP
vaeVAE
positiveSTRING
negativeSTRING
resolutionINT10240–4096Resize references to about resolution squared pixels, preserving aspect ratio at multiples of 32. 0 keeps their own size, rounded to multiples of 32.
image_1optIMAGE
imagesoptCOMFY_AUTOGROW_V3Optional references in socket order; use the first image of each input batch.

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT