Image-Text-to-Video
Safetensors
bernini_renderer
SsyzeChen commited on
Commit
214035b
·
verified ·
1 Parent(s): ea33524

Add files using upload-large-folder tool

Browse files
Files changed (45) hide show
  1. .gitattributes +4 -0
  2. LICENSE +201 -0
  3. README.md +250 -3
  4. assets/arena.png +3 -0
  5. assets/bernini-icon.png +3 -0
  6. bernini_renderer_high/.metadata +3 -0
  7. bernini_renderer_high/model-00001-of-00018.safetensors +3 -0
  8. bernini_renderer_high/model-00002-of-00018.safetensors +3 -0
  9. bernini_renderer_high/model-00003-of-00018.safetensors +3 -0
  10. bernini_renderer_high/model-00004-of-00018.safetensors +3 -0
  11. bernini_renderer_high/model-00005-of-00018.safetensors +3 -0
  12. bernini_renderer_high/model-00006-of-00018.safetensors +3 -0
  13. bernini_renderer_high/model-00007-of-00018.safetensors +3 -0
  14. bernini_renderer_high/model-00008-of-00018.safetensors +3 -0
  15. bernini_renderer_high/model-00009-of-00018.safetensors +3 -0
  16. bernini_renderer_high/model-00010-of-00018.safetensors +3 -0
  17. bernini_renderer_high/model-00011-of-00018.safetensors +3 -0
  18. bernini_renderer_high/model-00012-of-00018.safetensors +3 -0
  19. bernini_renderer_high/model-00013-of-00018.safetensors +3 -0
  20. bernini_renderer_high/model-00014-of-00018.safetensors +3 -0
  21. bernini_renderer_high/model-00015-of-00018.safetensors +3 -0
  22. bernini_renderer_high/model-00016-of-00018.safetensors +3 -0
  23. bernini_renderer_high/model-00017-of-00018.safetensors +3 -0
  24. bernini_renderer_high/model-00018-of-00018.safetensors +3 -0
  25. bernini_renderer_high/model.safetensors.index.json +0 -0
  26. bernini_renderer_low/.metadata +3 -0
  27. bernini_renderer_low/model-00001-of-00018.safetensors +3 -0
  28. bernini_renderer_low/model-00002-of-00018.safetensors +3 -0
  29. bernini_renderer_low/model-00003-of-00018.safetensors +3 -0
  30. bernini_renderer_low/model-00004-of-00018.safetensors +3 -0
  31. bernini_renderer_low/model-00005-of-00018.safetensors +3 -0
  32. bernini_renderer_low/model-00006-of-00018.safetensors +3 -0
  33. bernini_renderer_low/model-00007-of-00018.safetensors +3 -0
  34. bernini_renderer_low/model-00008-of-00018.safetensors +3 -0
  35. bernini_renderer_low/model-00009-of-00018.safetensors +3 -0
  36. bernini_renderer_low/model-00010-of-00018.safetensors +3 -0
  37. bernini_renderer_low/model-00011-of-00018.safetensors +3 -0
  38. bernini_renderer_low/model-00012-of-00018.safetensors +3 -0
  39. bernini_renderer_low/model-00013-of-00018.safetensors +3 -0
  40. bernini_renderer_low/model-00014-of-00018.safetensors +3 -0
  41. bernini_renderer_low/model-00015-of-00018.safetensors +3 -0
  42. bernini_renderer_low/model-00016-of-00018.safetensors +3 -0
  43. bernini_renderer_low/model-00017-of-00018.safetensors +3 -0
  44. bernini_renderer_low/model-00018-of-00018.safetensors +3 -0
  45. bernini_renderer_low/model.safetensors.index.json +0 -0
.gitattributes CHANGED
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ assets/arena.png filter=lfs diff=lfs merge=lfs -text
37
+ bernini_renderer_high/.metadata filter=lfs diff=lfs merge=lfs -text
38
+ assets/bernini-icon.png filter=lfs diff=lfs merge=lfs -text
39
+ bernini_renderer_low/.metadata filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
README.md CHANGED
@@ -1,3 +1,250 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+
3
+ <img src="assets/bernini-icon.png" width="560" alt="Bernini"/>
4
+
5
+ #### Latent Semantic Planning for Video Diffusion
6
+
7
+ **Chenchen Liu<sup>\*</sup>, Junyi Chen<sup>\*</sup>, Lei Li<sup>\*</sup>, Lu Chi<sup>\*,§</sup>, Mingzhen Sun<sup>\*</sup>, Zhuoying Li<sup>\*</sup>, Yi Fu, Ruoyu Guo, Yiheng Wu, Ge Bai, Zehuan Yuan<sup>✉</sup>**
8
+
9
+ <sup>\*</sup> Equal contribution&nbsp;&nbsp;<sup>✉</sup> Corresponding author&nbsp;&nbsp;<sup>§</sup> Project lead
10
+
11
+ [![arXiv](https://img.shields.io/badge/arXiv-2605.22344-b31b1b.svg)](https://arxiv.org/abs/2605.22344)
12
+ [![Project Page](https://img.shields.io/badge/Project-Page-blue.svg)](https://bernini-ai.github.io/)
13
+ [![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-Models-yellow)](https://huggingface.co/ByteDance/Bernini)
14
+
15
+ </div>
16
+
17
+ ## 🎉 News
18
+
19
+ - **[2026-06-01]** We open-sourced the inference code and model weights of the Bernini Renderer (**Bernini-R**).
20
+ - **[2026-05-22]** We released our paper [Bernini: Latent Semantic Planning for Video Diffusion](https://arxiv.org/abs/2605.22344).
21
+
22
+ ## ✨ Highlights
23
+
24
+ Bernini is a unified framework for video generation and editing that combines an MLLM-based semantic planner with a DiT-based renderer.
25
+
26
+ On video editing, Bernini reaches the first tier among leading closed-source
27
+ commercial models. The leaderboard below comes from our self-built arena
28
+ platform, where human annotators blindly vote on paired edits and the votes are
29
+ aggregated into a Bradley-Terry score and a pairwise win-rate matrix.
30
+
31
+ <img src="assets/arena.png" width="900" alt="Video editing arena: Bradley-Terry leaderboard and pairwise win-rate matrix"/>
32
+
33
+ ## 📦 Installation
34
+
35
+ ### Requirements
36
+
37
+ - **Python** 3.11.2.
38
+ - **CUDA GPU** — a Hopper GPU (H100/H800/H200) is recommended so FlashAttention-3
39
+ can be used; other CUDA GPUs fall back to FlashAttention-2 or PyTorch SDPA.
40
+ - **CUDA toolkit** 12.4 (matches the pinned `torch==2.5.1+cu124`; 12.3+ is the
41
+ minimum if you build FlashAttention-3).
42
+ - Pinned in `requirements.txt`: `torch==2.5.1+cu124`, `diffusers==0.35.2`,
43
+ `accelerate==0.34.2`, `transformers==4.57.3`.
44
+
45
+ Reference environment (Bernini-R is developed and tested on this setup):
46
+
47
+ | Component | Version |
48
+ |-----------|--------------|
49
+ | GPU | NVIDIA H100 |
50
+ | CUDA | 12.4 |
51
+ | Python | 3.11.2 |
52
+ | PyTorch | 2.5.1+cu124 |
53
+
54
+ ### Install
55
+
56
+ ```bash
57
+ git clone https://github.com/bytedance/Bernini.git bernini && cd bernini
58
+ pip install -r requirements.txt
59
+ ```
60
+
61
+ Optional extras:
62
+
63
+ - **Multi-GPU sequence parallel** needs [Open-VeOmni](https://github.com/ByteDance-Seed/VeOmni)
64
+ (Apache-2.0, Python 3.11). Use `--no-deps` so VeOmni does not pull in a
65
+ different torch build and override the pinned `torch==2.5.1+cu124`:
66
+ `pip install --no-deps git+https://github.com/ByteDance-Seed/VeOmni.git@v0.1.10`.
67
+ Single-GPU inference does not need it.
68
+ - **Faster attention** (auto-detected if installed; otherwise PyTorch SDPA is used):
69
+ - FlashAttention-2 — general CUDA GPUs (incl. A100/A800): `pip install flash-attn==2.8.3`.
70
+ - FlashAttention-3 — Hopper only (H100/H800/H200, CUDA ≥ 12.3, PyTorch ≥ 2.4).
71
+ `flash_attn_interface` is not on PyPI; build it from the
72
+ [flash-attention](https://github.com/Dao-AILab/flash-attention) repo's
73
+ `hopper/` directory at tag `v2.8.3`:
74
+ ```bash
75
+ git clone https://github.com/Dao-AILab/flash-attention.git
76
+ cd flash-attention && git checkout v2.8.3
77
+ cd hopper && MAX_JOBS=$(nproc) python3 setup.py install --user
78
+ ```
79
+
80
+ ### Weights
81
+
82
+ Bernini-R uses two sets of weights:
83
+
84
+ 1. **Wan2.2 base** — [`Wan-AI/Wan2.2-T2V-A14B-Diffusers`](https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B-Diffusers) on Hugging Face. Supplies the
85
+ VAE, UMT5 text encoder, tokenizer, and the transformer architecture/base weights.
86
+ It is downloaded automatically on first run (configured by `wan22_base` in
87
+ `configs/bernini_renderer_wan22/config.json`).
88
+ 2. **Bernini-R checkpoint** — the trained high-noise / low-noise transformer weights
89
+ (safetensors) from [Hugging Face](https://huggingface.co/ByteDance/Bernini), passed with
90
+ `--high_noise_ckpt` / `--low_noise_ckpt`. Both a local directory and a Hugging
91
+ Face repo id are accepted.
92
+
93
+ ## 🚀 Usage
94
+
95
+ A run is described by a **case file** — a small JSON under
96
+ [`assets/testcases/`](assets/testcases/) that bundles one task's routing and
97
+ inputs (`task_type`, `guidance_mode`, `prompt`, source media, `output`). This
98
+ keeps long prompts out of the command line. Each task has a directory under
99
+ `assets/testcases/` holding one or more case files; see
100
+ [`assets/testcases/`](assets/testcases/) for the format and the bundled
101
+ `t2i` / `i2i` / `t2v` / `v2v` / `rv2v` /`r2v` examples.
102
+
103
+ ### Prompt enhancer (recommended)
104
+
105
+ `--use_pe` enhances the prompt through an OpenAI-compatible endpoint and is
106
+ recommended for best generation quality. The `openai` SDK is installed by
107
+ `requirements.txt`; configure the endpoint with environment variables:
108
+
109
+ ```bash
110
+ export BERNINI_PE_API_KEY=... # or OPENAI_API_KEY
111
+ export BERNINI_PE_BASE_URL=... # or OPENAI_BASE_URL
112
+ export BERNINI_PE_MODEL=... # vision-capable chat model
113
+ ```
114
+
115
+ ### Examples by task type
116
+
117
+ Unless an example specifies otherwise, inference outputs **480p / 16fps** (the
118
+ defaults — `--max_image_size 848`, `--fps 16`).
119
+
120
+ Each example runs a bundled case in
121
+ [`assets/testcases/`](assets/testcases/) — replace `<hi>` / `<lo>` with your
122
+ high-/low-noise checkpoint paths. The image tasks (`t2i`, `i2i`) are shown on a
123
+ single GPU; the video tasks on 8 GPUs via `torchrun`, where `--ulysses N` gives
124
+ N-way Ulysses sequence parallel per sample and the remaining `world_size / N`
125
+ ranks run data parallel over the task list. The two scripts take the same
126
+ inputs, so any example can be run either way.
127
+
128
+ Inputs can also be passed directly as flags instead of `--case` (`--prompt`,
129
+ `--task_type`, `--guidance_mode`, `--video`, `--image`, `--images`,
130
+ `--output`); generation parameters (`--seed`, `--num_frames`, ...) are always
131
+ command-line flags.
132
+
133
+ **Text-to-image** (`t2i`) — single GPU; generates one frame, so pass `--num_frames 1`
134
+
135
+ ```bash
136
+ python infer_single_gpu.py --high_noise_ckpt <hi> --low_noise_ckpt <lo> \
137
+ --case assets/testcases/t2i/t2i.json --num_frames 1
138
+ ```
139
+
140
+ **Image editing** (`i2i`) — single GPU; generates one frame, so pass `--num_frames 1`
141
+
142
+ ```bash
143
+ python infer_single_gpu.py --high_noise_ckpt <hi> --low_noise_ckpt <lo> \
144
+ --case assets/testcases/i2i/i2i.json --num_frames 1
145
+ ```
146
+
147
+ **Text-to-video** (`t2v`)
148
+
149
+ ```bash
150
+ torchrun --nproc-per-node 8 infer_multi_gpu.py \
151
+ --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
152
+ --case assets/testcases/t2v/t2v.json
153
+ ```
154
+
155
+ **Video editing** (`v2v` / `mv2v`) — two cases are provided.
156
+
157
+ For edits where the main subject keeps its ordinary motion (case 1 adds a
158
+ snowman to the scene), the `v2v` task type is enough:
159
+
160
+ ```bash
161
+ torchrun --nproc-per-node 8 infer_multi_gpu.py \
162
+ --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
163
+ --case assets/testcases/v2v/v2v_case1.json
164
+ ```
165
+
166
+ For edits that need to change the subject's motion (case 2 makes the person
167
+ crouch down), the `mv2v` task type gives better results:
168
+
169
+ ```bash
170
+ torchrun --nproc-per-node 8 infer_multi_gpu.py \
171
+ --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
172
+ --case assets/testcases/v2v/v2v_case2.json
173
+ ```
174
+
175
+ **Reference + video editing** (`rv2v`) — two cases are provided.
176
+
177
+ Case 1 is reference-image-guided video editing — replacing a garment in the
178
+ source video with one from a reference image:
179
+
180
+ ```bash
181
+ torchrun --nproc-per-node 8 infer_multi_gpu.py \
182
+ --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
183
+ --case assets/testcases/rv2v/rv2v_case1.json
184
+ ```
185
+
186
+ Case 2 is a video-insertion example — inserting content into the source video.
187
+ It is run at 720p / 24fps to show the insertion result more clearly:
188
+
189
+ ```bash
190
+ torchrun --nproc-per-node 8 infer_multi_gpu.py \
191
+ --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
192
+ --case assets/testcases/rv2v/rv2v_case2.json \
193
+ --num_frames 121 --fps 24 --max_image_size 1280
194
+ ```
195
+
196
+ **Reference-to-video** (`r2v`) — drives a video from one or more reference images
197
+
198
+ ```bash
199
+ torchrun --nproc-per-node 8 infer_multi_gpu.py \
200
+ --high_noise_ckpt <hi> --low_noise_ckpt <lo> --ulysses 8 \
201
+ --case assets/testcases/r2v/r2v.json
202
+ ```
203
+
204
+ See `python infer_single_gpu.py --help` for the full argument list.
205
+
206
+ ### Gradio demo
207
+
208
+ `gradio_demo.py` exposes the same pipeline through a Gradio UI: the task-type
209
+ dropdown auto-fills `guidance_mode` (still user-editable), uploaded media is
210
+ routed to the matching slot, and the result is rendered inline.
211
+
212
+ ```bash
213
+ # Single GPU
214
+ python gradio_demo.py --high_noise_ckpt <hi> --low_noise_ckpt <lo> --port 7860
215
+
216
+ # 8 GPUs, 8-way Ulysses sequence parallel
217
+ torchrun --nproc-per-node 8 gradio_demo.py --ulysses 8 \
218
+ --high_noise_ckpt <hi> --low_noise_ckpt <lo> --port 7860 --share
219
+ ```
220
+
221
+ Add `--use_pe` (and `export OPENAI_API_KEY=...` / `BERNINI_PE_API_KEY=...`) to
222
+ enable GPT prompt enhancement; the in-UI checkbox is a per-request switch on
223
+ top of this flag.
224
+
225
+ ## 📑 Citation
226
+
227
+ If you use Bernini in your research, please cite:
228
+
229
+ ```bibtex
230
+ @article{bernini,
231
+ title = {Bernini: Latent Semantic Planning for Video Diffusion},
232
+ 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},
233
+ journal = {arXiv preprint arXiv:2605.22344},
234
+ year = {2026}
235
+ }
236
+ ```
237
+
238
+ ## 🙏 Acknowledgements
239
+
240
+ Bernini builds on several outstanding open-source projects:
241
+
242
+ - [Wan2.2-T2V-A14B](https://huggingface.co/Wan-AI/Wan2.2-T2V-A14B)
243
+ - [Qwen2.5-VL-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct)
244
+ - [VeOmni](https://github.com/ByteDance-Seed/VeOmni)
245
+
246
+ We thank the authors and communities of these projects for their contributions.
247
+
248
+ ## 📄 License
249
+
250
+ Apache License 2.0. See [LICENSE](LICENSE).
assets/arena.png ADDED

Git LFS Details

  • SHA256: 28ae3f129eef0395db0699fe631805fd1828277ee0ad403edcf2ffb53be0fdde
  • Pointer size: 131 Bytes
  • Size of remote file: 264 kB
assets/bernini-icon.png ADDED

Git LFS Details

  • SHA256: 89e2087e3cf0c673d86f3a94966429d5dbbbb2bca023849c6b8508098793e028
  • Pointer size: 132 Bytes
  • Size of remote file: 1 MB
bernini_renderer_high/.metadata ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f07d2bde1469e23298a1eb1abb642089e2e6bad1ac0f1e56535f19d787cd2ace
3
+ size 159392494
bernini_renderer_high/model-00001-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4705f11ed4e60791613968e046db9d9a592766cf77cc6338a6aa5b3616ae7280
3
+ size 4950993232
bernini_renderer_high/model-00002-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fb35fd42d26dfef3100532c9bc7b11047c6d2564f0bbecf2479893ee470dbbf
3
+ size 4993011360
bernini_renderer_high/model-00003-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:765ad40f173225662cbf9f41680a09d3a2c52ae3cef0b70561f26ae81eecae40
3
+ size 4950966320
bernini_renderer_high/model-00004-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52a81340c76942928ec9e8f977f9c266d3e149aab08a34737a9b0c1d0916360c
3
+ size 4992976512
bernini_renderer_high/model-00005-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:193baaa40d79cfada5108433e1d5aa39dbc76a7c08f64ee002839e9cc93643c6
3
+ size 4846087984
bernini_renderer_high/model-00006-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcf5535b14944c54cc851f2c96d41223ff230bba2fbcdee44139e33a708aa225
3
+ size 4992976536
bernini_renderer_high/model-00007-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1682a9d858ddde5da65da0f0c050c15d82ffe0aba9404d1826811accccd5abfe
3
+ size 4846087952
bernini_renderer_high/model-00008-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36e4134f8946a32c48e37cee901e0c4d8517f3cd9ab0a92f32475b131d2e76ec
3
+ size 4992976536
bernini_renderer_high/model-00009-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:308152953fc5c9a68b7bce270c7f9e35b0083c4c4cf2749416f3b5ab3c559c5b
3
+ size 4846087984
bernini_renderer_high/model-00010-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cd521f4838977d0665ea088f10de51c8265d11f81b2250dc11274256ed32984
3
+ size 4992976504
bernini_renderer_high/model-00011-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16d5f0688df676a41a0a09a5bf5cd0724c04e763c578d917cc5195eb92a9b391
3
+ size 4846087888
bernini_renderer_high/model-00012-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5097ac00b47be470784c4a8f88810a8baad518025f47bdd7a1953abfe091948
3
+ size 4882698376
bernini_renderer_high/model-00013-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3112e6d5b27830f9c88d264dc4b36dcaf7710d0c13383fa20b080099c6c62096
3
+ size 4966327288
bernini_renderer_high/model-00014-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:421d3d85f9af15a4e737a49d17c27a60895cb88f8a172399c71e3aedc00df96e
3
+ size 4899227048
bernini_renderer_high/model-00015-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c9e0b25e3dcf639be601a05374a8a965162390b60fb4170ff50dd9b62a2116e
3
+ size 4966310728
bernini_renderer_high/model-00016-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22485360adc2165631c3874f14b64a58101cfef96221386f908a4979ab13a76d
3
+ size 1711377528
bernini_renderer_high/model-00017-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f302231a60d22f56b107b6cc57d00c811eee743865a92f8311e5d5c2822d1e57
3
+ size 4200612128
bernini_renderer_high/model-00018-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7921b917a0cb44dbab4bc6a8b1e020090eda046f9047452825d7426f4e98d9ad
3
+ size 4200595600
bernini_renderer_high/model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
bernini_renderer_low/.metadata ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db825aca4d0aa391576068f480cbf8da4caea0389a064b2237f52b96d2892477
3
+ size 160933121
bernini_renderer_low/model-00001-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:212702decbf06ce9f617986b0d1828ba5bf4b71e0f6ffb8a439e68cdf1db1103
3
+ size 4950993432
bernini_renderer_low/model-00002-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:219840a9a414d89f1a2f7d10bcb773cb79b40ddfaeb957ff4787e3d65e88dcee
3
+ size 4993011552
bernini_renderer_low/model-00003-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7cf8e3cf0e055224d62eaf3bc4117b69da8a1b029903852e795dfa4bdc1cad9
3
+ size 4950966512
bernini_renderer_low/model-00004-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28b6bde116f4ce4bd2c48f0adb6e07593717d59182ea079a634af93c6f88fb29
3
+ size 4992976704
bernini_renderer_low/model-00005-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f2d29e71ec76143a6b237d537d09bd1b1828a754c6866b60e1cecbbee2b26a0
3
+ size 4846088168
bernini_renderer_low/model-00006-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1e8b7316d9a832ed7f9042bd169eb3d5fbae11a48c2c3bf26cc4fd0fa558793
3
+ size 4992976728
bernini_renderer_low/model-00007-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e232fefb80acfba4331a9f45cdf1d10acf25f34f0a80e30d67cb28bab4b1e4b
3
+ size 4846088144
bernini_renderer_low/model-00008-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe69769201c0d0a4e70c2f6b5024a6439a63926f7ff2c9d20022944e39dd9643
3
+ size 4992976728
bernini_renderer_low/model-00009-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48aa664f000d3da6afc207ead16b4643d74ba680fc05cc10cfa8dfc6da402f78
3
+ size 4846088168
bernini_renderer_low/model-00010-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ff1c784e5fc9d1c037d460a5a6b8ec190a92e423dd4732f5e7ee1343569e714
3
+ size 4992976696
bernini_renderer_low/model-00011-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f088b22e80a7ac3af2a5ed1b3fd9fbf5e6f9f296ddb2ed8870b0c396c9bd664d
3
+ size 4846088080
bernini_renderer_low/model-00012-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d490d4b16149ae9e4c1a1a2989fe8e6e3cf224e758077ca59e5504cf20c945da
3
+ size 4882698472
bernini_renderer_low/model-00013-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3112e6d5b27830f9c88d264dc4b36dcaf7710d0c13383fa20b080099c6c62096
3
+ size 4966327288
bernini_renderer_low/model-00014-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:421d3d85f9af15a4e737a49d17c27a60895cb88f8a172399c71e3aedc00df96e
3
+ size 4899227048
bernini_renderer_low/model-00015-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c9e0b25e3dcf639be601a05374a8a965162390b60fb4170ff50dd9b62a2116e
3
+ size 4966310728
bernini_renderer_low/model-00016-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22485360adc2165631c3874f14b64a58101cfef96221386f908a4979ab13a76d
3
+ size 1711377528
bernini_renderer_low/model-00017-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f302231a60d22f56b107b6cc57d00c811eee743865a92f8311e5d5c2822d1e57
3
+ size 4200612128
bernini_renderer_low/model-00018-of-00018.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7921b917a0cb44dbab4bc6a8b1e020090eda046f9047452825d7426f4e98d9ad
3
+ size 4200595600
bernini_renderer_low/model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff