Nodes/ComfyUI-UtilsCollection/MiniMax H3 Ref Apply
ComfyUI Node

MiniMax H3 Ref Apply

Attaching References to H3 Conditioning Without a Model Patcher

By silveroxides·Created 3 months ago·Updated about 12 hours ago· 35
MiniMax H3 Ref Apply
  • conditioning
  • refs
  • conditioning
retention1.00
max_ref_tokens0

This is where the MiniMax H3 reference workflow actually lands: UC_MiniMaxH3RefApply takes the conditioning your prompt already produced, appends one or more references to it, and gives you back conditioning you can feed the sampler in the original's place.

The design choice worth appreciating is what it doesn't do. No model patcher, no sampler wrapper, no hooks - it's ordinary native conditioning. That means it composes with whatever else your graph is doing, and it means a broken reference shows up as a conditioning error rather than as mysterious behaviour three nodes downstream. It's also why it adds no prompt labels and no learned trigger words: nothing here knows what your reference is.

Inputs

conditioning comes from your H3 workflow. Existing settings and existing references are kept - this node appends, it doesn't replace.

refs is the autogrow input where you plug in references from MiniMax H3 Ref Extract, MiniMax H3 Audio Ref Extract or MiniMax H3 Ref Load. Input order is preserved and the references stay separate - the model sees them in the order you connected them, which is exactly why ref files are saved and loaded individually.

retention (0–1, default 1) is the one field people misread, so here's what it does: it controls how much detail is kept in the references connected to this node compared with a low-passed version of the same latent - at 1 you get the full stored detail, lower values blend toward the softened version, and 0 leaves those references out entirely. It is not an attention strength, not a conditioning weight and not a denoising curve. Existing references on the conditioning are unaffected by it. If you came from ControlNet looking for a strength dial, this is a blunt one: it decides how much detail the reference contributes, not how strongly the model listens.

max_ref_tokens (0 = no limit) is a guardrail. It counts the total reference tokens - including references already on the conditioning - and if the sum would exceed your limit, it raises an error. It doesn't resize, prune or drop anything to fit. I'd call that the right call, since silently dropping references would be a nightmare to debug, but it does mean you set the ceiling and then do the trimming yourself.

Output

conditioning, wired into your sampler in place of the original. Same type, so nothing else in the graph needs to change.

Install

Manager → search "ComfyUI-UtilsCollection", or:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
# restart ComfyUI

Nothing to download; it operates on latents you already have. The pack's requirements.txt installs opencv-python, huggingface_hub, unifiedefficientloader and typing-extensions, and the collection imports kornia at load without listing it - missing kornia means the whole pack's nodes vanish from the menu.

You'll want the rest of the family installed too, since a ref has to come from somewhere: Ref Extract (images and video frames), Audio Ref Extract (audio), Ref Load (saved files), Ref Save (writing them out).

Where people get burned

Token budget is the big one. Every reference you attach spends context, and a video reference is not cheap - that's why the extract side offers compression at all. max_ref_tokens is how you find out before sampling instead of during, and the info string on the extract/load nodes prints the per-reference cost so you can do the arithmetic yourself. Set the limit generously at first, watch what your normal workflow costs, then tighten it.

The second one is a plan-level thing: retention and reference detail are not the same lever as "how much does this reference matter." If the output is ignoring your reference, the fix is usually a clearer reference (higher reference_resolution, or encode compression instead of pooled), not retention at 1.0 on a reference that was already blurred by the extract step. Compress once, upstream, deliberately.

And the honest limit from the README: this suite does native conditioning references, nothing more. There's no voice-cloning guarantee on audio refs, no custom merging, no time-varying reference curves, and no identity binding between a video reference and its soundtrack. If you need a specific reference-node package's behaviour, use that package.

Categoryadvanced/conditioning

Inputs (4)

NameTypeDefaultDescription
conditioningCONDITIONINGConnect conditioning from your MiniMax H3 workflow. Existing settings and references are kept.
retentionFLOAT1.000–1Detail to keep in the references connected here. 1 keeps all stored detail; lower values soften detail; 0 leaves these references out. Existing references are unchanged.
max_ref_tokensINT0Optional reference-size limit, measured in tokens. Includes existing references. 0 means no limit; exceeding a limit reports an error instead of removing detail.
refsCOMFY_AUTOGROW_V3Connect one or more references to add. Input order is preserved; references remain separate.

Outputs (1)

NameTypeDescription
conditioningCONDITIONINGConnect to your sampler in place of the original conditioning.