File size: 3,985 Bytes
fc3971e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dceb455
 
75245c6
dceb455
 
 
75245c6
dceb455
 
 
 
 
 
 
 
75245c6
dceb455
fc3971e
 
dceb455
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Agnes-Video-2.0-MoE Inference Code

This folder contains the inference implementation for Agnes-Video-2.0-MoE. It does not contain model checkpoints or third-party model weights.

## Contents

- `inference/test_infer_seedance.py`: standard inference entry point.
- `crown/infer_entry.py`: optional elastic-width inference entry point.
- `inference/`: DiT, generation pipeline, checkpoint loading, and runtime utilities.
- `configs/config_template.json`: configuration template. Update all local paths before running.
- `infer.bat`: Windows CMD launcher for standard inference.
- `infer.sh`: Linux launcher.

## Required model files

Obtain the compatible Agnes-Video-2.0-MoE checkpoint and required auxiliary assets separately. Configure the paths in `configs/config_template.json`:

- `engine_config.load`: DiT/base checkpoint directory. The inference entry also accepts `--ckpt_dir` for a `.pt` checkpoint.
- `evaluation_config.txt_model_path`: T5Gemma text encoder.
- `evaluation_config.vae_model_path`: Wan2.2-TI2V-5B video VAE/model files required by this pipeline.
- `evaluation_config.omnivae_audio_ckpt_dir`: OmniVAE audio decoder checkpoint.
- OmniVAE source code: set `OMNIVAE_CODE_ROOT` to the local OmniVAE `vae` package root.

External components and their weights are not included in this code package. Obtain them from their respective official sources and follow their license terms.

## Environment

Use a Linux environment with a CUDA-capable NVIDIA GPU. This inference entry initializes CUDA/NCCL and is not supported on CPU or Windows native CMD. Windows users can invoke it from WSL/Linux; `infer.bat` is provided as a convenience wrapper for environments where Python and the CUDA runtime are available.

Install a PyTorch build compatible with your CUDA runtime first. Then install the Python dependencies listed in `requirements-inference.txt`. Dependency versions must match the release environment and compatible upstream components.

## Inference

Edit `configs/config_template.json` and replace all `C:/models/...` paths with local paths. From this folder, run in CMD/PowerShell:

```bat
python inference\test_infer_seedance.py --config-load-path configs\config_template.json --generate --prompt "A cinematic scene of a quiet lake at sunrise." --seconds 5 --save_path_prefix outputs\sample
```

Outputs are written with the selected prefix. The entry point supports additional options such as `--seed`, `--num_inference_steps`, `--br_width`, and `--br_height`; run `python inference\test_infer_seedance.py --help` to see available arguments.

For elastic-width checkpoints, use a compatible checkpoint/config and run the elastic entry point in the supported Linux/CUDA environment:

```bash
ELASTIC=1 bash infer.sh --config-load-path configs/config_template.json --generate --prompt "A cinematic scene of a quiet lake at sunrise." --seconds 5 --save_path_prefix outputs/sample
```

The elastic entry requires checkpoint metadata supported by `crown/infer_entry.py`. The standard entry point is for regular inference.

## TIRx kernels

The weights in `checkpoint_parts/` are the EENP p60 checkpoint. Denoising uses TIRx kernels (`tirx_kernels`, NVIDIA Blackwell `sm_100`). On an NVIDIA B200, one 5-second 480×272 clip at 32 steps now takes **13.641 s** (denoising only). That is **4.150 s faster** than the 17.791 s PyTorch path, a **23.33%** reduction.

```bash
export OMNIVAE_CODE_ROOT=/path/to/OmniVAE/vae
TIRX_ELASTIC=1 bash infer.sh \
  --config-load-path configs/config_template.json \
  --generate \
  --prompt "A cinematic scene of a quiet lake at sunrise." \
  --seconds 5 \
  --num_inference_steps 32 \
  --save_path_prefix outputs/sample
```

`TIRX_ELASTIC=1` runs `infer_tirx_elastic_io.py` on the EENP p60 checkpoint.

## License

The CROWN inference code is provided under Apache License 2.0. External models, libraries, and their weights are subject to their respective licenses. See `LICENSE` and the upstream license notices for details.