H3 Save Conditioning (debug)
The node that tells you what H3 actually saw
- conditioning
A debug node, and I mean that literally
H3 Save Conditioning (debug) does one thing: it writes a conditioning to disk as a .safetensors file under ComfyUI/output/ so you can compare it against another conditioning with actual numbers instead of vibes. No outputs. An output node, so it fires when you queue and produces nothing downstream.
You will probably never put this in a workflow you keep. You'll put it in for an afternoon, answer a question, and delete it. The question is usually one of these:
- Is H3 RefCap Replay really giving me the same thing as the native reference node, on my character, or does it just look similar?
- What did H3 RefCap Apply (cached) actually bolt in front of my prompt, and does it line up?
- Why does this pack of three RefCaps produce a different picture than the same photos wired natively?
- My prompt still isn't binding to
<Picture 2>- are the labels where I think they are?
That last one is the real use. H3's reference path is a presentation of numbered labels and vision blocks, and a prompt that quietly references <Picture 5> when the pack only numbered four will fail in a way that looks like a modelling problem rather than a text problem. Dumping the conditioning shows you the tag layout.
What ends up in the file
Two inputs, no fuss:
conditioning- anything H3-shaped: the reference node's output, Replay, Apply, Replay Pack, Replay View Set.filename- the path stem, defaultrefcap_debug/conditioning. It resolves underoutput/, creates directories, and refuses anything that escapes the output folder, so you can't accidentally write to/etc.
The saved tensors are the raw material of H3 conditioning:
rows- the text encoder's output,[N, 5120]float32. Every label row and vision block row, plus your prompt.tags-minimax_token_tagsper row, int8.0marks the vision blocks (video modality),1marks text. The DiT picks its per-row adaLN modulation from this.ref_0,ref_1, … - the reference latents attached inminimax_refs.ref_i_audio- audio latents, for clip soundtracks and standalone audio references.
That's the whole two-channel story of H3 reference conditioning, sitting in one file. Seeing rows and ref_0 next to each other is the fastest way to understand why both matter: the pack measured latents-only at 0.585 ArcFace and rows-only at 0.391 against native's 0.660.
How you actually compare two
The pack ships H3 RefCap 4 - AB native vs RefCap, which renders native / Replay / Apply branches on one shared prompt and seed - that's the visual test, and it's the one to run first. This node is for when the visual test disagrees with you.
Drop a Save Conditioning after each branch, give them different filename values, queue once, then:
import torch
from safetensors.torch import load_file
a = load_file("ComfyUI/output/refcap_debug/native.safetensors")
b = load_file("ComfyUI/output/refcap_debug/replay.safetensors")
print(a["rows"].shape, b["rows"].shape)
print("tags equal:", torch.equal(a["tags"], b["tags"]))
print("max row diff:", (a["rows"] - b["rows"]).abs().max().item())
print("ref latents equal:", torch.equal(a["ref_0"], b["ref_0"]))
Replay against native should come out at zero difference - that's the property the pack claims, and it's checkable in about ten seconds. Apply against native will not: its rows were prefixed from cache, so you'll see a shape difference and, in the prompt rows, that cosine median ~0.97 the author reports. A large divergence there means you compared the wrong things, or a cached RefCap came from a different photo set than the one you think.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/AEmotionStudio/ComfyUI-RefCap.git
Or ComfyUI Manager → ComfyUI-RefCap. No dependencies to install for this node specifically - it's safetensors and folder_paths, both already in ComfyUI. The H3 models are only needed if the conditioning is being produced by something real, which, for debugging, it is.
Two things worth knowing
The node saves only the first conditioning in the list. If you're feeding it a batched conditioning, you're inspecting [0] and not the rest. Nothing warns you.
And the files are big. rows is 5120 floats per token - about 20 MB per 1,000 rows, the pack's own figure - so a five-photo capture at 1024 px lands near 100 MB on its own. Save a couple, compare, then clean out output/refcap_debug/ - it's not a library, it's a scratch folder that will quietly fill a disk if you leave it wired in while you iterate.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| filename | STRING | refcap_debug/conditioning | — |
Outputs (0)
No outputs