Nodes/ComfyUI Smart Helper Nodes/Smart TextEncodeEditAdvanced Dual (6 images)
ComfyUI Node

Smart TextEncodeEditAdvanced Dual (6 images)

Positive and negative edit encoding in one node

By slvslvslv·Created 2 years ago·Updated 7 days ago· 3
Smart TextEncodeEditAdvanced Dual (6 images)
  • clip
  • vae
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • positive
  • negative
positive
negative
use_vl_encodingtrue
vl_megapixels0.50
max_images_allowed6

Smart TextEncodeEditAdvanced Dual is the two-output version of its single sibling: same vision-language edit encoding, same six-image input, but it returns both positive and negative conditioning in one node. If you've already read about SmartTextEncodeEditAdvanced, this is that pipeline with the negative half bolted on - useful because most samplers want both, and having them come out of one node means the images and settings can't drift out of sync between the two encoders.

The mechanism is worth one detail for anyone who's reached for this in a WAN edit workflow. The positive side gets the full treatment: images downscaled to vl_megapixels (default 0.5, Qwen2.5-VL's sweet spot is 0.2–1.0 MP), Picture N: vision-token prefixes, the edit-style instruction template, and the images passed into clip.tokenize so the vision-language CLIP actually sees them. The negative side is deliberately plain: the negative prompt is tokenized with no images and no template. That's the right call - a negative prompt is asking "what should this not look like," and feeding it pictures would blur the distinction. Meanwhile, if vae is connected, every input image is VAE-encoded into reference_latents that get appended to both the positive and negative conditioning. Zero latents go on the negative side so the model doesn't get contradictory pixel anchors.

So the practical difference from the single-output node is purely workflow ergonomics, and it's a real one. With the single version you'd need two of them - one for positive, one for negative - and remember to keep use_vl_encoding, vl_megapixels, max_images_allowed, and all six image connections in lockstep across both, or your negative encodes at a different resolution than your positive and results get weird. The Dual node removes that failure mode entirely. If your sampler expects one conditioning input, use the single; if it takes positive and negative, Dual is the one to grab.

Inputs mirror the single version exactly: clip, positive, negative, use_vl_encoding (default on - flip it off to get plain text encode plus reference_latents, handy for A/B testing), vl_megapixels, max_images_allowed (0–6, default 6), and the six optional image1image6 slots plus vae. The max_images_allowed cap matters more here than you'd think: images are processed in order, so limiting to the first 1–2 forces the model to focus on your key reference instead of spreading attention across everything connected.

The clip input needs a vision-language-capable model - in practice a Qwen2.5-VL CLIP from the WAN edit ecosystem - because the VL path depends on the tokenize signature that accepts images and a llama_template. A stock SD/SDXL CLIP won't do the vision part.

Install through ComfyUI Manager (search "Smart Helper Nodes") or:

cd ComfyUI/custom_nodes
git clone https://github.com/slvslvslv/ComfyUI-SmartHelperNodes

Restart ComfyUI afterward. No pip dependencies (empty requirements.txt) and no bundled model files - the CLIP you plug in does the work.

CategorySmartHelperNodes

Inputs (13)

NameTypeDefaultDescription
clipCLIP
positiveSTRING
negativeSTRING
use_vl_encodingBOOLEANtrueEnable VL image feeding: prepend Picture N vision tokens, pass downscaled images to clip.tokenize, and apply the edit-style llama_template. Turn off to behave like plain text encode + reference_latents.
vl_megapixelsFLOAT0.500–4Target megapixels for Vision-Language model. Set to 0 to disable VL image feeding. Recommended: 0.2-1.0 MP. Qwen2.5-VL trained range: 0.2-1.0 MP
max_images_allowedCOMBO6Maximum number of images to process. Images are processed in order: image1..image6
vaeoptVAE
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
image5optIMAGE
image6optIMAGE

Outputs (2)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING