Nodes/ComfyUI-vlo/MiniMax H3 Patch Masked Guides (experimental)
ComfyUI Node

MiniMax H3 Patch Masked Guides (experimental)

The node that makes H3 masked guides actually do something (and why it's pinned to a ComfyUI commit)

By PxTicks·Created 3 months ago·Updated a day ago· 0
MiniMax H3 Patch Masked Guides (experimental)
  • model
  • MODEL
guide_clockmatched
debugfalse

Every node in the ComfyUI-vlo "masked guide" family says the same quiet caveat in its description: needs the model to be patched with MiniMax H3 Patch Masked Guides; without that patch the mask is ignored. This is the patch. It's the node that takes a H3 model in, hands back a modified copy, and makes the per-token guide masks the other nodes build actually steer sampling. If you've wired up Add Masked Guide and seen no difference, you forgot this node - it's the single most important one in the experiment.

What "masked guide" means here

H3's guide images reach the DiT as a grid of condition tokens (roughly one per 2×2 patch of the guide's VAE latent). A guide-confidence mask - 1 = trust this part, 0 = make it maximally unreliable - is pooled onto that token grid, and the model is supposed to respect it per token. Stock H3 can't do that: it corrupts every guide row with one global noise coefficient and labels the whole guide with one timestep. This patch swaps in a forked copy of MiniMaxH3Model._forward that gives each guide token its own noise-augmentation coefficient and its own condition timestep, telling the model how unreliable each token is in the same vocabulary it already uses for its denoise masks.

Two details worth knowing. Samples with no masked guide run the stock path untouched, and a fully open mask is bit-identical to a stock guide - so this is safe to leave patched in. And the fork wraps only the innermost function, so other model patches chained after it (EasyCache, block swap, whatever) still apply, and the result doesn't depend on the order you chain model-patch nodes.

The one widget you'll care about: guide_clock

guide_clock (default matched) selects how a token's confidence becomes its timestep - this is the A/B the whole experiment exists to run:

  • stock - corrupt the latent per token, but label every guide row with one global timestep. Step one alone; the baseline.
  • floored - core's guard carried over: each token is labelled max(t_v, its noise). A token holding pure noise ends up labelled as clean as the target has become.
  • matched - label each token as noisy as it actually is. The default, and the honest reading of the feature.
  • target_relative - a zero-confidence token sits level with the target instead of at pure noise. It still carries no marginal information, but "no marginal info" is a different promise from "genuinely absent".

There's also a debug boolean that logs one masked-guide report per sampling run - turn it on when a masked region isn't behaving.

The honest catch

This is research code that forks ComfyUI internals, pinned to ComfyUI 0.33.0 (commit 5f0c4e18). The pack doesn't just trust the version number - it hashes the actual source of the functions it forks and refuses to run if your ComfyUI diverges, failing loudly instead of quietly diverging. If you see that incompatibility error, update or pin ComfyUI to a compatible build. There's an escape hatch (VLO_MASKED_GUIDE_ALLOW_UNVERIFIED) for people who've read the upstream diff and want to try anyway - the pack's own framing is that you should know what you're doing before you set it.

Install

Standard pack install, no pip deps:

cd ComfyUI/custom_nodes
git clone https://github.com/PxTicks/ComfyUI-vlo.git

restart, and make sure ComfyUI is a recent build with the native MiniMax H3 stack. H3 itself is a big model with a territory-restricted licence (US/EU/UK/Korea excluded), so this whole family only applies where you can legitimately run the weights.

Categorymodel/advanced/minimax

Inputs (3)

NameTypeDefaultDescription
modelMODEL
guide_clockCOMBOmatchedHow a guide token's confidence becomes a condition timestep. 'stock': corrupt the latent only, every guide row keeps one global timestep -- the baseline this feature has to beat. 'floored': label each token max(t_v, a), core's guard carried over; a token holding pure noise ends up labelled as clean as the target has become. 'matched': label each token as noisy as it actually is. 'target_relative': a zero-confidence token sits level with the target instead of at pure noise, so it carries no *marginal* information -- core's own denoise-mask row formula, read backwards.
debugBOOLEANfalseLog one masked-guide report per sampling run.

Outputs (1)

NameTypeDescription
MODELMODEL