# AI use cases for DMAD (Yzmblog/DMAD)

Repo: [Yzmblog/DMAD](https://github.com/Yzmblog/DMAD) | Use cases: 4 | Page: https://dedupedai.com/use-cases/yzmblog-dmad/

DMAD is a Python repo with 4-step LoRA students of the MiniMax-H3 33B model that generate 1344x768 video with stereo audio from text prompts, plus inference, ComfyUI, and training code.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Generate a 4-step audio-video clip from a text prompt: https://dedupedai.com/use-cases/yzmblog-dmad/generate-audio-video-clip-with-dmad-lora/
- Make 5 s audio-video clips on an 8 GB consumer GPU: https://dedupedai.com/use-cases/yzmblog-dmad/run-dmad-video-on-8-gb-gpu/
- Render DMAD clips in ComfyUI with ready-made workflows: https://dedupedai.com/use-cases/yzmblog-dmad/generate-dmad-clips-in-comfyui/
- Retrain a DMAD student from the released training code: https://dedupedai.com/use-cases/yzmblog-dmad/retrain-dmad-student-on-released-data/

## How to generate a 4-step audio-video clip from a text prompt with DMAD

Repo: [Yzmblog/DMAD](https://github.com/Yzmblog/DMAD) | Difficulty: Advanced | Time: 3 hours | Basis: From the README

Run the DMAD 4-step LoRA on MiniMax-H3 to turn one text prompt into a 5.2 s video with stereo audio.

**Who it is for:** A creator or developer with an 80 GB GPU who wants a quick text-to-audio-video clip from one prompt.

**The problem:** Full MiniMax-H3 sampling uses 50 steps, which is slow for quick drafts of audio-video clips.

**The outcome:** An MP4 with H.264 video and AAC audio, written to the output folder with a settings.json file.

### Steps

1. Run `conda create -n dmad_h3 python=3.12 -y`, then run `conda activate dmad_h3`.
2. Install PyTorch with `pip install torch==2.11.0 torchvision==0.26.0 torchaudio==2.11.0 --index-url https://download.pytorch.org/whl/cu126`, then run `pip install -r requirements.txt`.
3. Accept the MiniMax H3 Community License on Hugging Face, then run `hf download MiniMaxAI/MiniMax-H3 --local-dir models/MiniMax-H3 --exclude "FL2VA/*" --exclude "Ref2VA/*" --exclude "transformer_ref/*"`. (inferred, check the README)
4. Run `hf download ZhengmingYu/DMAD --include "minimax_h3/*_critic.safetensors" --local-dir ckpt` after running `mkdir -p ckpt`.
5. Run `python inference.py --model-dir models/MiniMax-H3 --lora ckpt/minimax_h3/dmad_minimax_h3_4step_lora_critic.safetensors --prompt "A polar bear is playing the violin in the snow." --output-dir outputs/polar_bear`. (inferred, check the README)

### Prompt to paste into your agent

```text
In the Yzmblog/DMAD repo, set up the environment from the README, download the MiniMax-H3 components and the lora_critic checkpoint, then run inference.py with the prompt <your prompt> and --output-dir outputs/<name>. Expected output: an MP4 in outputs/<name>/ with H.264 video and AAC audio. Verify that the file plays and that settings.json exists in the same folder.
```

### Caveat

The MiniMax-H3 download is about 170 GB and the default path expects an 80 GB GPU, so most readers will need the --low-vram path in the next use case.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yzmblog-dmad/generate-audio-video-clip-with-dmad-lora/

## How to make 5 s audio-video clips on an 8 GB consumer GPU with DMAD

Repo: [Yzmblog/DMAD](https://github.com/Yzmblog/DMAD) | Difficulty: Advanced | Time: 3 hours | Basis: From the README

Use the --low-vram path to run the DMAD students on an 8 GB GPU by streaming weights from the checkpoint files.

**Who it is for:** A hobbyist or small studio with a consumer GPU of about 8 GB who cannot use the 80 GB default path.

**The problem:** The default inference path needs an 80 GB GPU, which puts MiniMax-H3 out of reach on consumer hardware.

**The outcome:** 5 s videos with native stereo audio, made in under 7 GiB of GPU memory with the --low-vram path.

### Steps

1. Complete the environment and checkpoint setup from the README, including the MiniMax-H3 download and the lora_critic checkpoint.
2. Pick a prompt and write it to a text file, one prompt per line, for example `prompts/dmad_sweater.txt`.
3. Run `python inference.py --model-dir models/MiniMax-H3 --lora ckpt/minimax_h3/dmad_minimax_h3_4step_lora_critic.safetensors --prompt-file prompts/dmad_sweater.txt --seed 42 --low-vram 8 --num-frames 124 --output-dir outputs/low_vram`. (inferred, check the README)
4. Check the output folder for the MP4 files and the settings.json record.

### Prompt to paste into your agent

```text
In the Yzmblog/DMAD repo, run inference.py with --low-vram 8 and the lora_critic checkpoint on the prompt file <prompt_file>, writing to outputs/<name>. Expected output: 5 s MP4 clips with audio in the output folder. Verify that the run finished without an out-of-memory error and that settings.json lists the low-vram setting.
```

### Caveat

The README states the 8 GB path is bit-identical to larger-GPU runs for 5 s videos, but the run still depends on a large host disk for the model files and the first run is slow.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yzmblog-dmad/run-dmad-video-on-8-gb-gpu/

## How to render DMAD clips in ComfyUI with ready-made workflows with DMAD

Repo: [Yzmblog/DMAD](https://github.com/Yzmblog/DMAD) | Difficulty: Intermediate | Time: 2 hours | Basis: From the README

Load the ComfyUI-layout DMAD LoRA and a ready-to-run workflow to make 4-step or 8-step clips with audio.

**Who it is for:** A ComfyUI user with a 16 to 24 GB GPU who wants a visual node graph instead of the command line.

**The problem:** Command-line inference is hard for artists who already build their video pipelines in ComfyUI.

**The outcome:** A 15 s video with audio rendered from a ComfyUI workflow, using the ready-to-run 4-step or 8-step graph.

### Steps

1. Download the ComfyUI key layout file with `hf download ZhengmingYu/DMAD --include "minimax_h3/*_comfyui.safetensors" --local-dir ckpt` (inferred from the README file names). (inferred, check the README)
2. Open the ready-to-run workflow described in comfyui/README.md for the 24 GB GPU setup.
3. Load the file `dmad_minimax_h3_4step_lora_critic_comfyui.safetensors` in the LoRA loader.
4. Set the sampler to `lcm` and the scheduler to `simple`, then run the graph.

### Prompt to paste into your agent

```text
In the Yzmblog/DMAD repo, open the ComfyUI workflow described in comfyui/README.md and load dmad_minimax_h3_4step_lora_critic_comfyui.safetensors with the lcm sampler and simple scheduler. Expected output: a 15 s video with audio for the prompt <your prompt>. Verify that the sampler and scheduler names match the README before running.
```

### Caveat

The ready-to-run workflows are documented for 16 to 24 GB GPUs, so an 8 GB GPU needs the separate 5 s workflow that the README links.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yzmblog-dmad/generate-dmad-clips-in-comfyui/

## How to retrain a DMAD student from the released training code with DMAD

Repo: [Yzmblog/DMAD](https://github.com/Yzmblog/DMAD) | Difficulty: Advanced | Time: 4 hours | Basis: From the README

Use the train folder and the published Wan2.1 training data to start a DMAD training run.

**Who it is for:** A researcher or ML engineer who wants to reproduce or extend DMAD training on Wan2.1 data.

**The problem:** Reproducing a distillation result needs the training code, the data, and the environment set up together.

**The outcome:** A training run that starts from the published Wan2.1 data with the code in train/wan.

### Steps

1. Read train/wan/README.md, including its data section, and follow its environment setup.
2. Download the data with `hf download ZhengmingYu/DMAD-Wan-data --repo-type dataset --local-dir data/wan`. (inferred, check the README)
3. Point the training config at the downloaded data folder as described in train/wan/README.md.
4. Start training with the command given in train/wan/README.md and check the first logged steps.

### Prompt to paste into your agent

```text
In the Yzmblog/DMAD repo, read train/wan/README.md, download the DMAD-Wan-data dataset to data/wan, and start the training command from that README. Expected output: training logs for the Wan2.1 DMAD student. Verify that the dataset folder contains the 42,158 teacher samples the README lists before starting training.
```

### Caveat

The download command is inferred from the Hugging Face dataset link, so confirm the exact command in train/wan/README.md before running it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yzmblog-dmad/retrain-dmad-student-on-released-data/
