ArchAi3D_Qwen_Encoder_V2
The encoder the README actually recommends — two-stage strength that doesn't spike
- clip
- vae
- image1_vl
- image2_vl
- image3_vl
- image1_latent
- image2_latent
- image3_latent
- conditioning
- latent
- formatted_prompt
The README says "Encoder V2 (Recommended)" with a star, and for once the hype is warranted. V1 applies conditioning strength as a raw multiply, which means adding a system prompt can blow the strength out proportionally - the pack calls it the "weight spike," and anyone who's run Qwen Edit workflows knows the symptom: crank a slider 10% and the image goes sideways. V2 replaces raw multiplication with interpolation, and splits one strength dial into two so you can control the text and the system prompt separately. It's the difference between "a dial" and "a fader that behaves."
The two-stage system
The new inputs replace conditioning_strength:
context_strength(0–1.5) - Stage A, vision → vision + context. Controls how much the system prompt and image labels influence the result. 0.0 is pure vision (images only, no text), 1.0 is full context. If the system prompt feels too heavy - the V1 spike symptom - this is the dial to pull down. Recommended 0.8–1.0.user_strength(0–1.5) - Stage B, adds your actual instruction text on top. 0.0 = context only, 1.0 = full user text. The tooltip's suggested range, 0.35–0.8, is the pack's honest answer to "how strong should my edit instruction be?" - lower than you'd think.
Plus the usual image1/2/3_latent_strength (0–2) per reference image, image1/2/3_label naming, system_prompt, debug_mode, and the optional vae + *_vl / *_latent image inputs. Outputs are conditioning, latent (image1 latent, VAEDecode-compatible), and formatted_prompt for debugging.
How the mechanism works
Where V1 did conditioning *= strength, V2 interpolates: new = null + alpha × (target - null). It computes a baseline conditioning (say, vision without user text) and the full target conditioning, then blends between them by alpha - and extrapolates smoothly beyond 1.0 if you push it. Because it uses the baseline's masks and extras instead of multiplying the whole tensor, a strong system prompt can't drag the total conditioning into spike territory. It also scales the pooled output alongside the token embeddings, which keeps guidance balanced when the tokens are scaled. That's the "two-stage" in the name: Stage A blends in context, Stage B blends in user text, each with its own fader.
When to reach for it
Default encoder for this pack, full stop. If you're doing mood-board design, reference-based edits, or anything where a system prompt is involved, V2 is the one. The practical difference shows up the moment you want to turn the style reference down without killing the instruction - context_strength does that in one move, and you can't really do it on V1 without surgery.
Install
Pack install, once:
cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen && pip install -r requirements.txt
Or ComfyUI Manager → "ArchAi3d Qwen". Restart, find it under ArchAi3d/Qwen. You need the Qwen-Image-Edit model + Qwen-VL CLIP, quantized on consumer GPUs. If results feel mushy, don't reach for max - the pack's documented ranges (context 0.8–1.0, user 0.35–0.8) are the starting point, and debug_mode will show you the formatted prompt so you can see exactly what the model received.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | Qwen-VL CLIP model for encoding text and vision tokens | |
| prompt | STRING | Text prompt (vision tokens inserted automatically in ChatML format) | |
| system_prompt | STRING | Optional system prompt (wrapped in ChatML <|im_start|>system block) | |
| image1_label | STRING | Image 1 | Custom label for Image 1 (e.g., 'Image 1 (target)', 'Image 1 (room)') |
| image2_label | STRING | Image 2 | Custom label for Image 2 (e.g., 'Image 2 (style ref)', 'Image 2 (material)') |
| image3_label | STRING | Image 3 | Custom label for Image 3 (e.g., 'Image 3 (color ref)', 'Image 3 (lighting)') |
| context_strength | FLOAT | 1.000–1.5 | V2 Stage A: Controls system prompt + labels influence (0.0=vision only, 1.0=full context). Turn down if system feels too heavy! |
| user_strength | FLOAT | 1.000–1.5 | V2 Stage B: Controls user text influence (0.0=no user text, 1.0=full user text). Typical: 0.35-0.8 |
| image1_latent_strength | FLOAT | 1.000–2 | Image1 latent strength (1.0=normal, <1.0=weaker, >1.0=stronger) |
| image2_latent_strength | FLOAT | 1.000–2 | Image2 latent strength (1.0=normal, <1.0=weaker, >1.0=stronger) |
| image3_latent_strength | FLOAT | 1.000–2 | Image3 latent strength (1.0=normal, <1.0=weaker, >1.0=stronger) |
| debug_mode | BOOLEAN | false | Enable console logging (shows strengths, shapes, and formatted prompt) |
| vaeopt | VAE | VAE for encoding reference latents (required if using latent images) | |
| image1_vlopt | IMAGE | Image 1 for vision encoder (RGB only, expects correct size) | |
| image2_vlopt | IMAGE | Image 2 for vision encoder (RGB only, expects correct size) | |
| image3_vlopt | IMAGE | Image 3 for vision encoder (RGB only, expects correct size) | |
| image1_latentopt | IMAGE | Image 1 for reference latent (RGB only, expects correct size) | |
| image2_latentopt | IMAGE | Image 2 for reference latent (RGB only, expects correct size) | |
| image3_latentopt | IMAGE | Image 3 for reference latent (RGB only, expects correct size) |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | Text+vision embeddings with reference latents metadata attached |
| latent | LATENT | Image1 latent in standard format (for VAEDecode or other latent nodes) |
| formatted_prompt | STRING | Final ChatML-formatted prompt with vision tokens (for debugging) |