Nodes/ComfyUI-vlo/MiniMax H3 Guide Token Mask Preview
ComfyUI Node

MiniMax H3 Guide Token Mask Preview

See the mask the way the model sees it — on H3's token grid, not your pixels

By PxTicks·Created 3 months ago·Updated a day ago· 0
MiniMax H3 Guide Token Mask Preview
  • latent
  • mask
  • IMAGE
  • token_mask
strength1.00
mask_gamma1.00

Here's the frustration that made this node necessary: H3 doesn't apply your guide mask to the pixels you drew on. It pools the mask onto a grid of condition tokens - roughly one per 2×2 patch of the guide's VAE latent - and that quantized grid is what the model actually steers by. Your mask's careful feathered edge may land as a hard blocky boundary; a thin line you drew may fall entirely inside one token and quantize to solid; a mask that looked right at full resolution can be a different mask entirely after pooling. You can't diagnose any of that by looking at the source image. vloMiniMaxH3GuideTokenMaskPreview renders the mask the way the DiT actually receives it, so alignment and quantization stop being guesswork.

What it does

It takes the same geometry and options the masked-guide nodes do and pools your mask onto H3's condition-token grid exactly as the patch does - same area-averaging, same strength curve, same mask_gamma - then blows it back up with nearest-neighbour so you can actually see the blocks. The result is a faithful preview of the strength grid: smooth regions in your mask survive as smooth regions if they're big relative to a token; anything smaller than a token comes back as a hard-edged step.

Inputs are minimal and self-explanatory if you've met the family: latent (the target AV latent, for canvas size), mask (guide confidence, 1 = trust, 0 = corrupt), strength and mask_gamma. Outputs are an IMAGE (the upscaled, blocky visualization) and a token_mask MASK - the actual pooled grid as a mask tensor, if you want to feed it onward or composite it yourself.

How to actually use it

The pack's own guidance is blunt: use it whenever mask alignment is in doubt. Concretely, that's every time you're tuning a masked guide and the result doesn't match what you masked. Common failure this node exposes: your mask's sharp features were fine, but after the crop that fits the guide to the target's framing, they slid relative to the subject - and the preview shows the mask sitting half a token off the thing you meant to protect. It's also the fastest way to learn the mask polarity visually: if your "keep this region" mask previews as black where you expected white, remember this family is guide-confidence (1 = keep), the opposite of a denoise mask.

Caveats

It's a preview, not a renderer - it shows you the grid the masked-guide patch would build, which only matters once that patch is actually on the model (Patch Masked Guides). The whole family is experimental research code pinned to specific ComfyUI MiniMax-H3 internals, so if the compatibility gate trips on your ComfyUI build, that's the version gap, not your mask. Install the whole pack - git clone https://github.com/PxTicks/ComfyUI-vlo.git into custom_nodes/, restart, no pip deps. One nice thing: of the whole masked-guide lineup, this is the one node you can play with without generating a frame - instant feedback, no 42.5 GB model run wasted on a misaligned mask.

Categorymodel/conditioning/minimax

Inputs (4)

NameTypeDefaultDescription
latentLATENTThe target AV latent, for the canvas size.
maskMASKGuide confidence, not a denoise mask: 1 keeps the guide at full strength, 0 corrupts it to noise, values in between blend continuously. Must frame the same crop as the guide image.
strengthFLOAT1.000–1
mask_gammaFLOAT1.000.1–5

Outputs (2)

NameTypeDescription
IMAGEIMAGE
token_maskMASK