Instructions to use ZhengmingYu/DMAD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ZhengmingYu/DMAD with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("MiniMaxAI/MiniMax-H3", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("ZhengmingYu/DMAD") prompt = "A man with short gray hair plays a red electric guitar." output = pipe(prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Inference
- Notebooks
- Google Colab
- Kaggle
Model card: ComfyUI workflows for 16 GB GPUs and up (14 GiB-cap rows in the table)
Browse files
README.md
CHANGED
|
@@ -87,10 +87,10 @@ wget -P /path/to/ComfyUI/models/loras https://huggingface.co/ZhengmingYu/DMAD/re
|
|
| 87 |
wget -P /path/to/ComfyUI/models/loras https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/dmad_minimax_h3_4step_lora_critic_comfyui.safetensors
|
| 88 |
```
|
| 89 |
|
| 90 |
-
### Ready-to-run workflows (
|
| 91 |
|
| 92 |
Two complete text-to-audio-video workflows in [`minimax_h3/workflows`](https://huggingface.co/ZhengmingYu/DMAD/tree/main/minimax_h3/workflows)
|
| 93 |
-
that make 15 s of 1344x768 video with stereo audio on a
|
| 94 |
embeds the workflow) into ComfyUI; missing models are offered for download from links stored in the workflow. Both
|
| 95 |
sample with stock nodes (`lcm` + `simple`, `full_critic` LoRA); the ComfyUI-DMAD nodes are not needed.
|
| 96 |
|
|
@@ -99,8 +99,10 @@ sample with stock nodes (`lcm` + `simple`, `full_critic` LoRA); the ComfyUI-DMAD
|
|
| 99 |
| Workflow | [`dmad_h3_4step_15s_podcast.json`](https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/dmad_h3_4step_15s_podcast.json) | [`dmad_h3_8step_15s_wok.json`](https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/dmad_h3_8step_15s_wok.json) |
|
| 100 |
| Example (workflow embedded) | [`dmad_h3_4step_15s_podcast.mp4`](https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/dmad_h3_4step_15s_podcast.mp4), seed 2 | [`dmad_h3_8step_15s_wok.mp4`](https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/dmad_h3_8step_15s_wok.mp4), seed 4 |
|
| 101 |
| Output | 1344x768, 362 frames = 15 s at 24 fps, stereo audio | 1344x768, 362 frames = 15 s at 24 fps, stereo audio |
|
| 102 |
-
| Peak GPU memory | 24.6 GiB | 24.6 GiB |
|
| 103 |
-
| Time
|
|
|
|
|
|
|
| 104 |
|
| 105 |
<p align="center">
|
| 106 |
<img src="https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/screenshot_4step_15s.png" alt="The 4-step workflow in ComfyUI" width="100%">
|
|
@@ -113,12 +115,12 @@ sample with stock nodes (`lcm` + `simple`, `full_critic` LoRA); the ComfyUI-DMAD
|
|
| 113 |
| `models/vae/` | `minimax_h3_video_vae_fp16.safetensors`, `minimax_h3_audio_vae_fp32.safetensors` |
|
| 114 |
| `models/loras/` | `dmad_minimax_h3_4step_full_critic_comfyui.safetensors` (this repository) |
|
| 115 |
|
| 116 |
-
Video lengths are 5 + 17k frames (124 = 5 s, 243 = 10 s, 362 = 15 s). On a 24 GB GPU, 15 s needs the
|
| 117 |
`H3 Memory Optimization` node of [H3-Optimizations](https://github.com/Zironic/H3-Optimizations) (install with
|
| 118 |
-
ComfyUI-Manager), which both workflows include. Without it, 5 s (length 124) fits in
|
| 119 |
15 s needs more than 32 GB (it fits in 40 GB); the video keeps its composition and action but is not bit-identical to
|
| 120 |
the one made with the memory node. Times are end to end (model loading, text encoding, sampling, decoding) on an H200
|
| 121 |
-
with the PyTorch allocator capped at 24 GiB; a consumer GPU is slower, and sampling time scales linearly with steps.
|
| 122 |
|
| 123 |
**16 GB and 22 GB GPUs.** Both workflows also run unchanged with the GPU memory capped at 14 GiB (room for a 16 GB
|
| 124 |
card's desktop and CUDA context): ComfyUI's dynamic VRAM keeps less of the model resident and streams more of it from
|
|
|
|
| 87 |
wget -P /path/to/ComfyUI/models/loras https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/dmad_minimax_h3_4step_lora_critic_comfyui.safetensors
|
| 88 |
```
|
| 89 |
|
| 90 |
+
### Ready-to-run workflows (16 GB GPU and up)
|
| 91 |
|
| 92 |
Two complete text-to-audio-video workflows in [`minimax_h3/workflows`](https://huggingface.co/ZhengmingYu/DMAD/tree/main/minimax_h3/workflows)
|
| 93 |
+
that make 15 s of 1344x768 video with stereo audio on a 16 GB GPU or larger. Load the `.json`, or drag the example `.mp4` (it
|
| 94 |
embeds the workflow) into ComfyUI; missing models are offered for download from links stored in the workflow. Both
|
| 95 |
sample with stock nodes (`lcm` + `simple`, `full_critic` LoRA); the ComfyUI-DMAD nodes are not needed.
|
| 96 |
|
|
|
|
| 99 |
| Workflow | [`dmad_h3_4step_15s_podcast.json`](https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/dmad_h3_4step_15s_podcast.json) | [`dmad_h3_8step_15s_wok.json`](https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/dmad_h3_8step_15s_wok.json) |
|
| 100 |
| Example (workflow embedded) | [`dmad_h3_4step_15s_podcast.mp4`](https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/dmad_h3_4step_15s_podcast.mp4), seed 2 | [`dmad_h3_8step_15s_wok.mp4`](https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/dmad_h3_8step_15s_wok.mp4), seed 4 |
|
| 101 |
| Output | 1344x768, 362 frames = 15 s at 24 fps, stereo audio | 1344x768, 362 frames = 15 s at 24 fps, stereo audio |
|
| 102 |
+
| Peak GPU memory, 24 GiB cap | 24.6 GiB | 24.6 GiB |
|
| 103 |
+
| Time, 24 GiB cap | 448 s, of which sampling 393 s | 845 s, of which sampling 785 s |
|
| 104 |
+
| Peak GPU memory, 14 GiB cap (16 GB GPUs) | 14.7 GiB | 14.7 GiB |
|
| 105 |
+
| Time, 14 GiB cap | 470 s, of which sampling 413 s | 886 s, of which sampling 832 s |
|
| 106 |
|
| 107 |
<p align="center">
|
| 108 |
<img src="https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/workflows/screenshot_4step_15s.png" alt="The 4-step workflow in ComfyUI" width="100%">
|
|
|
|
| 115 |
| `models/vae/` | `minimax_h3_video_vae_fp16.safetensors`, `minimax_h3_audio_vae_fp32.safetensors` |
|
| 116 |
| `models/loras/` | `dmad_minimax_h3_4step_full_critic_comfyui.safetensors` (this repository) |
|
| 117 |
|
| 118 |
+
Video lengths are 5 + 17k frames (124 = 5 s, 243 = 10 s, 362 = 15 s). On a 16 or 24 GB GPU, 15 s needs the
|
| 119 |
`H3 Memory Optimization` node of [H3-Optimizations](https://github.com/Zironic/H3-Optimizations) (install with
|
| 120 |
+
ComfyUI-Manager), which both workflows include. Without it, 5 s (length 124) fits in 16 GB with stock nodes only, and
|
| 121 |
15 s needs more than 32 GB (it fits in 40 GB); the video keeps its composition and action but is not bit-identical to
|
| 122 |
the one made with the memory node. Times are end to end (model loading, text encoding, sampling, decoding) on an H200
|
| 123 |
+
with the PyTorch allocator capped at 24 or 14 GiB; a consumer GPU is slower, and sampling time scales linearly with steps.
|
| 124 |
|
| 125 |
**16 GB and 22 GB GPUs.** Both workflows also run unchanged with the GPU memory capped at 14 GiB (room for a 16 GB
|
| 126 |
card's desktop and CUDA context): ComfyUI's dynamic VRAM keeps less of the model resident and streams more of it from
|