MinimaxH3_base / ComfyUI-H3-Multishot v1.4.txt
EllaPriest45's picture
Upload 2 files
f8c3e95 verified
Raw
History Blame Contribute Delete
5.6 kB
ComfyUI-H3-Multishot v1.4
ComfyUI-H3-Multishot
Multishot video+audio generation for MiniMax-H3 in ComfyUI: one script, N chained shots, one seam-clean master. Plus a dual-format model loader (safetensors + GGUF) and the GGUF architecture patch H3 needs.
v1.4 - sampler and scheduler exposed on both multishot samplers, and the bundled workflows relabelled so every node states its job. See Changelog.
Nodes
H3 Keyframes (any position) - anchor images anywhere in the clip, not just the first and last frame. Stock ComfyUI raises only first/last keyframe anchors are supported; that is a positional-maths limit, not a model limit (see the changelog). Six anchor slots plus an unbounded images_batch, each positioned as a percentage (0%, 50%, 100%), an absolute frame index (0, 121, 242), or an inclusive range (0-9, 352-361). A descending range such as 30%-20% reverses that section of the batch.
H3 Condition Strength - how strongly keyframe/reference conditioning is trusted. Exposes minimax_visual_cond_noise_aug and minimax_audio_cond_noise_aug, which ComfyUI core reads but no stock node writes, so they were pinned at their defaults.
H3 Reference Audio (stereo guard) - forces a reference clip to stereo 32 kHz. A mono reference crashes the sampler with an unhelpful shape mismatch, because the layout reserves two channels and nothing in stock converts them.
H3 Multishot Sampler (one node) - the whole pipeline: paste a script (one prompt per shot, --- between shots; JSON {"prompts": [...]} also accepted), set shot_count (0 = one shot per prompt, 1-8 forces it), and get master frames + master audio out. Each shot chains from the last frame of the previous one; the duplicated seam frame and its 1/24s of audio are trimmed automatically.
start_image (optional, v1.1) - connect a LoadImage and shot 1 starts from that frame (image-to-video). Leave it unconnected for pure text-to-video; behaviour is unchanged. Shot 1 keeps its first frame (no seam trim), so the image you supply is the image you get.
H3 Model Loader (safetensors + GGUF) - one dropdown for both formats. GGUF files route through ComfyUI-GGUF automatically.
H3 CLIP Loader (safetensors + GGUF) - the same treatment for text encoders; GGUF encoders auto-pair their -mmproj vision sidecar so image referencing keeps working.
H3 Shot List - the same script parser as separate STRING outputs, for the expert graph.
H3 Multishot Sampler + Memory (long form) - for 2-5 minute videos (12-30 shots) where plain chaining drifts. Stock chaining shows each shot ONE image (the previous shot's last frame), so every hop can only see one hop back and identity error compounds. This node splits the two jobs: the keyframe stays the most recent frame (seams stay smooth), while the memory shown to the encoder is a persistent anchor from the start of the piece plus the last N shot-end frames. The anchor never changes, so drift cannot compound. Knobs: anchor_frames (1 = on, the long-chain fix) and memory_frames (recent frames, 0 = stock behaviour).
H3 Optional Image (I2V on/off) - a real toggle for an optional image input. A normal switch node cannot express "no image" (both branches are required), so turning I2V off usually ends up feeding a black placeholder frame - which is not text-to-video, it is video that starts from black. This node emits nothing when disabled.
H3 Audio Trim Start - trim N seconds from the front of an AUDIO clip (seam-sync helper for hand-built chains).
Install
Clone into custom_nodes/ (or install via ComfyUI-Manager > Install via Git URL).
For GGUF models: install ComfyUI-GGUF, then run python apply_gguf_arch_patch.py from this folder (one line, idempotent - teaches it the minimax_h3 architecture).
Restart ComfyUI, load workflows/H3_Multishot_AIO.json.
Requires ComfyUI v0.30.0+ (native MiniMax H3 support).
Models
GGUF quants (Q5_1 for 24-32GB cards, Q4_0 for 16GB): joeygambino/MiniMax-H3-GGUF - the card there also documents why K-quants (Q6_K etc.) are impossible for this architecture. Workflows also live on HF: MiniMax-H3-Multishot-Workflow. Text encoder GGUF + the required mmproj vision sidecar: joeygambino/MiniMax-H3-encoder-GGUF. The mmproj is not optional if you use reference images or more than one shot - shot chaining feeds the previous shot's last frame through the encoder's vision path.
Full-precision text encoder + VAEs: Comfy-Org/MiniMax-H3.
Workflows
H3_Multishot_AIO.json - easy mode: loaders > script > one sampler > save. Ships with a LoadImage -> H3 Optional Image -> start_image chain, so the same graph does T2V and I2V: flip the toggle on to use your frame.
H3_Multishot_MEMORY.json - long-form mode: the memory sampler with an identity anchor, for 2-5 minute multi-shot pieces.
H3_Keyframes.json - keyframes anywhere, single pass. One generation, so the audio is one continuous stream with no seams.
Notes
frames_per_shot sits on H3's 17k+5 frame grid (243 = ~10.1s at 24fps; 362 = ~15.1s, the trained max - beyond is untested but functional).
Malformed JSON scripts fail loudly instead of rendering the raw text.
Resolution: H3 is happiest at its native size. Rendering natively at 1920x1088 measured worse than 960x544 in blind review (softer detail, and it reads as an upscale) while costing ~4x the time. Render native, then upscale in pixel space.
Roadmap: ref2va reference conditioning (identity images + voice clips) and a deeper multi-frame memory for long-form chains, in a hard-mode sampler.