Load H3 RefMods
Stack up to eight saved references, LoRA-loader style
- mods
- prompt_hint
Once you've extracted a few RefMods, this is the node you'll live in. Load H3 RefMods is the LoRA-loader of the pack: eight slots, each with a mod name, a strength, and a copies count, all feeding one mods bundle downstream to Apply H3 RefMod. If you've stacked LoRAs in any ComfyUI workflow since 2023, the mental model transfers almost one-to-one - with one H3-shaped difference: every slot you fill costs real tokens in every DiT block, so this node is also your performance budget.
How it works
The dropdown lists every RefMod it can find across the registered refmods roots - models/refmods plus any mapping in extra_model_paths.yaml - scanning subfolders so a file at celebs/person.safetensors shows up as celebs/person. Only files carrying RefMod metadata (kind: image, video, or audio) appear, so it won't list random safetensors lying around. The loader returns a list of (mod, strength) pairs plus a prompt_hint string that merges each mod's stored concept_type and description - concat that onto your CLIP prompt if you want the text to say what the refs show.
The per-slot controls
Each of the eight slots has three widgets, and only two of them bite beginners:
- mod_1 … mod_8 - which saved mod loads, or
(none). - strength_1 … - how hard the reference is preserved. The math isn't an attention weight: for strength
wthe latent becomesw * latent + (1 - w) * blur(latent), so at 0.4 you get 40% original and 60% blurred - identity fades smoothly and stays plausible instead of dissolving into static. 0 skips the slot entirely. - copies_1 … - how many copies of the same ref to inject. This is the old manual row-duplication trick turned into a knob, and it does strengthen the reference - but each copy costs its full token count in every block. 2–3 copies is the sweet spot the tooltip calls out; 10x will be slow and VRAM-hungry for a marginal gain.
max_total_tokens (optional, 0 = off) caps the sum after copies and makes oversized bundles fail loudly instead of silently melting your sampler. show_info prints full details of every loaded mod to the console when you're debugging why something looks off.
Install
ComfyUI Manager, search "ComfyUI-MiniMaxH3Mod", or clone into custom_nodes/:
cd ComfyUI/custom_nodes
git clone https://github.com/Luisacaotica/ComfyUI-MiniMaxH3Mod
Restart. Deps are safetensors, numpy, Pillow - installed automatically by the Manager. The loaders ship with a ready-made vanellope_example mod in the repo, which is why that name appears in every dropdown before you've extracted anything. No model downloads; you still need real H3 weights and its video VAE in a current ComfyUI (and H3's licence is territory-restricted - US, EU, UK, Korea excluded).
Common issues
Newly saved mods don't appear until you refresh ComfyUI's node definitions (restart, or reload the frontend) - the dropdown is cached. If a file you deleted still loads, check for stale cache: the loader detects overwritten files, and None, empty string, "None" and "(none)" all skip a slot, but a name that resolves to a missing file raises a proper error. And remember strengths multiply downstream: Apply H3 RefMod's retention is a master gain over these per-row values, so a row at 0.5 with Apply at 0.5 lands at 0.25. When a shared workflow feels weak, that product is the first suspect.
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| show_info | BOOLEAN | false | Print full details (tokens, layout, source, pool) of every loaded mod to the console. |
| mod_1 | COMBO | RefMod 1 to load, or (none). | |
| strength_1 | FLOAT | 1.000–1 | How strongly this mod's reference is preserved. 1.0 = full ref (official behavior). Lower values blur the ref toward a softened copy of itself — identity fades smoothly and stays plausible instead of turning into static/noise texture. 0 skips the mod entirely. |
| copies_1 | INT | 11–10 | How many copies of this mod to inject (1 = normal, 2+ = the same ref repeated — the manual row-duplication trick as a knob, up to 10x). More copies = noticeably stronger reference, but each copy costs its full token count in every DiT block, so it slows down inference and eats VRAM — 2-3 copies is the sweet spot, 10x will be very slow. |
| mod_2 | COMBO | RefMod 2 to load, or (none). | |
| strength_2 | FLOAT | 1.000–1 | How strongly this mod's reference is preserved. 1.0 = full ref (official behavior). Lower values blur the ref toward a softened copy of itself — identity fades smoothly and stays plausible instead of turning into static/noise texture. 0 skips the mod entirely. |
| copies_2 | INT | 11–10 | How many copies of this mod to inject (1 = normal, 2+ = the same ref repeated — the manual row-duplication trick as a knob, up to 10x). More copies = noticeably stronger reference, but each copy costs its full token count in every DiT block, so it slows down inference and eats VRAM — 2-3 copies is the sweet spot, 10x will be very slow. |
| mod_3 | COMBO | RefMod 3 to load, or (none). | |
| strength_3 | FLOAT | 1.000–1 | How strongly this mod's reference is preserved. 1.0 = full ref (official behavior). Lower values blur the ref toward a softened copy of itself — identity fades smoothly and stays plausible instead of turning into static/noise texture. 0 skips the mod entirely. |
| copies_3 | INT | 11–10 | How many copies of this mod to inject (1 = normal, 2+ = the same ref repeated — the manual row-duplication trick as a knob, up to 10x). More copies = noticeably stronger reference, but each copy costs its full token count in every DiT block, so it slows down inference and eats VRAM — 2-3 copies is the sweet spot, 10x will be very slow. |
| mod_4 | COMBO | RefMod 4 to load, or (none). | |
| strength_4 | FLOAT | 1.000–1 | How strongly this mod's reference is preserved. 1.0 = full ref (official behavior). Lower values blur the ref toward a softened copy of itself — identity fades smoothly and stays plausible instead of turning into static/noise texture. 0 skips the mod entirely. |
| copies_4 | INT | 11–10 | How many copies of this mod to inject (1 = normal, 2+ = the same ref repeated — the manual row-duplication trick as a knob, up to 10x). More copies = noticeably stronger reference, but each copy costs its full token count in every DiT block, so it slows down inference and eats VRAM — 2-3 copies is the sweet spot, 10x will be very slow. |
| mod_5 | COMBO | RefMod 5 to load, or (none). | |
| strength_5 | FLOAT | 1.000–1 | How strongly this mod's reference is preserved. 1.0 = full ref (official behavior). Lower values blur the ref toward a softened copy of itself — identity fades smoothly and stays plausible instead of turning into static/noise texture. 0 skips the mod entirely. |
| copies_5 | INT | 11–10 | How many copies of this mod to inject (1 = normal, 2+ = the same ref repeated — the manual row-duplication trick as a knob, up to 10x). More copies = noticeably stronger reference, but each copy costs its full token count in every DiT block, so it slows down inference and eats VRAM — 2-3 copies is the sweet spot, 10x will be very slow. |
| mod_6 | COMBO | RefMod 6 to load, or (none). | |
| strength_6 | FLOAT | 1.000–1 | How strongly this mod's reference is preserved. 1.0 = full ref (official behavior). Lower values blur the ref toward a softened copy of itself — identity fades smoothly and stays plausible instead of turning into static/noise texture. 0 skips the mod entirely. |
| copies_6 | INT | 11–10 | How many copies of this mod to inject (1 = normal, 2+ = the same ref repeated — the manual row-duplication trick as a knob, up to 10x). More copies = noticeably stronger reference, but each copy costs its full token count in every DiT block, so it slows down inference and eats VRAM — 2-3 copies is the sweet spot, 10x will be very slow. |
| mod_7 | COMBO | RefMod 7 to load, or (none). | |
| strength_7 | FLOAT | 1.000–1 | How strongly this mod's reference is preserved. 1.0 = full ref (official behavior). Lower values blur the ref toward a softened copy of itself — identity fades smoothly and stays plausible instead of turning into static/noise texture. 0 skips the mod entirely. |
| copies_7 | INT | 11–10 | How many copies of this mod to inject (1 = normal, 2+ = the same ref repeated — the manual row-duplication trick as a knob, up to 10x). More copies = noticeably stronger reference, but each copy costs its full token count in every DiT block, so it slows down inference and eats VRAM — 2-3 copies is the sweet spot, 10x will be very slow. |
| mod_8 | COMBO | RefMod 8 to load, or (none). | |
| strength_8 | FLOAT | 1.000–1 | How strongly this mod's reference is preserved. 1.0 = full ref (official behavior). Lower values blur the ref toward a softened copy of itself — identity fades smoothly and stays plausible instead of turning into static/noise texture. 0 skips the mod entirely. |
| copies_8 | INT | 11–10 | How many copies of this mod to inject (1 = normal, 2+ = the same ref repeated — the manual row-duplication trick as a knob, up to 10x). More copies = noticeably stronger reference, but each copy costs its full token count in every DiT block, so it slows down inference and eats VRAM — 2-3 copies is the sweet spot, 10x will be very slow. |
| max_total_tokensopt | INT | 00–1048576 | 0 disables the budget (default). Positive values reject bundles exceeding this token count after copies; they do not compress references. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mods | H3_REF_MODS | — |
| prompt_hint | STRING | — |