Nodes/DenRakEiw_Nodes/πŸ” Conditioning Inspector
ComfyUI Node

πŸ” Conditioning Inspector

What's actually inside that wire

By DenRakEiwΒ·Created about a year agoΒ·Updated a day agoΒ· 35
πŸ” Conditioning Inspector
  • conditioning
  • conditioning
  • info

Every CLIP Text Encode hands you a CONDITIONING wire, and the wire is a lie: it looks like one thing, but it's secretly a Python list of tuples - [(embedding_tensor, {extra_metadata})]. The tensor is your prompt's token embeddings; the dict next to it carries the good stuff SDXL and friends stuff in there (pooled_output, sometimes attention_mask). ComfyUI shows you none of it. ConditioningInspector is the pry bar.

It's the front half of this pack's core loop: inspect β†’ manipulate β†’ repack. You crack a conditioning open, hand the raw tensor to the pack's tensor tools, then rebuild it with ConditioningPacker before it goes into a KSampler. If you've ever wondered why SDXL conditioning has that second "pooled" concept that SD 1.5 doesn't, this node is how you finally see it.

What you get out, five outputs:

  • cond_tensor - the embedding tensor itself, [batch, seq_len, hidden_dim].
  • pooled_tensor - the pooled vector from details["pooled_output"], if the text encoder wrote one (SDXL does; plain SD 1.5 CLIP and the Flux T5 encoder don't). Missing pooled output falls back to zeros, so you always get a tensor, just maybe a meaningless one.
  • details_dict - the whole metadata dict, untouched, so you can see every key the encoder put there.
  • nested_keys - a newline-separated string listing every key path in that dict. The pack's own term is "δΏ‘ζ―ε…¨θ§ˆ" (info overview), and this is the overview: one glance tells you what metadata this conditioning is actually carrying.
  • attention_mask - the mask out of the details, if it's a real tensor, otherwise None.

Mechanically it's dead simple: it reads conditioning[0][0] and conditioning[0][1] and walks the dict collecting keys. The one sharp edge is that it only inspects the first tuple in the list. Multi-prompt conditioning (several tuples) gets truncated to tuple zero, so don't trust it to show you everything a concatenated conditioning is holding - which is honestly where ConditioningConcatenation and friends come in.

Where this bites people: the TENSOR outputs are a pack-private type. They wire into this pack's tensor nodes (TensorConcatenation, TensorPooledMerge, TensorShapeAdapter...) but not into core nodes expecting IMAGE or LATENT. That's by design - this pack is a self-contained tensor workshop. And the pooled_tensor zeros fallback is a trap in disguise: on an SDXL pipeline it's real pooled data, on SD 1.5 it's a block of zeros, and there's no label telling you which. If you're about to feed pooled_tensor somewhere, check nested_keys first to see whether pooled_output actually existed.

Install

Same as every node in this pack - via ComfyUI Manager (search comfyui-spawner-nodes) or:

cd ComfyUI/custom_nodes
git clone https://github.com/spawner1145/comfyui-spawner-nodes

Then restart ComfyUI. Dependencies are three tiny pure-Python libs (piexif, pypng, xmltodict), no models, no downloads. The README is a stub ("some toolkits"), and the on-node labels are Chinese even though the class names are English - the author is a Chinese-speaking dev best known for a Wan2.1 extension for SD WebUI, and this pack reads like a personal toolkit that escaped.

Troubleshooting

  • "ζ— ζ•ˆηš„ Conditioning" error: you wired something that isn't a real CONDITIONING (or an empty list). Check what's upstream - a bypassed CLIP Text Encode produces nothing to inspect.
  • pooled_tensor is all zeros: not a bug. Either the encoder doesn't produce pooled output, or you're on a model family that never did. See nested_keys.
  • attention_mask output is empty: also not a bug. Masks only appear when the upstream encoder or this pack's ConditioningPacker wrote one.
Categorydenrakeiw/flux

Inputs (1)

NameTypeDefaultDescription
conditioningCONDITIONINGβ€”

Outputs (2)

NameTypeDescription
conditioningCONDITIONINGβ€”
infoSTRINGβ€”