> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# Wan2.2-T2V-A14B-Diffusers

> Use Wan2.2-T2V-A14B-Diffusers with NeMo AutoModel for diffusion training and fine-tuning, including checkpoints, runnable recipes, setup, and reference details.

[Wan 2.2 T2V-A14B](https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers) is the successor to Wan 2.1, also a text-to-video flow-matching DiT. Its defining feature is a **two-stage denoising pipeline**: a high-noise `transformer` handles the early/noisy timesteps and a low-noise `transformer_2` handles the later/cleaner timesteps, switching at `boundary_ratio * num_train_timesteps` (default `0.875`). Each transformer is \~14B parameters, for \~28B total.

Set up NeMo AutoModel with the [latest container](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/nemo-automodel) or follow the [installation instructions](/get-started/installation).

## Fine-Tune Wan2.2-T2V-A14B-Diffusers

From the repository root, run:

```bash
uv run torchrun --nproc-per-node=8 \
  examples/diffusion/finetune/finetune.py \
  -c examples/diffusion/finetune/wan2_2_t2v_flow.yaml \
  --model.stage=high_noise \
  --fsdp.cpu_offload=true
```

## Choose a Workflow

| Goal                                          | Start Here                                                                                                                              |
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Fine-tune - two-stage with `model.stage` knob | Use [wan2\_2\_t2v\_flow.yaml](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/diffusion/finetune/wan2_2_t2v_flow.yaml).     |
| Inference - loads both stage checkpoints      | Use [generate\_wan22.yaml](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/diffusion/generate/configs/generate_wan22.yaml). |

## Two-stage finetuning workflow

Because each transformer is \~14B parameters, NeMo AutoModel finetunes them **one at a time**:

1. **Preprocess once** - produces a single cached `.meta` set reusable across both stages:

   ```bash
   python -m tools.diffusion.preprocessing_multiprocess video \
       --video_dir /path/to/videos --output_dir /path/to/wan22_cache \
       --processor wan2.2 --caption_format meta_json --caption_field caption \
       --resolution_preset 512p --target_frames 81
   ```

2. **Finetune the high-noise stage** (`pipe.transformer`, sigma in \[boundary\_ratio, 1.0]):

   ```bash
   torchrun --nproc-per-node=8 \
       examples/diffusion/finetune/finetune.py \
       -c examples/diffusion/finetune/wan2_2_t2v_flow.yaml \
       --model.stage=high_noise \
       --data.dataloader.cache_dir=/path/to/wan22_cache \
       --checkpoint.checkpoint_dir=./WAN22_CKPT/wan22_high \
       --fsdp.cpu_offload=true
   ```

3. **Finetune the low-noise stage** (`pipe.transformer_2`, sigma in \[0.0, boundary\_ratio]):

   ```bash
   torchrun --nproc-per-node=8 \
       examples/diffusion/finetune/finetune.py \
       -c examples/diffusion/finetune/wan2_2_t2v_flow.yaml \
       --model.stage=low_noise \
       --data.dataloader.cache_dir=/path/to/wan22_cache \
       --checkpoint.checkpoint_dir=./WAN22_CKPT/wan22_low \
       --fsdp.cpu_offload=true
   ```

4. **Run inference** loading both stage checkpoints:

   ```bash
   python examples/diffusion/generate/generate.py \
       -c examples/diffusion/generate/configs/generate_wan22.yaml
   ```

> **Note**
>
> Each finetuning run only holds one of the two transformers on GPU - the recipe drops the unused one before sharding so an FSDP2 dp=8 setup on 8x80GB H100 fits a single 14B model plus its AdamW state. `--fsdp.cpu_offload=true` is recommended; it moves the sharded params and optimizer state to host RAM during the step boundary.

## Model Reference

### Model Architecture

| Property                  | Value                                   |
| ------------------------- | --------------------------------------- |
| Task                      | Text-to-Video                           |
| Architecture              | DiT (Flow Matching), two-stage          |
| Parameters                | 14B + 14B (high-noise + low-noise)      |
| Hugging Face Organization | [Wan-AI](https://huggingface.co/Wan-AI) |

### Task

* Text-to-Video (T2V)

### Available Models

| Model            | HF ID                                                                                         |
| ---------------- | --------------------------------------------------------------------------------------------- |
| Wan 2.2 T2V-A14B | [`Wan-AI/Wan2.2-T2V-A14B-Diffusers`](https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers) |

## Related Resources

* [Diffusion Fine-Tuning Guide](/recipes-e2e-examples/diffusion-fine-tuning)
* [Dataset Preparation](/datasets/diffusion-dataset)