Create H3 RefMod Master (PK)
Save your reference set once, stop re-cropping it
- refs_image
- refs_video
- refs_bundle
- vae
- mods
- details
What this node is actually for
MiniMax H3 reads text, images, video and audio as one packed context, so "here are three photos of my character, keep the face" is native, not an IP-Adapter bolt-on. The catch is plumbing: you re-wire the same folder of reference stills into every graph. A RefMod solves that - a saved bundle of VAE-encoded references in models/refmods/ that a loader pulls back by name, like a LoRA. It's the no-training route to a consistent character: the references ride in context through every sampling step instead of you training weights.
Create H3 RefMod Master (PK) builds one. Point it at your references and it encodes them into an H3_REF_MODS bundle; with save on, that bundle goes to disk so the next workflow loads my_concept from a dropdown.
The honest part first: it's a shim, and that's fine
It's not a reimplementation. It mimics Luisacaotica's Create H3 RefMod Master from ComfyUI-MiniMaxH3Mod: the schema is mirrored from the upstream class at load time, and upstream's own code does the extraction, the token budgeting and the saving. The bundle format stays exactly as that pack defines it.
What PlagueKind adds is one patch. Upstream computes a single shared canvas anchored on reference 1 and centre-crops every reference into it. That's necessary when refs stack into one latent - one tensor needs one height and width - but upstream did it in the mode where each reference keeps its own latent too, silently cropping your portrait-plus-landscape set to whatever reference 1 was. Set image_refs to separate and the PK version drops the canvas, downsamples each ref on its own and keeps each aspect. Set it to stack and nothing changes except the console now says out loud that refs are being cropped.
That's the whole pitch - feed it same-aspect refs and it's the same node as upstream.
Inputs worth setting
name is the identifier you'll see in the Load H3 RefMods dropdown later, and save decides whether the mod exists after this run at all. With save on, the file lands in models/refmods/, plus subfolder if you want it tidier than one flat pile.
mode is the big one. Full Reference stores the VAE encode as-is; Compressed Reference pools it to a grid. Full is more faithful and eats more context budget - compressed is what you reach for when a ref set gets expensive. max_tokens is a hard ceiling on what the mod injects (0 turns the ceiling off) and ref_resolution is the target short edge, downscale only - it will never blow a small reference up.
Then there's extraction_preset, which trips people up: identity_encode forces encode mode regardless of what mode says, style_experimental and motion_sequence force training-style extraction. Only manual honours your mode choice. If your mode widget looks like it's being ignored, look here first.
Wire the vae input - the H3 video VAE, same as the official ref2video node. The socket is optional in the schema; execution isn't.
Outputs
mods is the H3_REF_MODS bundle: hand it straight to a consumer, or save it and reload it later through Load H3 RefMods - or the pack's RefMod Loader Stack, which wraps that node. details is a plain string report - put a Show Text node on it for your first few runs; it's the only place you see what got budgeted.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/PlagueKind/ComfyUI-PlagueKind-Nodes
It's in ComfyUI Manager too, search "PlagueKind". Restart after.
And then install the upstream pack, because this node will not run without it. Search "MiniMaxH3Mod" in ComfyUI Manager, or clone ComfyUI-MiniMaxH3Mod into custom_nodes yourself and restart. The pack is otherwise dependency-free - nothing to pip, and optional pieces log a warning and degrade instead of killing startup. (Separate issue: H3's weights are territory-restricted out of the US, EU, UK and South Korea. The node's fine; the licence is the licence.)
Where it goes wrong
Without ComfyUI-MiniMaxH3Mod the node still shows in your menu - deliberately, so the missing dependency is discoverable - and throws a "requires the ComfyUI-MiniMaxH3Mod pack" error the moment you queue. It resolves the upstream class exactly once, at load time, so load order matters: the upstream folder must come before ComfyUI-PlagueKind-Nodes. Keep it named ComfyUI-MiniMaxH3Mod and it sorts first; rename it to something alphabetically later and you get the fallback schema and the same error with both packs installed. Restart after fixing the name.
Last one: a freshly saved mod doesn't appear in the loader dropdown until node definitions refresh - restart or reload before assuming the save failed.
Worth it?
If your reference sets are mixed-aspect, yes - and only because of that patch. It's a bug fix wearing a node's clothes. If they aren't, use the upstream node directly; the bundle, save format and outputs are identical either way.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | my_concept | Saved mod name (appears in the Load H3 RefMods dropdown after a reload). |
| mode | COMBO | Compressed Reference | Full Reference stores the VAE encode; Compressed Reference pools it to a grid. |
| ref_resolution | INT | 1024256–2048 | Target short edge in px (downscale only, never upscale). |
| max_tokens | INT | 5120 | Hard cap on the total tokens the mod injects (0 = no cap). |
| save | BOOLEAN | true | Save the mod to models/refmods/ so Load H3 RefMods can pick it up later. |
| description | STRING | Optional text describing the concept (stored in the mod; documentation only). | |
| refs_imageopt | COMFY_AUTOGROW_V3 | — | |
| refs_videoopt | COMFY_AUTOGROW_V3 | — | |
| refs_bundleopt | H3_REF_LIST | All images/videos from a Load H3 RefMod Folder node, appended after the autogrow refs (bulk extraction). Requires ComfyUI-MiniMaxH3Mod. | |
| vaeopt | VAE | The MiniMax H3 video VAE (same as the official H3 ref2video node). Required at execution. | |
| subfolderopt | STRING | Optional folder inside models/refmods. | |
| extraction_presetopt | COMBO | manual | Preset extraction behavior (upstream semantics). |
| image_refsopt | COMBO | stack | stack: all references become one video-kind ref. separate: each reference is its own member, each keeping its own resolution/aspect (the PK canvas fix; the upstream center-cropped every ref to reference 1's canvas). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mods | H3_REF_MODS | The extracted RefMod bundle (same type as the upstream nodes; feed it to the Load H3 RefMods chain). |
| details | STRING | — |