Fantastic H3 Store RefMod Encoder Frames
The one-time chore for old RefMods
- vae
RefMods are the pack's answer to re-uploading the same six photos of a character every prompt: a small file in models/refmods holding the pictures, the voice, the description, and the bits H3's text encoder needs. From 1.8.0, new RefMods carry the frames the encoder is shown inside the file. Older ones don't, so the Text Encode has to decode them - once, then from a cache.
This node bakes those frames in permanently. It's maintenance, not generation: nothing gets wired to it, nothing comes out of it, and for a library made after 1.8 you'll never need it.
What it's actually for
The RefMod Text Encode sends a RefMod to H3 as pictures, so it needs pictures. Before 1.8 they lived only as frames inside the file's latent-ish blob and had to be decoded every first run per session; the encode kept them in input/minimax_h3/cache afterwards, and the Media Loader's Clean up… would happily delete that cache - one more decode next run, no harm.
Store encoder frames moves them into the RefMod itself so the decode never happens again. Small thing, real payoff if you use RefMods constantly or if you're switching machines and don't want a first-run stall.
How it works
You hand it a list of RefMod paths and an H3 video VAE. For each file it loads the RefMod, skips anything whose kind is audio and anything that already stores encoder frames, decodes the frames the text encoder would see, rewrites the file's metadata with them plus their timings and fps, and restores the original modified time. That last bit is a nice touch - the library's Newest sort keeps meaning when you made the RefMod, not when you tidied it.
It shows a progress bar and prints a summary line, and it re-runs on every queue rather than caching its result, so pressing the button again after adding RefMods just does the new ones.
Inputs
Two, and both come pre-filled when the library queues it for you:
- files - RefMod files under
models/refmods, one per line, likecharacters/hero_visual. No.safetensorsextension. Quoting the tooltip because getting this wrong is the one easy mistake here. - vae - the H3 video VAE. Not the audio one. Voice RefMods are skipped anyway, so there's nothing for an audio VAE to do.
No outputs. It's an output node, so it queues as a job and writes to disk.
Install
The usual for this pack - Manager, searching Fantastic H3 Prompt Builder, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Adudeguyman/ComfyUI-Fantastic-MiniMaxH3-PromptBuilder
Full restart afterwards. It needs the H3 video VAE from your workflow, so the practical route is to trigger it from the RefMod library: Store encoder frames on a single RefMod's details panel, or the button beside the library's sort menu to do every RefMod still missing them. Let the library queue it and the list and VAE are already right.
Where people get burned
The file gets bigger. A RefMod built from several pictures roughly doubles, because it keeps every picture the encoder is shown. If you've got a big library on a small drive, do them in batches rather than all at once.
"RefMod 'x' was not found under models/refmods." Either the path is wrong or the extension is on it - it resolves bare stems relative to models/refmods. Use the library's button and this can't happen.
You edited a RefMod by hand and the folder changed. Hit Refresh in the library first; the node reads the folder as it is, not as the library last remembered it.
Interrupting mid-run. It checks for interruption between files, so you won't get a half-written file - but the ones already done are done, and re-running skips them. No reason to be precious about it.
One small warning about the README, since you'll read it: it announces "Four nodes" and then lists six, and the source registers appreciably more than that. The prose is good; the arithmetic is decorative.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| files | STRING | RefMod files under models/refmods, one per line, e.g. characters/hero_visual. | |
| vae | VAE | MiniMax H3 video VAE. |
Outputs (0)
No outputs