ComfyUI Node

MiniMax H3 Aicg 分段解码

Segment Decode is the node that turns your pile of latents into an actual mp4

By JGRFW·Created about a month ago·Updated about 13 hours ago· 261
MiniMax H3 Aicg 分段解码
  • segments
  • preview

If you've been following the AICG3D (短剧工作台) chain, the segments have been sitting as latents the whole time. AICG3D_H3SegmentDecode - labelled MiniMax H3 Aicg 分段解码 in the node menu - is where they finally become something you can watch. It's the last step of the "I want a preview of this" path, and the second-to-last of the "I want it at 720p" path.

MiniMax H3 is a 33B omni-modal model that generates picture and audio together, and the pack's whole idea is to cut a long video into context segments, sample them one after another carrying the tail of each into the next. That's great for coherence, and terrible for memory if you then try to hold a five-minute 1080p clip in one tensor. This node exists to dodge that.

How it actually decodes

It doesn't build a giant frame buffer. It walks the segment list and, for each one, VAE-decodes just that segment's latent, slices off the head frames that belonged to the previous segment, and pipes the raw RGB bytes into one long-lived FFmpeg process that's been encoding since the first frame. H.264, veryfast, CRF 18, yuv420p, faststart. The encoder never restarts, so the file is one continuous stream, not a stitched concatenation.

Audio gets the same treatment but separately: each segment's audio latent is decoded through the audio VAE, trimmed to the delivered frame window, and written as raw f32le PCM. At the end the two temp files are muxed - video copied without re-encoding, audio encoded to AAC - and the result is handed downstream as a VIDEO object backed by that file in ComfyUI's temp directory. Peak RAM therefore scales with one segment, not with the length of the film.

Two extras. If cross-segment exposure lock is on in the plan, the seam matcher runs on each decoded segment before it reaches the encoder - that's what stops brightness stepping at every cut. And on the selected-video route, the "cleanup after run" policy you set upstream is finally executed here, because decoding is the last heavy thing in the chain; that's the right place to unload a model, not halfway through sampling.

Inputs and outputs

One input, one output, and that's the whole node:

  • segments (MINIMAX_H3_SEGMENTS) - the plan. Wire it from MiniMax H3 Aicg 分段采样 for a quick preview, or from 分段二采 if you did a second pass.
  • preview (VIDEO) - the muxed video. Feed a Save/Preview video node, or anything else that takes a VIDEO.

There are no widgets. If you're looking for a CRF setting or an audio bitrate, there isn't one - the encode is fixed on purpose.

Install

Through ComfyUI Manager, search AICG3D (or 短剧工作台 / MiniMax H3) and install; the pack has been in the Comfy Registry since v1.1.11 under publisher aicg3d. Manual is the usual:

cd ComfyUI/custom_nodes
git clone https://github.com/JGRFW/comfyui-AICG3D
# restart ComfyUI, then hard-refresh the browser (Ctrl+F5)

The only hard dependency this specific node adds is FFmpeg, and the pack pulls imageio-ffmpeg in as a wheel, so you usually don't have to do anything. If you prefer a system FFmpeg, that works too - the lookup order is imageio's bundled binary first, then ffmpeg.exe on PATH, then whatever VHS_FORCE_FFMPEG_PATH points at.

Common issues

"Missing FFmpeg" after what looked like a clean install. This is the pack's most common complaint, and it's almost always a Python-environment problem: the wheel went into a different interpreter than the one ComfyUI is running under. Install it explicitly with the right one:

# Windows
python_embeded\python.exe -m pip install imageio-ffmpeg
# Linux / macOS venv
/path/to/ComfyUI/venv/bin/python -m pip install imageio-ffmpeg

Then restart ComfyUI. Don't install into system Python and expect the node to find it.

It refuses the plan. The node validates that the segments object carries a real H3 model bundle, and errors with something like "the segment result has no MiniMax H3 bundle" if you hand it a stale or cross-wired plan - e.g. a segment result from a different context than the one you also plugged into Refine. Rebuild the chain from the context node rather than mixing halves of two workflows.

Disk, not RAM, is your limit. Temp files live under ComfyUI's temp folder. A long film at 1080p leaves a large intermediate MP4 plus a raw PCM file there until the run finalizes. If a long render dies at the very end with a write error, check free space before you suspect the model.

One last thing that trips people up: this node has no filename widget. It decodes, it doesn't save. If you want the file in output/, put a save-video node after it - or use 最终合成视频 instead, which decodes and saves in one move.

CategoryAICG3D/提示词与 Skill

Inputs (1)

NameTypeDefaultDescription
segmentsMINIMAX_H3_SEGMENTS—

Outputs (1)

NameTypeDescription
previewVIDEO—