TextEncodeZImageOmni
Give Z-Image a reference image without an adapter
- clip
- image_encoder
- vae
- image1
- image2
- image3
- CONDITIONING
TextEncodeZImageOmni is how you do reference-image conditioning for Z-Image - Alibaba's 6B image model that became the community's SDXL successor - without reaching for an IP-Adapter or a separate edit model. Where the plain Z-Image text encoder takes a prompt, this one takes a prompt plus up to three reference images and bakes them into the conditioning as vision tokens, the way the Omni variant of the model was trained to read them. Same family as Qwen-Image-Edit's in-context tricks: the image goes in as context, not as a separate adapter bolt-on.
How it works
The node builds a chat-style template around your images - <|vision_start|><|vision_end|> token markers around each picture, then your prompt as the assistant turn - and encodes that whole thing with the Z-Image (Qwen3-based) text encoder. Each reference image gets two parallel treatments if you wire them: an optional image_encoder (CLIP vision) produces vision embeddings, and an optional vae encodes the image into reference latents that ride along in the conditioning. The auto_resize_images toggle (default on) scales images toward ~1 megapixel before VAE encoding - keeping memory sane when you throw in a 4K reference.
Inputs that matter
- clip - the Z-Image text encoder.
- prompt - what you want generated, referencing what the images show.
- image1 / image2 / image3 - up to three references. Order matters a little; the template labels them left to right.
- image_encoder + vae - optional, but the images do more with them connected. With neither, the node still encodes the prompt - images just contribute less.
- auto_resize_images - leave on unless you have a reason not to.
Output is a single CONDITIONING into the sampler.
Where it fits
Ships with ComfyUI core - the node supporting the Z-Image Omni base model landed in early 2026, marked experimental. The Z-Image checkpoint (and its Omni variant if you have the weights) goes in your ComfyUI models folder. Worth knowing the caveat the KB flags: Z-Image Base is the publicly-adopted one; the Omni/Edit variants have been a moving target, so this node is ahead of the weight availability in places. For most people it's the reference-image path you reach for when you're already on Z-Image and want character or style consistency without adding a whole adapter stack.
Common issues
Don't expect the reference to behave like an IP-Adapter at full strength - Omni conditioning is contextual, so the prompt does more of the steering than you might think. Too many conflicting references in one prompt is the fastest way to mush; two well-chosen images beat three that disagree. And if you feed a huge reference with auto_resize off, the VAE encode gets slow and memory-hungry for no quality gain. The node is experimental, so treat subtle weirdness as "pipeline still settling," not a settings bug you caused.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — | |
| auto_resize_images | BOOLEAN | true | — |
| image_encoderopt | CLIP_VISION | — | |
| vaeopt | VAE | — | |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |