H3 RefMod · Cache Latent Preview
A Thumbnail for Your RefMod Bundle, Because Mod Names Are Not Helpful
- mods
- vae
- preview_path
Small node, real annoyance solved. H3's RefMod system gives you saved reference bundles - latent-space identity or style blocks you can attach to a generation - and they live on disk as .safetensors files whose contents are latent tensors. Which means your reference library looks like a folder of filenames.
This node decodes one and writes a PNG next to the file, so your library looks like pictures.
What it takes
mods is the H3_REF_MODS bundle, vae is a video VAE, and index picks which entry in the bundle you want (0 to 255). It decodes the first latent frame of that mod, writes yourmod.png beside yourmod.safetensors, and returns the path as preview_path (STRING). Output node, so it runs as a terminal step.
The rules it enforces
Three, and each is there to stop something silly:
- The RefMod must live in
models/refmods. The node resolves the path and rejects anything outside the pack's recognised RefMod roots. If you saved your bundle somewhere convenient instead of somewhere correct, this is where you find out. - Audio RefMods have no thumbnail. Ask for one and you get a flat refusal, because there's no image to decode.
- The index has to exist in the bundle. Out of range means an error, not an empty image.
How you'd use it
Run it once when you save a RefMod, as a terminal branch off the same graph, and you get a browsable reference library for free. It's also genuinely useful as a sanity check: decoding the first frame tells you whether the mod contains the thing you think it contains, which is not always obvious from a name like ref_04_final_v2.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Or Manager → IAMCCS Nodes; restart and hard-refresh the browser afterwards. No extra dependencies - it uses Pillow, which ComfyUI already installs.
That's the whole node. If you don't work with RefMods, you'll never see it, and that's fine.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| mods | H3_REF_MODS | — | |
| vae | VAE | — | |
| index | INT | 00–255 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| preview_path | STRING | — |