Nodes/ComfyUI-MiniMaxH3Mod/Apply H3 RefMod
ComfyUI Node

Apply H3 RefMod

Where your RefMods actually get injected into H3

By Luisacaotica·Created 26 days ago·Updated about 20 hours ago· 125
Apply H3 RefMod
  • conditioning
  • mods
  • conditioning
  • curve graph
overridefalse
retention1.00
curve_directionconstant
scramble_seed-1
curve_shapelinear
curve_value1.00
graph_preset(none)
scramble_modeshuffle
scramble_keep1
max_total_tokens0
save_preset_as

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 old concept_at_end default 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.

CategoryMiniMax-H3/mod

Inputs (13)

NameTypeDefaultDescription
conditioningCOMFY_MATCHTYPE_V3MINIMAX_H3_COND (ComfyUI-MiniMaxH3 pack) or CONDITIONING (core MiniMaxH3ReferenceToVideo).
modsH3_REF_MODSBundle from Load H3 RefMods / Load H3 RefMod Axis / Create H3 RefMod.
overrideBOOLEANfalseUse 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.
retentionFLOAT1.000–1Master 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_directionCOMBOconstantWeighting 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_seedINT-1-1–2147483647Ref 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_shapeCOMBOlinearHow 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_valueFLOAT1.000–1Endpoint 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_presetoptCOMBO(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_modeoptCOMBOshuffle3 options: shuffle, subset, legacy_subset
scramble_keepoptINT11–80Refs retained in subset mode; shuffle keeps all refs.
max_total_tokensoptINT00–1048576Total reference token budget after copies; 0 disables the limit.
save_preset_asoptSTRINGOptional: 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)

NameTypeDescription
conditioningCOMFY_MATCHTYPE_V3The conditioning with the ref blocks injected, same type as the input.
curve graphIMAGEOptional 1024x1024 curve graph: the strength envelope (direction/shape/value) with the concept zone shaded. Leave unconnected to skip the preview.