Nodes/ComfyUI-ArchAi3d-Qwen/ArchAi3D_Qwen_Encoder_V2
ComfyUI Node

ArchAi3D_Qwen_Encoder_V2

The encoder the README actually recommends — two-stage strength that doesn't spike

By amir84ferdos·Created 11 months ago·Updated 5 months ago· 70
ArchAi3D_Qwen_Encoder_V2
  • clip
  • vae
  • image1_vl
  • image2_vl
  • image3_vl
  • image1_latent
  • image2_latent
  • image3_latent
  • conditioning
  • latent
  • formatted_prompt
prompt
system_prompt
image1_labelImage 1
image2_labelImage 2
image3_labelImage 3
context_strength1.00
user_strength1.00
image1_latent_strength1.00
image2_latent_strength1.00
image3_latent_strength1.00
debug_modefalse

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.

CategoryArchAi3d/Qwen

Inputs (19)

NameTypeDefaultDescription
clipCLIPQwen-VL CLIP model for encoding text and vision tokens
promptSTRINGText prompt (vision tokens inserted automatically in ChatML format)
system_promptSTRINGOptional system prompt (wrapped in ChatML <|im_start|>system block)
image1_labelSTRINGImage 1Custom label for Image 1 (e.g., 'Image 1 (target)', 'Image 1 (room)')
image2_labelSTRINGImage 2Custom label for Image 2 (e.g., 'Image 2 (style ref)', 'Image 2 (material)')
image3_labelSTRINGImage 3Custom label for Image 3 (e.g., 'Image 3 (color ref)', 'Image 3 (lighting)')
context_strengthFLOAT1.000–1.5V2 Stage A: Controls system prompt + labels influence (0.0=vision only, 1.0=full context). Turn down if system feels too heavy!
user_strengthFLOAT1.000–1.5V2 Stage B: Controls user text influence (0.0=no user text, 1.0=full user text). Typical: 0.35-0.8
image1_latent_strengthFLOAT1.000–2Image1 latent strength (1.0=normal, <1.0=weaker, >1.0=stronger)
image2_latent_strengthFLOAT1.000–2Image2 latent strength (1.0=normal, <1.0=weaker, >1.0=stronger)
image3_latent_strengthFLOAT1.000–2Image3 latent strength (1.0=normal, <1.0=weaker, >1.0=stronger)
debug_modeBOOLEANfalseEnable console logging (shows strengths, shapes, and formatted prompt)
vaeoptVAEVAE for encoding reference latents (required if using latent images)
image1_vloptIMAGEImage 1 for vision encoder (RGB only, expects correct size)
image2_vloptIMAGEImage 2 for vision encoder (RGB only, expects correct size)
image3_vloptIMAGEImage 3 for vision encoder (RGB only, expects correct size)
image1_latentoptIMAGEImage 1 for reference latent (RGB only, expects correct size)
image2_latentoptIMAGEImage 2 for reference latent (RGB only, expects correct size)
image3_latentoptIMAGEImage 3 for reference latent (RGB only, expects correct size)

Outputs (3)

NameTypeDescription
conditioningCONDITIONINGText+vision embeddings with reference latents metadata attached
latentLATENTImage1 latent in standard format (for VAEDecode or other latent nodes)
formatted_promptSTRINGFinal ChatML-formatted prompt with vision tokens (for debugging)