Sign In

H3 Long Video – One Prompt, Any Length (MiniMax H3 ComfyUI Workflow)

Download

1 variant available

Archive Other

H3-Long-Video-Workflows.zip

4.07 MB

Verified:

Type
Workflows
Stats

134

Reviews
Published

Oct 22, 2026

Base Model

MiniMax H3

Hash
AutoV2
196DC94F92

The MiniMax H3 Community License Agreement’s grant excludes the European Union, the United Kingdom, the Republic of Korea and the United States of America.

MiniMax H3

ref-prompt-builder.png

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 - Ref Prompt Builder.json: write a plain description, click AI to H3 prompt and the six Ref2VA prompt sections are written for Long Video; reference pictures are managed in the same editor. v1.0 and v1.1 also include H3 Long Video - Simple.json.

  • input/h3_prompt_builder/: the example's two reference pictures (v1.2); copy the input folder into your ComfyUI folder.

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-video

Restart 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.

  • Automatic prompt splitting (required for multi-segment videos): connect H3 Prompt API (any OpenAI-compatible API, e.g. DeepSeek, or a local LLM) 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. Since nodes 0.9.3, Long Video stops with an error when the video needs more than one segment and prompt_api is not connected; only single-segment videos run without it.

  • 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, a description box and an H3 prompt box; AI writes the prompt in English or Chinese.

  • H3 Image & Prompt: one text box plus pictures, with local backup/load of prompts and images.

Continue a video (nodes 0.10.0+)

  • ⚠ save_latents (on by default) saves every segment's latent and MP4 to output/h3_long_video/<run>. These files are never deleted automatically; delete old runs yourself.

  • Add H3 Long Video Load Latent and connect it to Long Video's context_latent. Click Preview and choose…, play the saved video and pick where to continue: any point, about every 0.71 s, not only segment ends. Exact, with no re-encoding.

  • Or continue any 24 fps video of the same size through context_video (use Trim Video to pick its end frame).

  • Write the prompt for the new part only, then join old and new with Concatenate Video. Details in the README's "Continue a video" section.

  • New ref_image_size (advanced): match or max reference resolution; max keeps more identity detail but samples slower.

Qwen Image 2.1 Prompt Builder (nodes 0.12.0+)

  • Writes Qwen Image 2.1 prompts for the pictures you make before the video: character sheets, empty scene cards, product anchors, game menus and keyframes.

  • Connect width and height from Resolution Selector, describe the person or scene, then pick the asset type, style, shot size, camera angle and lighting (click an option to see example images). Connect prompt, negative_prompt, width and height to the official Qwen Image 2.1 workflow.

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 拼接输出,一次运行就完成。

  • v1.2 压缩包只有 Ref Prompt Builder 工作流和示例用的两张参考图(把 input 文件夹复制到 ComfyUI 目录):在描述框写普通描述,点“AI 生成 H3 提示词”写成六段提示词并接到 Long Video。v1.0、v1.1 还包含 Simple 工作流。

  • 安装:在 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,或本地大模型),自动按段改写提示词(没写时间也会按剧情顺序分配到各段)。节点 0.9.3 起,需要多段却没接 prompt_api 时会直接报错,只有单段视频可以不接。也支持本地大模型(llama.cpp / llama-swap、Ollama、LM Studio),模型可下拉选择;请求前自动卸载 ComfyUI 模型,用完通过 unload_url 释放显存。实测本地 27B 稠密模型或 DeepSeek 效果较好,9B 左右的模型不稳定。

  • 接续视频(节点 0.10.0 起):⚠ save_latents(默认开启)把每段的 latent 和 MP4 保存到 output/h3_long_video/<运行>,不会自动删除,请自行清理。添加 H3 Long Video Load Latent 接到 context_latent,点“预览并选择接续位置…”播放保存的视频,选择任意位置(约每 0.71 秒一个点)精确接续;也可以把同尺寸、24 fps 的视频接到 context_video(用 Trim Video 选结束帧)。提示词只写新内容,再用 Concatenate Video 拼接。另新增高级选项 ref_image_size(match / max)。

  • Qwen Image 2.1 Prompt Builder(节点 0.12.0 起):为视频前期生成角色设定卡、场景卡、产品锚点图和关键帧的 Qwen Image 2.1 提示词。接分辨率选择器的宽高,写人物或场景描述,再选资产类型、风格、景别、机位和光影(点选项可看示例图),输出接官方 Qwen Image 2.1 流程。

  • 导入后请换成你自己安装的模型和图片;示例工作流里的 API key 已清空,使用 Prompt API 时请填写你自己的。

GPL-3.0 · 欢迎 Star 和反馈 Issue!