Generate long MiniMax H3 videos from one prompt and one total duration — no manual Save/Load latent steps.
Custom nodes on GitHub: https://github.com/ooizj/ComfyUI-H3-Long-Video · also in ComfyUI Manager as H3 Long Video (Comfy Registry)
Based on NikoDemon80/ComfyUI-H3-Motion-Context. The original version chains clips by hand with Motion Context Save/Load latent nodes. This fork removes those steps: H3 Long Video (Simple) works out the segment count, samples each segment, continues from the previous video/audio latent, trims the overlap and joins everything at 24 fps in one run.
What's in the zip
H3 Long Video - Simple.json: type the prompt directly and load the first frame and reference pictures with Load Image nodes.
H3 Long Video - Ref Prompt Builder.json: manage reference pictures and the six Ref2VA prompt sections in a visual editor, then connect it to Long Video.
Install
ComfyUI Manager: search H3 Long Video and install; you can also pick an earlier version.
Or with git:
cd ComfyUI/custom_nodes
git clone https://github.com/ooizj/ComfyUI-H3-Long-Video.git comfyui-h3-long-videoRestart ComfyUI and refresh the browser. Requires ComfyUI 0.36.0 or newer (native MiniMax H3 and Concatenate Video). If the original H3 Motion Context is installed, uninstall it first: both packs register the same node ids.
Models: https://huggingface.co/Comfy-Org/MiniMax-H3 (diffusion model, Qwen3-VL text encoder, video VAE, audio VAE). After importing, pick your own installed models and images.
Main features
One prompt, any length: set total_seconds (e.g. 30) and segment_seconds (e.g. 15); segments are chained automatically with picture and sound continuity.
Reference pictures across all segments: <Picture N> references stay consistent for the whole video (Ref2VA), plus an optional first frame.
Optional automatic prompt splitting: connect H3 Prompt API (any OpenAI-compatible API, e.g. DeepSeek) and the full-video timeline/dialogue is rewritten per segment, avoiding repeated openings and cut-off lines. Works with or without timestamps and keeps your prompt’s language. Leave it disconnected to skip it entirely — no API calls.
Local LLMs: point H3 Prompt API at llama.cpp / llama-swap, Ollama or LM Studio. ComfyUI models are unloaded before each LLM request and unload_url frees the LLM's VRAM before sampling. In our tests a local 27B dense model or DeepSeek worked well; ~9B models are not reliable.
H3 Ref Prompt Builder: drag/paste/reorder reference pictures, references renumber automatically, six prompt fields, optional AI tidy-up in English or Chinese.
H3 Image & Prompt: one text box plus pictures, with local backup/load of prompts and images.
Tips
API keys are empty in the shared files; enter your own only if you use the Prompt API.
Shorter segments use less memory per pass but add continuation overhead.
Questions and bug reports: GitHub Issues.
中文说明
一个提示词 + 总时长,直接生成 MiniMax H3 长视频。基于 NikoDemon80/ComfyUI-H3-Motion-Context,去掉了手动的 context Save/Load 步骤:H3 Long Video (Simple) 节点会自动计算分段数、逐段采样、承接上一段的视频和音频 latent、裁掉重叠部分,最后以 24 fps 拼接输出,一次运行就完成。
压缩包里有两个工作流:Simple(直接写提示词,用加载图像节点接首帧和参考图)和 Ref Prompt Builder(可视化管理参考图和六段提示词)。
安装:在 ComfyUI Manager 中搜索 H3 Long Video 安装(可选择版本),或在 ComfyUI/custom_nodes 下执行 git clone https://github.com/ooizj/ComfyUI-H3-Long-Video.git comfyui-h3-long-video;然后重启 ComfyUI 并刷新浏览器。需要 ComfyUI 0.36.0 或更新版本;如已安装原版 H3 Motion Context,请先卸载(两者节点 ID 相同)。
可选接入 H3 Prompt API(OpenAI 兼容接口,比如 DeepSeek),自动按段改写提示词(没写时间也会按剧情顺序分配到各段);不接则不会调用任何 API。也支持本地大模型(llama.cpp / llama-swap、Ollama、LM Studio),模型可下拉选择;请求前自动卸载 ComfyUI 模型,用完通过 unload_url 释放显存。实测本地 27B 稠密模型或 DeepSeek 效果较好,9B 左右的模型不稳定。
导入后请换成你自己安装的模型和图片;API key 已清空。
GPL-3.0 · 欢迎 Star 和反馈 Issue!
Description
Local LLMs for prompt splitting and AI rewrite. H3 Prompt API now works with local servers (llama.cpp / llama-swap, Ollama, LM Studio) as well as cloud APIs: pick the model from a dropdown, and ComfyUI and the LLM hand the GPU over automatically (local_llm, unload_url). The cover shows a llama-swap setup: api_url http://127.0.0.1:8081/v1, unload_url http://127.0.0.1:8081/api/models/unload.
Segment times are now calculated by the node, back-to-back dialogue no longer turns into one long segment, and AI rewrite keeps dialogue in its original language.
Requires the H3 Long Video custom nodes 0.9.1 or newer.


