ComfyUI Node

Fantastic H3 Create RefMod

Six photos and a voice recording, saved as one reusable reference

By Adudeguyman·Created about a month ago·Updated about 18 hours ago· 151
Fantastic H3 Create RefMod
  • image
  • audio
  • vae
  • audio_vae
  • mods
  • saved
name
subfolder
modeCompressed Reference
ref_resolution1024
grid16
latent_frames22
refinement_steps500
max_tokens5120
audio_max_seconds30.0
concept_typegeneric
description
write_previewtrue
source

The pitch

A character you can reuse, without training anything. You feed this node a few photos of the same person - or a clip of a place, or a clean recording of a voice - and it encodes them once into a small latent file in ComfyUI/models/refmods. After that, every prompt you write can cite that file, and you never re-upload or re-crop anything. The format comes from ComfyUI-MiniMaxH3Mod (MIT), and both packs read each other's files.

You will mostly meet this node as the machinery behind the Create tab of the RefMod library - clicking Create there queues it like any workflow job, which is why you get a progress bar and can watch it in the queue panel. But it works standalone in a graph too, with IMAGE and AUDIO inputs, which is the route if you want to batch-generate RefMods from a folder of photos.

One warning before you spend an evening on it: this is a young concept. There is essentially no community consensus yet on how many photos is enough, or how Compressed looks for a given subject. Make a Full one and a Compressed one of the same character and run the same prompt through both. Ten minutes, and you'll know.

What it actually does

Several pictures or clips are stacked into one RefMod, one frame each. The first source sets the frame size and aspect ratio and everything else is fitted to it - trimmed in Full, squeezed in Compressed - which is why the library nags you to put your best-framed photo first. A clip contributes consecutive frames from its start (after any trim), so motion is real rather than a slideshow of evenly spaced picks.

Full keeps as much detail as it can and is heavier to sample with. Compressed encodes a small grid and then refines it toward the full encode for refinement_steps - you get colours, layout, shapes and style, not fine detail. Faces, products and readable text want Full; settings, moods and big reference sets want Compressed. Compressed is also the wrong choice for motion: it won't carry movement.

If a look and a voice go in together, they're saved as a pair: <name>_visual and <name>_audio. Same card, same row, two files.

The settings a beginner actually touches

  • name and subfolder - the file name, and an optional folder under models/refmods like characters.
  • mode - Full Reference or Compressed Reference.
  • ref_resolution - the short edge each source is scaled down to before encoding. It never upscales.
  • latent_frames - clips only; how many frames come off the start. H3 stores frames in chunks, so 22 stores 7, 39 stores 12, 56 stores 17, and anything between is rounded down to the nearest of those.
  • audio_max_seconds - how much of the recording becomes the voice, counted from the beginning.
  • concept_type - what this thing is (identity, clothing, background, voice, style…). It doesn't change the encoding, but the Prompt Builder's Draft from RefMods uses it to write sensible definition lines for you, so pick honestly.
  • max_tokens - refuse to save a look over this size. 0 disables. Note the behaviour: it refuses rather than dropping frames to fit.
  • source - JSON naming a Media Loader item or a list of them. The library fills this in; you'd write it by hand only when scripting.
  • Optional inputs image, audio, vae, audio_vae.
  • Outputs: mods (the bundle, so you can chain straight into Text Encode) and saved (where it landed on disk).

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. You need ComfyUI 0.30.0+, the H3 video VAE for anything with pictures and the H3 audio VAE for voices, plus the usual H3 checkpoints for generating afterwards. The pack's only pip dependency is av.

Where people get burned

The errors are specific, which helps: "Connect the MiniMax H3 video VAE to 'vae' to encode the look" means exactly that, and the audio VAE equivalent is the same. Nothing connected at all gets "Nothing to encode". Over your token limit, the create button stays locked and says why - the honest fixes are lower resolution, Compressed, a higher limit, or fewer sources.

Then the two surprises that aren't errors. A RefMod built from several photos is cited in prompts as a <Video> - a stack of frames is a video as far as H3 is concerned. A single photo is a <Picture>. And a voice always becomes its own <Audio> label, even though it lives in the same card.

Sharing is just files: copy the .safetensors and any same-named preview image from models/refmods to the other install's models/refmods.

Categoryconditioning/video_models

Inputs (17)

NameTypeDefaultDescription
nameSTRINGFile name. A look plus a voice is saved as <name>_visual and <name>_audio.
subfolderSTRINGFolder under models/refmods, e.g. characters.
modeCOMBOCompressed ReferenceFull keeps the most detail and is heavier to use. Compressed keeps the overall look and is much lighter.
ref_resolutionINT1024256–2048Short edge each source is scaled down to before encoding (never up).
gridINT162–64Compressed: size of the small grid on its long edge. 16 is up to 64 tokens per frame.
latent_framesINT221–1024Clips: how many frames to take from the start of the clip (after its trim). H3 stores 2 frames for up to 17 and 5 more per 17 after that, so 22 stores 7, 39 stores 12, 56 stores 17; anything between is cut down to the last of those.
refinement_stepsINT5000–5000Compressed: how long the small grid is refined toward the full encode.
max_tokensINT51200–1048576Refuse to save a look over this many tokens. 0 = no limit.
audio_max_secondsFLOAT30.00.5–600Voice: seconds kept from the start of the joined audio.
concept_typeCOMBOgeneric11 options: generic, identity, pose_motion, clothing, background, voice, +5
descriptionSTRINGShown in the library.
write_previewBOOLEANtrueSave the first frame as <name>.png beside the file for the library's thumbnail.
sourceSTRINGMedia Loader item, or a list of them, as JSON. Filled by the RefMod library.
imageoptIMAGELook: one image, or a clip's frames at 24 fps. Replaces the source's pictures and clips.
audiooptAUDIOVoice. Replaces the source's audio.
vaeoptVAEMiniMax H3 video VAE.
audio_vaeoptVAEMiniMax H3 audio VAE.

Outputs (2)

NameTypeDescription
modsH3_REF_MODS
savedSTRING