Nodes/ComfyUI-EditUtils/EditUtils: Qwen Edit Output Extractor lrzjason
ComfyUI Node

EditUtils: Qwen Edit Output Extractor lrzjason

The encode node's kitchen sink, unpacked into 11 usable wires

By lrzjason·Created 7 months ago·Updated 16 days ago· 207
EditUtils: Qwen Edit Output Extractor lrzjason
  • custom_output
  • pad_info
  • full_refs_cond
  • main_ref_cond
  • main_image
  • vae_images
  • ref_latents
  • vl_images
  • full_prompt
  • llama_template
  • no_refs_cond
  • mask

The main encode node (EditTextEncode_EditUtils) is tidy on the outside - it hands you a conditioning and a latent - but it also packs a whole dictionary of intermediates into a single custom_output wire. QwenEditOutputExtractor_EditUtils is the tool that unpacks that dictionary back into named sockets. One custom_output (ANY) input, eleven outputs.

Most of them are the things you'll actually want on a real editing graph:

  • full_refs_cond (CONDITIONING) - the conditioning with all reference latents attached. This is your normal "feed the sampler" wire.
  • no_refs_cond (CONDITIONING) - the same text conditioning with references stripped. Hugely useful as a negative conditioning, or for the pass where you don't want the reference driving the result.
  • main_image (IMAGE) - the image that was chosen as main, post-processing.
  • vae_images / ref_latents (LIST) - the VAE-side images and their encoded latents, one per reference. Feed these into ListExtractor_EditUtils to grab a specific one.
  • vl_images (LIST) - the downscaled images that went to Qwen2.5-VL.
  • full_prompt (STRING) - the final prompt after the pack auto-prepends the "Picture n: <|vision_start|>..." tags. Great for checking what the model is actually being asked.
  • pad_info (ANY) - the padding dict from the main image, for reversing padding later.
  • mask (MASK) - the mask, if one was applied.
  • main_ref_cond and llama_template - both effectively dead weight in current code. The author's own docs say main_ref_cond is always None (the logic is commented out) and llama_template is no longer written into custom_output. Don't design around them; the outputs exist for compatibility.

So the practical pattern: wire custom_output from the encode node into this extractor, take full_refs_cond into the sampler's positive, no_refs_cond into the negative, and route vae_images or vl_images through ListExtractor to preview what each reference actually looks like after the pipeline mangled it. The full_prompt string is the single most useful debugging output in the whole pack - when an edit does something unexpected, read what prompt the pack built, because the answer is usually in there.

Install

Part of lrzjason/ComfyUI-EditUtils - Manager → "ComfyUI-EditUtils", or clone into custom_nodes and restart. No pip deps. The nodes that emit custom_output need real Qwen weights upstream, which are separate downloads.

Troubleshooting

The two dead outputs will throw you off if you hunt for values that were promised by older docs - main_ref_cond returns None and llama_template returns None in current code, by design. If a no_refs_cond-driven negative is behaving oddly, remember it still carries the text conditioning; it just drops the reference latents, it's not an "empty" negative. And mask is only populated when the encode ran with a mask attached - no mask, expect None.

Categoryadvanced/conditioning

Inputs (1)

NameTypeDefaultDescription
custom_outputANY

Outputs (11)

NameTypeDescription
pad_infoANY
full_refs_condCONDITIONING
main_ref_condCONDITIONING
main_imageIMAGE
vae_imagesLIST
ref_latentsLIST
vl_imagesLIST
full_promptSTRING
llama_templateSTRING
no_refs_condCONDITIONING
maskMASK