MVEx Latent Mask To Mask
See Exactly What Your Latent Mask Actually Looks Like
- mask
- vae
- masks
Debugging a latent-resolution mask by squinting at the numbers is miserable. MVEx Latent Mask To Mask is the visualization half of MaskVidExperiments' latent-mask pair: it expands a latent-resolution mask batch back to pixel resolution so you can actually look at what you're about to hand the sampler.
The honest catch is in the node description: it doesn't invent detail that the latent reduction already destroyed. Each latent frame paints every pixel frame in its group, and each token block paints as one value. Detail collapsed by the reduction stays collapsed - that's the point, not a bug. What you preview is exactly what the model acts on, token blocks and all, which is precisely the information you want before you burn a render.
How it works
It's the inverse of MVEx Mask To Latent Space, using the same compression geometry: auto reads spatial factor, frame grouping, and token grid off the connected VAE (including MiniMax H3's 2x2 token grid and chunked frame cycle), and manual lets you type the same grid in. Where Mask To Latent Space reduces pixel masks down, this expands latent masks up.
The inputs that matter
- mask - latent-resolution masks, one per latent frame.
- compression -
autowith the VAE connected is the easy path and the one that matches your model's real geometry. - vae - required when compression is
auto. - frames (default 0) - pixel frame count to paint. 0 uses the count the grid implies for the incoming latent frames. The one time you set it by hand: your source video has a frame count that's off the model's frame grid, and you want the preview to line up with the actual footage rather than the model's rounding.
Output is masks, pixel-space, one per frame - wire it to a mask preview or feed it to Subject Crop to see the latent mask composited on the footage.
Where you'd actually use it
Three uses, all quick. First: sanity-checking a Mask To Latent Space output before sampling - confirm the car really is masked out and the road isn't, before you spend five minutes on a clip. Second: reverse-engineering what the model sees on a mysterious latent you inherited in someone else's workflow. Third: teaching yourself the frame grouping - watching which pixel frames a latent frame paints makes causal VAE compression legible in a way reading the source never will.
Install
Same pack, same two commands as everything else. ComfyUI Manager, search "MaskVidExperiments", or:
cd ComfyUI/custom_nodes
git clone https://github.com/drozbay/MaskVidExperiments
restart ComfyUI. No weights, no dependencies beyond ComfyUI's own; the pack needs v0.15.0+ because it's built on the newer node API.
The one real gotcha is the same as its sibling: auto needs the VAE connected, or it throws. And remember frames defaults to the grid-implied count - if your preview looks like it's a frame or two short of your footage, that's the widget to touch. If the output looks blockier than your pixel mask, that's the token grid doing its job, not a failure.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | Latent-resolution masks, one per latent frame. | |
| compression | COMBO | auto: read the compression geometry from the connected VAE, including the exact frame cycle and 2x2 token grid of chunked models like MiniMax H3. manual: enter it directly. | |
| frames | INT | 00–16384 | Pixel frame count to paint. 0 uses the count the compression grid implies for the incoming latent frames. Set it explicitly to match a source video that is off the model's frame grid. |
| vaeopt | VAE | The VAE whose latents this mask matches. Required when compression is auto. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| masks | MASK | Pixel-space masks, one per frame. |