Apply H3 RefMod
Where your RefMods actually get injected into H3
- conditioning
- mods
- conditioning
- curve graph
Every other node in ComfyUI-MiniMaxH3Mod is building toward this one. Extract makes a reference latent, the loaders stack a few of them into a bundle, and Apply H3 RefMod is where that bundle stops being a file and starts steering the video. It's the only node in the pack that touches the actual conditioning, so if your refs are silently doing nothing, the problem is almost always somewhere on this screen.
What it does
Apply appends each mod's reference latent to the conditioning's minimax_refs list, which is exactly the path a native H3 reference image/video rides - the DiT attends to it through all its blocks like a real ref2va input. The trick is that the pack already compressed that latent for you, so you get reference-style conditioning at a fraction of the token cost.
It's friendly about which conditioning you feed it. The conditioning input accepts either the built-in CONDITIONING type from ComfyUI's core MiniMaxH3ReferenceToVideo node, or MINIMAX_H3_COND from the ComfyUI-MiniMaxH3 pack - it returns whatever type you gave it, so you don't need the sibling pack installed. That migration was the whole point of the unified node: older Apply H3 RefMod (Cond) workflows get rewritten to it automatically.
The inputs that matter
- retention - your master strength, multiplied with each loader row's strength. The tooltip maps it to MiniMax's levels: 1.0 =
fully_preserved, 0.7 =partially_preserved, 0.4 =attribute_transfer(style and attributes, not identity), 0.15 =weak_reference, 0 = nothing. Start at 1.0 and only drop it when the ref is drowning the scene. - curve_direction - the one that confuses everyone. It shapes an envelope across the ref's own frames (stacked images or video-ref latent frames), deciding which reference content dominates. It does not schedule anything in the output video.
constant(the default) keeps every ref frame at full strength; the oldconcept_at_enddefault faded early frames toward blur, which roughly halves average strength on multi-frame mods. Old saved workflows keep their old values, so if you load a shared graph and it feels weak, check this first. - override - flip this on and Apply reads retention + curve from config baked into the mod by Fix H3 RefMod Config instead of the widgets. If no mod in the bundle carries a config it prints a note and falls back to the manual params, so it never silently does nothing.
- scramble_seed - -1 (default) keeps refs in order. Give it a seed and it shuffles the bundle (and can keep a random subset), so a multi-ref mod "pops" a different character per run. Set its control-after-generate to randomize for per-run variation.
The curve graph output is an optional 1024×1024 debug image of the envelope - useful when you're using presets or override and want proof of which curve actually ran. Leave it unconnected.
Install
ComfyUI Manager, search "ComfyUI-MiniMaxH3Mod", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Luisacaotica/ComfyUI-MiniMaxH3Mod
Restart ComfyUI. Python deps (safetensors, numpy, Pillow) install automatically; nothing heavy. The pack downloads no models - but Apply is useless until you have real MiniMax H3 weights plus its video VAE in ComfyUI, and remember the H3 Community License excludes the US, EU, UK and Korea from running the local weights.
Common issues
Where people get burned: forgetting that Apply strength is a product - loader strength 0.3 times retention 0.4 is 0.12, which is basically air. Watch the console: Apply prints how many ref blocks were injected and the retention used. And don't reach for curve_direction when you want a ref that fades in over the generation - that's what H3 RefMod Step Curve is for, since it runs over the denoise timeline instead of the ref stack. The pack's README is upfront that neither axis is a guaranteed "identity then style" split; think of curves as levers, not promises.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | COMFY_MATCHTYPE_V3 | MINIMAX_H3_COND (ComfyUI-MiniMaxH3 pack) or CONDITIONING (core MiniMaxH3ReferenceToVideo). | |
| mods | H3_REF_MODS | Bundle from Load H3 RefMods / Load H3 RefMod Axis / Create H3 RefMod. | |
| override | BOOLEAN | false | Use the config fixed into the mods' own metadata (by 'Fix H3 RefMod Config') instead of the widgets below: retention + curve come from the first mod in the bundle that carries one. Handy for sharing mods whose magic settings took real tuning. Off (default) = use the manual parameters. If no mod has a saved config it falls back to the manual parameters and prints a note. |
| retention | FLOAT | 1.000–1 | Master reference strength, multiplied with each loader row's strength. MiniMax retention levels: 1.0 = fully_preserved, 0.7 = partially_preserved, 0.4 = attribute_transfer (keep style/attributes, not identity), 0.15 = weak_reference. 0 = no reference. |
| curve_direction | COMBO | constant | Weighting envelope across THIS MOD'S OWN ref frames (stacked images / video-ref latent frames) — i.e. WHICH reference content dominates, NOT where the concept appears in the output video (ref tokens are not bound to output time; for output-timing control use the 'H3 RefMod Step Curve' node instead, which runs over the denoise timeline). 'constant' (default) = every ref frame at full strength (official-ref parity). The old default 'concept_at_end' fades early stack frames toward blur, roughly HALVING average strength on multi-frame mods. Old saved workflows keep their saved values. |
| scramble_seed | INT | -1-1–2147483647 | Ref scrambling seed. -1 (default) = off: all refs in saved order. With 2+ refs in the bundle, a seed >= 0 shuffles the ref order and keeps a random subset, so a different ref leads each run (a multi-ref mod 'pops' a different video/image per seed). Same seed = same scramble; set this widget's control-after-generate to 'randomize' for per-run variation. |
| curve_shape | COMBO | linear | How the weighting travels between its endpoints: 'linear', 'ease' (smoothstep), 'sigmoid'/'tanh' (S-curves, tanh with a steeper knee), 'quadratic', 'cubic', 'exponential', 'stair' (stepped), 'elastic' (overshoots), 'bump'/'dip' (peak/trough mid-stack). Only matters when curve_direction != constant. |
| curve_value | FLOAT | 1.000–1 | Endpoint weight ('user input'): both endpoints for 'constant' and 'concept_at_ends', the start for 'concept_at_start', the end for 'concept_at_end', the mid peak for 'concept_at_middle'. On single-image ('image'-kind) mods this acts as a simple STRENGTH CAP (directions are meaningless on one frame): 0.4 = the ref blends 40% toward its blurred self. |
| graph_presetopt | COMBO | (none) | Optional shared graph preset — leave on '(none)' to use the curve widgets above. Selecting one loads direction/shape/value from a saved debug-grid PNG (graph embedded in its metadata) or a legacy .json, in models/refmods/graph_presets/. Share the preset PNG itself to share a curve. New presets appear after a restart. |
| scramble_modeopt | COMBO | shuffle | 3 options: shuffle, subset, legacy_subset |
| scramble_keepopt | INT | 11–80 | Refs retained in subset mode; shuffle keeps all refs. |
| max_total_tokensopt | INT | 00–1048576 | Total reference token budget after copies; 0 disables the limit. |
| save_preset_asopt | STRING | Optional: type a name and run to save the current (resolved) curve as a PNG preset — the curve graph itself with the graph embedded in its metadata — in models/refmods/graph_presets/. Share that image to share the curve. Leave empty to skip. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | COMFY_MATCHTYPE_V3 | The conditioning with the ref blocks injected, same type as the input. |
| curve graph | IMAGE | Optional 1024x1024 curve graph: the strength envelope (direction/shape/value) with the concept zone shaded. Leave unconnected to skip the preview. |