MiniMax H3 Latent Spatial Resize
Resize a MiniMax H3 latent without stretching the audio into mush
- samples
- samples
Try to run core LatentUpscale on a MiniMax H3 latent and it just dies. Core expects one tensor; H3 hands it a NestedTensor holding two - video and audio - and LatentUpscale's .reshape call doesn't survive contact. MiniMaxH3LatentSpatialResize is the fix: it unwraps the NestedTensor, resizes only the spatial dimensions of the 5-D video tensor, leaves the audio tensor completely alone, and wraps it back up. If you need a different spatial resolution in an H3 pipeline, this is the node that does it without collateral damage.
The trap it exists to dodge
The pack's own README is blunt: the audio latent is 4-D, same rank as an image latent, so any utility that resizes "whatever is 4-D or 5-D" stretches the soundtrack. One 4-D tensor is the audio ((B, 32, 2, L), where L is time in latent samples) and one 5-D tensor is the video ((B, C, T, H, W)). This node touches only the 5-D one - that check is the entire point.
The inputs
samples- the H3 latent. If you somehow feed it a plain non-nested tensor it still resizes that (handy), and if the payload is something else entirely it raises a clearunsupported latent payloaderror instead of crashing obscurely.width,height- target size in pixels, divided by 16 for the latent (a tooltip you'll be glad of, since the geometry ispixels / 16spatially). Defaults are 1664×928.method-bicubic(default),bilinear,nearest-exact, orarea.
One output, samples, still carrying the audio untouched. It even resizes a noise_mask if one is attached, using nearest-exact so a mask stays hard-edged rather than bleeding.
The honest take on what it's for
The docstring pitches a two-stage run: sample small, resize the latent here, then re-sample at full size with denoise < 1 - no decode, no per-frame image upscaler in between. It sounds like a classic latent-upscale speed hack, and that's exactly what the README says doesn't pay off with H3. H3's sample depends on resolution in a way SD's didn't: upscale a 0.4 MP latent to 1.5 MP and you get a different clip, not a cheaper version of the same one. The author measured 705 s for the two-stage route against 845 s direct, and legible text never formed. So don't reach for this node expecting cheap full-res output.
Where it does earn its keep: conforming two latents to matching spatial shapes before a Latent Composite (which refuses shape mismatches), or feeding a region rewrite whose mask geometry you need to change. As a spatial conforming tool it's clean and safe; as a "cheaper hires" tool it's a trap the author already fell into for you.
Install
ComfyUI Manager, search MiniMax H3 Inpaint Tools, or:
cd ComfyUI/custom_nodes
git clone https://github.com/panghea/ComfyUI-MiniMax-H3-Inpaint-Tools
cd ComfyUI-MiniMax-H3-Inpaint-Tools && pip install -r requirements.txt
Restart, and it's under MiniMax H3/latent, next to Inspect and the other latent utilities.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | — | |
| width | INT | 166464–8192 | Target width in PIXELS; divided by 16 for the latent. |
| height | INT | 92864–8192 | — |
| method | COMBO | bicubic | 4 options: bicubic, bilinear, nearest-exact, area |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |