Nodes/ComfyUI-MiniMaxH3-Myang/沐阳 H3 · 参考视频分辨率(内部)
ComfyUI Node

沐阳 H3 · 参考视频分辨率(内部)

Keep reference video memory sane, capped at 1080P

By civilcoco·Created 3 days ago·Updated 3 days ago· 1
沐阳 H3 · 参考视频分辨率(内部)
  • image
  • 参考视频
resolution匹配参考视频原分辨率
width1920
height1080

Here's a failure mode this node exists to prevent: you feed the Director a reference video at 4K "because it's the best quality," and the resize step quietly tries to build an NCHW tensor for every frame at once, and ComfyUI dies with an out-of-memory error that looks unrelated to anything you did. 沐阳 H3 · 参考视频分辨率(内部) (H3ReferenceResize) is the Director's reference-video preprocessing: it resizes the action reference to a sane canvas, aspect-preserving, with a hard cap at 1080P.

The cap is the thoughtful part. The resolution presets preserve the source aspect ratio, and the 1080P limit is orientation-aware - landscape fits inside 1920×1080, portrait inside 1080×1920. The source comment spells out the motivation: it prevents an ultra-wide or typo'd custom resolution from silently creating a multi-gigabyte tensor. Long videos are processed one segment at a time in this pack, so VRAM headroom is the whole game, and an unchecked 4K or 8K reference would eat it before generation even starts.

There's a second efficiency detail: the resize runs in chunks of 16 frames at a time rather than all at once, using Lanczos (comfy.utils.common_upscale). That's the difference between streaming a long reference through the GPU and trying to park the whole thing in memory. If the target size already equals the source, it short-circuits and returns the frames untouched - no pointless resample.

Inputs

  • image - the reference video as an IMAGE batch.
  • resolution - presets, default "匹配参考视频原分辨率" (match the source). The other presets cap to a target canvas.
  • width / height - used for custom canvases, defaulting to 1920×1080; the width input is capped at 1920.

Output: 参考视频 (IMAGE), the resized, chunk-streamed clip.

Install and context

Pack install is the usual: ComfyUI Manager search "ComfyUI-MiniMaxH3-Myang", or git clone https://github.com/civilcoco/ComfyUI-MiniMaxH3-Myang into custom_nodes, restart. No extra Python deps.

It's an internal Director node - you'll see it in the expanded motion-transfer graph between the reference input and the slicer. If you're running a long action-transfer job and memory is tight, the relevant knobs are here and in the pack's 参考视频分辨率 setting on the Director itself (matching original resolution is the default; the cap is always 1080P). And the pack-wide reminder: H3's local weights sit under a territory-restricted community license (US/EU/UK/South Korea excluded), so check terms before you build a project on them.

Category沐阳 H3/导演台/内部

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
resolutionCOMBO匹配参考视频原分辨率13 options: 匹配参考视频原分辨率, 360P, 416P, 480P, 540P, 640P, +7
widthINT192032–1920
heightINT108032–1920

Outputs (1)

NameTypeDescription
参考视频IMAGE