Nodes/ComfyUI-QwenEditPlusSlots/Text Encode Qwen Edit Plus (Slots)
ComfyUI Node

Text Encode Qwen Edit Plus (Slots)

Stop hand-assembling Qwen edit prompts — build them in slots and encode in one node

By normbarrette-arch·Created 3 months ago·Updated 2 months ago· 0
Text Encode Qwen Edit Plus (Slots)
  • clip
  • vae
  • image1
  • image2
  • image3
  • image4
  • conditioning
  • prompt
mode
select1
separator,
slot_count2
use_manual_editfalse
final_prompt
component_detailFull
text_1
enable_1true
text_2
enable_2false
text_3
enable_3false
text_4
enable_4false
text_5
enable_5false
text_6
enable_6false
text_7
enable_7false
text_8
enable_8false
text_9
enable_9false
text_10
enable_10false

If you edit images with Qwen-Image-Edit, you know the dance: wire a reference image into ComfyUI's core TextEncodeQwenImageEditPlus node, then type one long comma-joined sentence of instructions into a single text box. Fine for a one-off. Miserable when you're A/B testing, because every tweak means editing one giant string and hoping you didn't nuke the part that was working.

Text Encode Qwen Edit Plus (Slots) is that core node with a prompt builder bolted on. You get up to 10 toggleable text slots with reorder buttons and a live preview of the combined result, and the node encodes it through the exact same Qwen Image Edit pipeline. The conditioning it produces is identical to the core node's - the author copied the encode logic straight from comfy_extras/nodes_qwen.py. This is a drop-in replacement, not a new pipeline.

Why Qwen edit prompts want slots

Qwen-Image-Edit is the open instruction-editing standard: a 20B multimodal model you steer with a reference image plus a plain-language sentence. Because the text encoder is an LLM (Qwen2.5-VL), you write sentences, not tag soup, and weighting syntax is inert - which is exactly why a modular builder pays off. Keep "change her dress to a navy trench coat" in slot 1, lock "keep the pose" in slot 2, then toggle slot 3 on and off to test "add subtle film grain" without touching the working parts. That's the whole pitch: iteration without anxiety.

What you actually set

The node needs a clip (your Qwen 2.5-VL CLIP - you already own this if you run any Qwen-Image-Edit workflow), plus a vae and up to four image1..image4 reference images, all optional. The controls that matter:

  • mode - Combine Enabled joins your enabled, non-empty slots with separator (default ", "); Select One emits a single chosen slot via select. Combine is what you'll use 95% of the time.
  • slot_count - how many slots are visible, 1–10. Set it to 3 and hide the clutter.
  • use_manual_edit - AUTO encodes the assembled slots; MANUAL encodes final_prompt verbatim. Flip it when you want to hand-tweak the preview before encoding.
  • component_detail - Full matches the core node exactly. Balanced/Light shrink the image2–4 reference latents, which matters when you run four images (more below).
  • text_1..text_10 + enable_1..enable_10 - the slots, each with a native ON/OFF toggle and ▲/▼ reorder buttons.

Outputs are conditioning (wire straight into your sampler) and prompt (the exact text that got encoded, handy for logging or chaining).

Install

Via ComfyUI-Manager (Install via Git URL → paste the repo), or:

cd ComfyUI/custom_nodes
git clone https://github.com/normbarrette-arch/ComfyUI-QwenEditPlusSlots.git

Restart ComfyUI - and hard-refresh the browser tab, or the slot JavaScript won't load. The node shows up under advanced/conditioning. No extra pip dependencies in this pack; the heavy lift is the Qwen Image Edit checkpoint itself, which you already have if you've done a Qwen edit before.

Gotchas

The one that bites: the Qwen edit model is optimized for ≤3 reference images. image4 is an opt-in extra, and a 4th reference can reduce consistency. Leave it unconnected and the node behaves exactly like the 3-image core node; if you do use it, drop component_detail to Balanced so the extra reference doesn't crowd the prompt out of the model's attention. Unused image inputs are skipped, so there's no penalty for leaving them dangling.

One more thing to know before you fork it into a big project: because the encode pipeline mirrors ComfyUI core's GPL-3.0 nodes_qwen.py, this whole pack is GPL-3.0. Fine for personal use; it's a real constraint if you plan to ship a closed-source derivative.

Categoryadvanced/conditioning

Inputs (33)

NameTypeDefaultDescription
clipCLIP
modeCOMBO2 options: Combine Enabled, Select One
selectINT11–10Which slot to output in 'Select One' mode
separatorSTRING,
slot_countINT21–10Number of visible text slots
use_manual_editBOOLEANfalseAUTO: encode the combined slots. MANUAL: encode the edited final_prompt text instead.
final_promptSTRINGLive preview of the combined slots. Turn use_manual_edit ON to hand-edit and encode this text instead.
component_detailCOMBOFullDetail budget for the component images (image2-4). image1 (the source) always stays at full detail. Lower settings shrink only the component references, freeing model attention for the prompt while still transferring each component. 'Full' behaves exactly like the core node.
vaeoptVAE
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
text_1optSTRING
enable_1optBOOLEANtrue
text_2optSTRING
enable_2optBOOLEANfalse
text_3optSTRING
enable_3optBOOLEANfalse
text_4optSTRING
enable_4optBOOLEANfalse
text_5optSTRING
enable_5optBOOLEANfalse
text_6optSTRING
enable_6optBOOLEANfalse
text_7optSTRING
enable_7optBOOLEANfalse
text_8optSTRING
enable_8optBOOLEANfalse
text_9optSTRING
enable_9optBOOLEANfalse
text_10optSTRING
enable_10optBOOLEANfalse

Outputs (2)

NameTypeDescription
conditioningCONDITIONING
promptSTRING