Fantastic H3 Edit RefMod
Swap a frame or a voice without paying to re-encode the rest
- vae
- audio_vae
- saved
What it's for
Your character RefMod came out 90% right: five photos are good, one is a bad angle, and the voice clip is a mumble. You don't want to rebuild the whole thing from scratch and you especially don't want to re-encode the photos you're happy with - that's minutes of VAE time you've already paid once.
This node edits a saved RefMod in place. It keeps, drops and reorders stored frames, encodes additions to match the file's existing shape, and replaces or removes the voice. Frames you keep are copied exactly as they are, never decoded and re-encoded.
In practice you'll meet it as the library's Edit frames & voice… action, which queues it for you. The node is exposed because it's genuinely usable from a graph: point it at a file, hand it JSON, and it's a scriptable refit. There's a companion to it, Fantastic H3 RefMod Inspect, for looking at what you ended up with.
How the fields work
file- the RefMod undermodels/refmods, e.g.characters/hero_visual. It may be a voice-only file when only the voice is changing.frames- a JSON list giving the new order: stored frame indices from 0, and"a0","a1"… for the items you're adding. So[2, 0, "a0", 1]says "third stored frame, first stored frame, the new picture, second stored frame". Leave it empty and stored frames stay put with additions appended.add- a JSON list of Media Loader items (pictures or clips) to encode and insert.voice- one Media Loader item (an audio file, or a clip that has sound) to replace the voice, the literal stringremoveto drop it, empty to leave it alone.latent_frames- frames taken from the start of any added clip. Same H3 grid as everywhere else: 22 stores 7, 39 stores 12, 56 stores 17.audio_max_seconds- how much of a new voice recording is kept.save_as- a new name to write the result as a copy and leave the original untouched. Folders are allowed (characters/hero_v2). Empty means overwrite.- Optional:
vaeandaudio_vae- needed only if you're actually adding pictures or a new voice. - Output:
saved, a string naming what was written.
Iterating on a character and not sure the change is an improvement? save_as is your friend. Tick nothing, name a copy, and you keep the version that worked.
Install
Search Fantastic H3 Prompt Builder in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Adudeguyman/ComfyUI-Fantastic-MiniMaxH3-PromptBuilder
Full restart, ComfyUI 0.30.0+, H3 checkpoints and VAEs (video for looks, audio for voices), and PyAV via the pack's single av dependency. The RefMod library's Create tab is where you make the thing you're editing.
Where people get burned
Frames from a clip are a unit. A clip was encoded as consecutive frames on H3's grid, and the library marks those frames as part of a clip - the pack's own guidance is blunt about it: keep them together and in order. Pull one out, reorder them, and the motion dissolves into drifting, inconsistent results. If a clip needs to change, re-trim it in the Media Loader and create the RefMod again. Adding and removing whole photos is always safe.
Type checks come with useful text. An index outside the stored range says "'frames' names a frame outside 0–6." An "a3" with only two items in add says it has no matching item. Malformed JSON in frames says what shape it wanted. Adding pictures without a vae tells you to connect the H3 video VAE.
Bundles are read-only here. Single-file RefMod bundles saved by ComfyUI-MiniMaxH3Mod 0.2.6 can be used, inspected and renamed in this pack's library, but not edited, and the node says so by name - you split one into standalone files with that pack's Save H3 RefMods node first.
One more thing worth knowing: if the RefMod has a partner voice file, editing the look generally writes through the pair, so adding a voice to a look that had none turns it into <name>_visual + <name>_audio. Check saved after you run it rather than assuming the filename.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| file | STRING | The look's file under models/refmods, e.g. characters/hero_visual. May be a voice-only file when only the voice changes. | |
| frames | STRING | JSON list giving the new frame order: stored frame indices (0-based) and "a0", "a1"… for the items in 'add'. Empty = stored frames unchanged, additions appended. | |
| add | STRING | JSON list of Media Loader items (pictures/clips) to encode and add. | |
| voice | STRING | A Media Loader item (audio, or a clip with sound) to replace the voice; 'remove' to drop it; empty = unchanged. | |
| latent_frames | INT | 221–1024 | Frames taken from the start of an added clip; 22 stores 7 frames, 39 stores 12, 56 stores 17. |
| audio_max_seconds | FLOAT | 30.00.5–600 | — |
| save_as | STRING | Save the result as a new RefMod with this name (folders allowed, e.g. characters/hero_v2) and leave the original untouched. Empty = overwrite the original. | |
| vaeopt | VAE | MiniMax H3 video VAE, for added pictures. | |
| audio_vaeopt | VAE | MiniMax H3 audio VAE, for a new voice. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| saved | STRING | — |