XB-BOX - 📝 Qwen图像编辑编码Plus
Multi-image Qwen editing, with the vision-language plumbing done for you
- clip
- vae
- image1
- 条件
Where the base XB_TextEncodeQwenImageEdit is the straight port, this "Plus" is the one that does the multi-image heavy lifting explicitly. Qwen-Image-Edit can look at several pictures at once - a character sheet, a wardrobe reference, a background - and follow an instruction that refers to all of them. The Plus variant makes that legible: it builds the explicit "Picture 1: ..., Picture 2: ..." vision-language markers the model expects, resizes each image to a VL-friendly resolution for tokenization, VAE-encodes them at full quality for the reference_latents, and assembles the whole thing into conditioning. One node, all the plumbing.
It's the pack's answer to the official TextEncodeQwenImageEditPlus, restyled with dynamic image sockets (up to 9 references) and the pack's naming. Same overall contract as the base node - image(s) + instruction → conditioning - but built for the case where the edit needs context from multiple images, which is the whole reason "Plus" exists in the Qwen family.
Inputs
- clip - the Qwen-Image-Edit CLIP (from the stock loader or the pack's INT8 ROCm CLIP loader). Must match the base model you're sampling with.
- prompt - your instruction, e.g. "the character in Picture 1, wearing the jacket from Picture 2, on the street from Picture 3."
- vae (optional) - supply it to get real reference latents baked into the conditioning (the consistency anchor). Without it you get vision-language tokens only, and edits will be far less faithful.
- image1 (optional) - first reference; up to 9 slots total, added dynamically.
Output: 条件 (conditioning) → sampler. Wire the same for positive, and for Qwen-Edit flows the negative conditioning is usually a plain/empty encode - the model is an instruction follower, not a CFG creature.
What the Plus actually changes under the hood
Two things, visible in the source. The images get resized in two different ways for two different jobs: a ~384×384 area for the vision-language tokens (so the text encoder can "see" them), and a ~1024×1024 area for the VAE reference latents (so the diffusion model gets the detail). The base node collapses these; Plus keeps them separate, which is the difference between "the model knows there's a picture" and "the model can actually reproduce it." If you're doing anything with multiple references - character consistency, product shots, scene assembly - this is the one to reach for.
The caveat it inherits
Same structural limit as all Qwen-Edit work: the model re-emits the entire frame, so untouched regions can drift, and the fix is the same one power users apply - mask it or accept the drift. And remember the node is the encoder half; you still need the Qwen-Image-Edit base model and CLIP downloaded (into diffusion_models and text_encoders) or the conditioning has nothing to drive.
Install: Manager → XB_ToolBox, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes, restart. Under "XB_ToolBox/Qwen". No extra pip deps for the node itself.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — | |
| vaeopt | VAE | — | |
| image1opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 条件 | CONDITIONING | — |