Views
No views yet


torch==2.5.1+cu124; 12.3+ is the
minimum if you build FlashAttention-3).requirements.txt: torch==2.5.1+cu124, diffusers==0.35.2,
accelerate==0.34.2, transformers==4.57.3.| Component | Version |
|---|---|
| GPU | NVIDIA H100 |
| CUDA | 12.4 |
| Python | 3.11.2 |
| PyTorch | 2.5.1+cu124 |
1git clone https://github.com/bytedance/Bernini.git bernini && cd bernini
2pip install -r requirements.txt--no-deps so VeOmni does not pull in a
different torch build and override the pinned torch==2.5.1+cu124:
pip install --no-deps git+https://github.com/ByteDance-Seed/VeOmni.git@v0.1.10.
Single-GPU inference does not need it.pip install flash-attn==2.8.3.flash_attn_interface is not on PyPI; build it from the
flash-attention repo's
hopper/ directory at tag v2.8.3:
1git clone https://github.com/Dao-AILab/flash-attention.git
2cd flash-attention && git checkout v2.8.3
3cd hopper && MAX_JOBS=$(nproc) python3 setup.py install --usertransformer / transformer_2 already hold the Bernini-R weights, so you point
--config at it and the weights load directly, with no --high_noise_ckpt /
--low_noise_ckpt needed.ByteDance/Bernini-R-Diffusers.
It bundles the Wan2.2 base components (VAE, UMT5 text encoder, tokenizer) together
with the Bernini-R transformer weights, so nothing else is downloaded at runtime.1pip install -U "huggingface_hub"
2hf download ByteDance/Bernini-R-Diffusers --local-dir Bernini-R-Diffusers--config and omit the checkpoint flags, e.g.:1python infer_single_gpu.py --config Bernini-R-Diffusers \
2 --case assets/testcases/t2i/t2i.json --num_frames 1Wan-AI/Wan2.2-T2V-A14B-Diffusers on Hugging Face. Supplies the
VAE, UMT5 text encoder, tokenizer, and the transformer architecture/base weights.
It is downloaded automatically on first run (configured by wan22_base in
configs/bernini_renderer_wan22/config.json).--high_noise_ckpt / --low_noise_ckpt. Both a local directory and a Hugging
Face repo id are accepted.1pip install -U "huggingface_hub"
2hf download Wan-AI/Wan2.2-T2V-A14B-Diffusers --local-dir Wan2.2-T2V-A14B-Diffusers
3hf download ByteDance/Bernini-R --local-dir Bernini-Rassets/testcases/ that bundles one task's routing and
inputs (task_type, guidance_mode, prompt, source media, output). This
keeps long prompts out of the command line. Each task has a directory under
assets/testcases/ holding one or more case files; see
assets/testcases/ for the format and the bundled
t2i / i2i / t2v / v2v / rv2v /r2v examples.--use_pe enhances the prompt through an OpenAI-compatible endpoint and is
recommended for best generation quality. The openai SDK is installed by
requirements.txt; configure the endpoint with environment variables:1export BERNINI_PE_API_KEY=... # or OPENAI_API_KEY
2export BERNINI_PE_BASE_URL=... # or OPENAI_BASE_URL
3export BERNINI_PE_MODEL=... # vision-capable chat model--max_image_size 848, --fps 16).assets/testcases/ — replace <hi> / <lo> with your
high-/low-noise checkpoint paths. The image tasks (t2i, i2i) are shown on a
single GPU; the video tasks on 8 GPUs via torchrun, where --ulysses N gives
N-way Ulysses sequence parallel per sample and the remaining world_size / N
ranks run data parallel over the task list. The two scripts take the same
inputs, so any example can be run either way.--case (--prompt,
--task_type, --guidance_mode, --video, --image, --images,
--output); generation parameters (--seed, --num_frames, ...) are always
command-line flags.t2i) — single GPU; generates one frame, so pass --num_frames 11python infer_single_gpu.py --high_noise_ckpt <hi> --low_noise_ckpt <lo> \
2 --case assets/testcases/t2i/t2i.json --num_frames 1i2i) — single GPU; generates one frame, so pass --num_frames 11python infer_single_gpu.py --high_noise_ckpt <hi> --low_noise_ckpt <lo> \
2 --case assets/testcases/i2i/i2i.json --num_frames 1t2v)1torchrun --nproc-per-node 8 infer_multi_gpu.py \
2 --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
3 --case assets/testcases/t2v/t2v.jsonv2v / mv2v) — two cases are provided.v2v task type is enough:1torchrun --nproc-per-node 8 infer_multi_gpu.py \
2 --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
3 --case assets/testcases/v2v/v2v_case1.jsonmv2v task type gives better results:1torchrun --nproc-per-node 8 infer_multi_gpu.py \
2 --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
3 --case assets/testcases/v2v/v2v_case2.jsonrv2v) — two cases are provided.1torchrun --nproc-per-node 8 infer_multi_gpu.py \
2 --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
3 --case assets/testcases/rv2v/rv2v_case1.json1torchrun --nproc-per-node 8 infer_multi_gpu.py \
2 --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
3 --case assets/testcases/rv2v/rv2v_case2.json \
4 --num_frames 121 --fps 24 --max_image_size 1280r2v) — drives a video from one or more reference images1torchrun --nproc-per-node 8 infer_multi_gpu.py \
2 --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
3 --case assets/testcases/r2v/r2v.jsonpython infer_single_gpu.py --help for the full argument list.gradio_demo.py exposes the same pipeline through a Gradio UI: the task-type
dropdown auto-fills guidance_mode (still user-editable), uploaded media is
routed to the matching slot, and the result is rendered inline.1# Single GPU
2python gradio_demo.py --high_noise_ckpt <hi> --low_noise_ckpt <lo> --port 7860
3
4# 8 GPUs, 8-way Ulysses sequence parallel
5torchrun --nproc-per-node 8 gradio_demo.py --ulysses 8 \
6 --high_noise_ckpt <hi> --low_noise_ckpt <lo> --port 7860 --share--use_pe (and export OPENAI_API_KEY=... / BERNINI_PE_API_KEY=...) to
enable GPT prompt enhancement; the in-UI checkbox is a per-request switch on
top of this flag.1@article{bernini,
2 title = {Bernini: Latent Semantic Planning for Video Diffusion},
3 author = {Chenchen Liu and Junyi Chen and Lei Li and Lu Chi and Mingzhen Sun and Zhuoying Li and Yi Fu and Ruoyu Guo and Yiheng Wu and Ge Bai and Zehuan Yuan},
4 journal = {arXiv preprint arXiv:2605.22344},
5 year = {2026}
6}