
Video Rebirth 将 MiniMax-H3 视频音频模型压缩至 14B,支持 6 步 INT8 推理
来源标题:Show HN: We compressed a 31B video+audio diffusion model to 14B, 6 steps, INT8
Video Rebirth 推出 HyperFlow H3 Flash,将 MiniMax-H3 视频+音频扩散模型从 31B 压缩到 14B,支持 6 步生成,并提供 INT8 和 GGUF 量化版本。该模型可同时生成视频与同步立体声,权重已在 Hugging Face 发布,并配套 ComfyUI 节点。低内存 PC 建议使用 GGUF(Q4_K_M 约 9.1GB),数据中心 GPU 或 24GB 以上 RTX 显卡可用 INT8。
以下正文由 AI 翻译自 Hacker News(原文版权归原站所有),可能存在偏差,重要内容请以原文为准。
HyperFlow H3 Flash 是 Video Rebirth 对 MiniMax-H3 的压缩少步版本,可同时生成视频与同步立体声音频。
展示 · 权重(Hugging Face) · ComfyUI 节点 · GGUF 配置指南 · 全尺寸 MiniMax-H3 的 8 步 LoRA
任务 输入 ComfyUI 模板 GGUF Python INT8 t2va 文本提示词 hyperflow_t2v 支持 支持 fl2va 提示词 + 首帧,或首帧与尾帧 hyperflow_i2v、hyperflow_flf2v 支持 支持 ref2va 提示词 + 最多 12 个参考素材 hyperflow_ref2v 仅图像 图像、视频与音频
选择运行方式 决策规则:系统内存不超过 64 GB 的 PC 请使用 GGUF。数据中心 GPU,或显存 24 GB 以上且系统内存至少 69 GiB 的 RTX GPU,请使用 INT8 convrot。 所有权重均位于 VideoRebirthAI/hyperflow-h3-flash。
量化 fl2va_gguf/ ref2va_gguf/ 适用场景 Q4_K_M 9.1 GB 9.2 GB 24 GB GPU 的推荐默认选项 Q8_0 14.9 GB 15.2 GB 显存与系统内存足够时最接近全精度 Q3_K_M 7.2 GB 7.4 GB 占用最小(另提供 Q4_K_S、Q5_K_M 和 Q6_K)
完整配置指南:integrations/README.md。快速开始:
安装 pip install git+https://github.com/Video-Rebirth/hyperflow-h3-flash pip install "hyperflow-h3-flash[hopper] @ git+https://github.com/Video-Rebirth/hyperflow-h3-flash" # H100 / H200: FlashAttention-3 pip install "hyperflow-h3-flash[fp8] @ git+https://github.com/Video-Rebirth/hyperflow-h3-flash" # --text-encoder-precision fp8
要求:Python 3.10+、带 CUDA 和 Triton 的 PyTorch 2.6+(原生 Windows 上使用 pip install triton-windows)、Ampere 或更新的 NVIDIA GPU,以及 diffusers >= 0.40。多 GPU(--gpus > 1)需要 Linux 或 WSL2(在 WSL2 上请调高 %UserProfile%.wslconfig 中的 memory=)。
首次运行下载:约 90 GB,使用 --text-encoder-precision fp8 时约 68 GB。其中包含 MiniMax-H3 文本编码器、VAE,以及所选任务对应的 16 GB HyperFlow INT8 transformer。62 GB 的基础 transformer 永远不会被下载。
首次运行编译:Triton INT8 kernel 在首次使用时编译(约 1 分钟)。
命令行 运行 hyperflow-h3-flash 或 python -m hyperflow_h3_flash:
文本生成视频 + 音频(t2va)
hyperflow-h3-flash --prompt "A chef slides a steaming bowl of ramen across a wooden counter; rain taps on the window."
--output ramen.mp4
首帧,或首帧 + 尾帧(fl2va)
hyperflow-h3-flash --prompt "..." --image first.png --output clip.mp4 hyperflow-h3-flash --prompt "..." --image first.png --last-image last.png --output clip.mp4
按提示词顺序传入参考图像、视频(含音轨)和音频片段(ref2va)
hyperflow-h3-flash --prompt "<Picture 1> walks through the scene of <Picture 2> ..."
--reference person.png --reference scene.png --output clip.mp4
15 秒片段,跨 4 块 GPU 做上下文并行(或 --gpus auto 使用最多 4 块可见 GPU)
hyperflow-h3-flash --prompt "..." --num-frames 360 --gpus 4
4 步(速度)、6 步(默认)或 8 步(质量)
hyperflow-h3-flash --prompt "..." --steps 4
选项 取值 / 默认值 说明 --steps 4、6(默认)、8 采样步数:4 为速度,6 为平衡,8 为质量。Sigma 网格见 schedule.py。 --num-frames 124–362(默认 124) 24 fps 下的帧数(5.2 至 15 秒)。向上取整为 17n + 5(360 会变成 362)。 --height、--width 32 的倍数 默认:短边 768。会遵循 --image 的宽高比,t2va 则为 16:9。 --reference 可重复的路径 ref2va 输入,按提示词顺序匹配 <Picture i>、<Video i> 和 <Audio i>。限制:9 张图像、3 个视频、3 个音频片段,共 12 个。 --gpus(--num-gpus) 1、2、4、7、8、auto 多 GPU 上下文与 VAE 分块并行。会在 torchrun 下自动重新启动。 --offload auto(默认)、none、model、stream GPU 内存放置方式。见 Offload Modes。 --text-encoder-precision bf16(默认)、fp8 fp8 会加载 Qwen/Qwen3-VL-32B-Instruct-FP8。卸载时可节省约 22 GiB 系统内存。需要 [fp8] extra。 --fp8-gemm triton(默认)、deepgemm fp8 文本编码器的 GEMM 后端。deepgemm 需要 Hopper 或更新架构。 --attention auto(默认)、sdpa、fa3 在 Hopper 上且已安装 kernels 时使用 FlashAttention-3(fa3),否则使用 PyTorch sdpa。 --block-chunk 0(默认)、16384、... 将 transformer 块的每个逐 token 算子切片,以限制显存中的激活值。16384 可在 24 GB 显存中容纳 15 秒混合 ref2va。 --weights、--subfolder、--base-model Hub ID 或本地路径 覆盖 transformer 仓库、任务子文件夹或基础 MiniMaxAI/MiniMax-H3 快照。
examples/benchmark.py 在 torchrun 下计时每个流水线阶段和各 GPU 峰值内存。
import torch from diffusers.utils.export_utils import encode_video from hyperflow_h3_flash import load_pipeline pipe = load_pipeline("t2va") # "fl2va":传入 image=...(以及 last_image=...);"ref2va":传入 references=[...] out = pipe( prompt="A chef slides a steaming bowl of ramen across a wooden counter.", num_frames=124, num_inference_steps=6, # 4、6 或 8 generator=torch.Generator().manual_seed(0), output=["videos", "audio", "sampling_rate"], ) encode_video( out["videos"][0], fps=24, output_path="ramen.mp4", audio=out["audio"][0], audio_sample_rate=out["sampling_rate"], )
torchrun 下的多 GPU:调用 torch.distributed.init_process_group("nccl"),并向 load_pipeline 传入 device=f"cuda:{local_rank}"。流水线会在各 rank 间分片执行,并在每个 rank 上返回完整输出。
独立 transformer(AutoModel):每个 INT8 Hub 文件夹都自带模型代码,无需安装本包即可加载: from diffusers import AutoModel,然后 AutoModel.from_pretrained("VideoRebirthAI/hyperflow-h3-flash", subfolder="fl2va_int8_convrot", trust_remote_code=True, torch_dtype=torch.bfloat16)。
--offload 设置 GPU 内存放置方式。auto(默认)根据每块 GPU 的显存选择模式:
所有运行均为 1344×768、6 步的端到端流程:文本编码、transformer,以及视频和音频 VAE 解码。每个 a / b 单元格是 5.2 秒 / 15 秒片段(124 / 362 帧)的总耗时。
GPU GGUF,≥ 64 GB 内存 GGUF,32 GB 内存 GGUF,16 GB 内存 INT8,≥ 69 GiB 内存 RTX 5090(32 GB) 99 s / 575 s 118 s / 618 s 130 s / 615 s 92 s / 551 s
(原文较长,此处译出前 6000 字,完整内容请点「打开原文」。)
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。