⭐ Star Qwen Edit Encoder
The encoder that gets Qwen-Edit conditioning actually right
- clip
- vae
- image
- reference_latent
- CONDITIONING
Qwen-Image-Edit works in a way that punishes sloppy conditioning. The reference image gets encoded to a latent, the prompt gets encoded to conditioning, and if those two don't line up in size and aspect, the sampler doesn't explode - it just quietly produces a worse edit. A generic CLIPTextEncode node doesn't know or care about any of this. StarQwenEditEncoder does, which is why it exists.
It's a conditioning node built specifically for the Qwen-Edit workflow: prompt in, reference in, CONDITIONING out, with the resolution bookkeeping handled internally.
What it does
- Encodes your prompt with the Qwen text encoder - feed it the
clipfrom your Qwen text encoder loader and your multilineprompt. - Handles the reference image. Give it a
vaeplus animage, and it encodes the reference to a latent - but first it resizes the image to the target resolution so the conditioning and the latent match.resize_modepicks the upscaling algorithm (lanczosorbicubic) used when the reference is smaller than the target. - Or takes a ready latent. Prefer encoding the reference yourself?
reference_latentaccepts an already-encoded latent and skips the image path entirely. This is the input you want if you're reusing the same reference latent across runs.
The rest of the inputs are fine-tuning for the resize behavior: skip_upscale_if_match (default on) skips resizing when the image already matches, ar_skip_epsilon controls how close counts as "matching" (0.002 by default - it's a tolerance, not a slider you need to touch), and cache_tokens plus cache_bust let you cache the encoded tokens so you don't re-encode the same prompt every queue. debug_timing prints timing info when you're trying to figure out where a slow graph is stuck.
What it's for, honestly
If you're building the Qwen-Edit graph from scratch - checkpoint + VAE + Qwen text encoder, reference image, prompt, KSampler - this node replaces the two-node song-and-dance of "VAE-encode the image, CLIP-encode the text" with one box that keeps the sizes consistent. That consistency is the whole game: Qwen-Image-Edit is the community's default open instruction editor (Apache 2.0, the model everyone standardized on after the Kontext license mess), and its main practical foot-gun is feeding it mismatched conditioning.
Wire the CONDITIONING output into your sampler's positive input, alongside the reference_latent from your input-prep nodes. The standard Qwen-Edit graph on Comfy's own docs follows exactly this shape.
Install & gotchas
The pack: ComfyUI_StarBetaNodes is the retired beta repo; install ComfyUI_StarNodes via Manager (search Starnodes) or git clone https://github.com/Starnodes2024/ComfyUI_StarNodes into custom_nodes. Then make sure you actually have the Qwen text encoder CLIP loaded - this node takes a clip in, and it will happily sit there erroring if you wired it nothing. And yes, the model is 20B: run a GGUF quant if your VRAM complains. The node fixes your conditioning, not your memory budget.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — | |
| vaeopt | VAE | — | |
| imageopt | IMAGE | — | |
| reference_latentopt | LATENT | — | |
| resize_modeopt | COMBO | lanczos | 2 options: lanczos, bicubic |
| skip_upscale_if_matchopt | BOOLEAN | true | — |
| ar_skip_epsilonopt | FLOAT | 0.00200–0.5 | — |
| cache_tokensopt | BOOLEAN | false | — |
| cache_bustopt | STRING | — | |
| debug_timingopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |