tangyue0820 commited on
Commit
628bfb1
·
verified ·
1 Parent(s): cd771d0

Add FP8 model card based on nvidia/Cosmos3-Super

Browse files
.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
+ images/benchmark-action-1.png filter=lfs diff=lfs merge=lfs -text
37
+ images/benchmark-overall.png filter=lfs diff=lfs merge=lfs -text
38
+ images/benchmark-reasoning.png filter=lfs diff=lfs merge=lfs -text
39
+ images/benchmark-visual-audio.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,1014 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: openmdw1.1-license
4
+ license_link: >-
5
+ https://openmdw.ai/license/1-1/
6
+ library_name: cosmos
7
+ tags:
8
+ - nvidia
9
+ - cosmos
10
+ - cosmos3
11
+ - vllm
12
+ - vllm-omni
13
+ - sglang
14
+ - sglang-diffusion
15
+ - diffusers
16
+ - text, image, video, audio, and action generation
17
+ - omnimodel
18
+ ---
19
+
20
+ # **Cosmos 3: Omnimodal World Models for Physical AI**
21
+ **[Cosmos3-Examples Collection](https://huggingface.co/collections/nvidia/cosmos3-examples)** | **[Code](https://github.com/nvidia/cosmos)** | **[White Paper](https://research.nvidia.com/labs/cosmos-lab/cosmos3/technical-report.pdf)** | **[Website](https://research.nvidia.com/labs/cosmos-lab/cosmos3/)**
22
+
23
+ [NVIDIA Cosmos™](https://github.com/nvidia/cosmos) is a world foundation model platform designed to accelerate the development of Physical AI by enabling machines to understand, simulate, and interact with the physical world across robotics, autonomous driving, and smart space environments, including industrial and factory-scale applications.
24
+
25
+ # Model Overview: Cosmos3-Super-FP8
26
+
27
+ ## Description
28
+
29
+ Cosmos3 is a collection of Omnimodal world models capable of generating dynamic, high-quality video, image, audio, and action commands from combinations of text, image, video, and action trajectory inputs. It serves as a foundational building block for a broad range of Physical AI applications and research spanning world understanding, world generation, simulation, and embodied policy learning.
30
+
31
+ This model is ready for commercial and non-commercial use.
32
+
33
+ **Model Developer:** NVIDIA
34
+
35
+ ### Model Versions
36
+ - Cosmos3-Nano:
37
+ - Given multimodal inputs including text, images, video, audio, and action trajectories, generate coherent text, images, video, audio, and action outputs for multimodal understanding, world simulation, future prediction, action reasoning, and Physical AI applications.
38
+
39
+ - Cosmos3-Super-FP8:
40
+ - Given multimodal inputs including text, images, video, audio, and action trajectories, generate coherent text, images, video, audio, and action outputs for multimodal understanding, world simulation, future prediction, action reasoning, and Physical AI applications.
41
+
42
+ - Cosmos3-Nano-Policy-DROID:
43
+ - Given language instructions and visual observations from the DROID robot platform, generate robot action trajectories for manipulation and control tasks.
44
+
45
+ - Cosmos3-Super-Image2Video:
46
+ - Given one input image and text instructions, generate temporally coherent video sequences that are consistent with the provided visual content.
47
+
48
+ - Cosmos3-Super-Text2Image:
49
+ - Given text input, generate high-fidelity images that are consistent with the provided description.
50
+
51
+ ### License
52
+
53
+ This model is released under the [OpenMDW1.1](https://openmdw.ai/license/1-1/)
54
+
55
+ ### Deployment Geography
56
+
57
+ Global
58
+
59
+ ### Use Case
60
+
61
+ Physical AI: Encompassing robotics, autonomous vehicles (AV), and smart space environments, including industrial and factory-scale applications.
62
+
63
+ ### Release Date
64
+
65
+ Hugging Face 05/31/2026 via [https://huggingface.co/collections/nvidia/cosmos3](https://huggingface.co/collections/nvidia/cosmos3)
66
+ GitHub 05/31/2026 via [https://github.com/nvidia/cosmos](https://github.com/nvidia/cosmos)
67
+
68
+ ## Model Architecture
69
+
70
+ **Architecture Type:** Transformer
71
+
72
+ **Network Architecture:** Mixture-of-Transformers (MoT)
73
+
74
+ Cosmos3 is an Omni-modal foundation model built on a Mixture-of-Transformers (MoT) architecture consisting of two complementary transformer towers: an autoregressive transformer for discrete token generation and a diffusion transformer for continuous multimodal generation. During inference, text is generated through standard next-token autoregressive decoding, while non-text modalities, such as images, video, audio, and actions, are synthesized through iterative denoising. This unified architecture enables Cosmos3 to model heterogeneous modalities within a single framework while preserving generation mechanisms best suited to each modality.
75
+
76
+ **This model was developed based on:** [Cosmos Framework](https://github.com/nvidia/cosmos-framework)
77
+
78
+ **Number of trainable model parameters:**
79
+
80
+ - Cosmos3-Nano: 16B
81
+ - Cosmos3-Super-FP8: 64B
82
+ - Cosmos3-Nano-Policy-DROID: 16B
83
+ - Cosmos3-Super-Image2Video: 64B
84
+ - Cosmos3-Super-Text2Image: 64B
85
+
86
+ ## Input/Output Specifications
87
+
88
+ - **Generator Input**
89
+ - **Input Type(s)**: Text, Image, Video (with audio or without audio), Action Trajectory
90
+ - **Input Format(s)**:
91
+ - Text: String
92
+ - Image: jpg, png, jpeg, webp
93
+ - Video (with or without audio): mp4
94
+ - Action: json (1D list)
95
+ - **Input Parameters**:
96
+ - Text: One-dimensional (1D)
97
+ - Image: Two-dimensional (2D)
98
+ - Video: Three-dimensional (3D)
99
+ - Audio: One-dimensional (1D)
100
+ - Action trajectory: One-dimensional (1D)
101
+ - **Other Properties Related to Input**:
102
+ - For video inputs, we accept various resolutions, including 720p, 480p, and 256p.
103
+ - When using input video with audio muxed into the video MP4 file, the audio should have 2 channels (stereo) and a 48 kHz sample rate.
104
+ - Image and video inputs are RGB color (8 bits per channel, sRGB color space); grayscale inputs are not supported.
105
+ - Action input is a per-frame sequence of robot/agent state or control values (e.g., joint positions, gripper state, camera pose). The full input is a 2D array shaped (T, D), where T is the number of frames and D is the embodiment-specific dimensionality listed below.
106
+ - Input action is only supported for compatible embodiments, including general camera motion (9D), autonomous vehicle (9D), egocentric motion (57D), single Franka Panda arm with RobotiQ gripper (10D), dual Franka Panda arm with RobotiQ gripper (20D), Agibot (29D), UR (10D), Google robot (10D), WidowX 250 (10D), UMI (9D).
107
+ - **Input Size and Length limits:**
108
+ - **Text:** 4096 tokens
109
+ - **Image:** 256p, 480p, and 720p resolution at one of these aspect ratios (16:9, 4:3, 1:1, 3:4, 9:16)
110
+ - **Video:** 256p, 480p, and 720p resolution at one of these aspect ratios (16:9, 4:3, 1:1, 3:4, 9:16). Max number of frames = 5.
111
+ - **Audio:** Max 0.5 second
112
+ - **Action:** 16 – 400 video frames
113
+ - **Generator Output**
114
+ - **Output Type(s)**: Image, video, audio, action, text
115
+ - **Output Format(s)**:
116
+ - Image: JPG
117
+ - Video: MP4
118
+ - Audio: Advanced Audio Coding (AAC) stream (muxed within the MP4)
119
+ - Action: 1D list (.json)
120
+ - Text: string
121
+ - **Output Parameters**:
122
+ - Image: Two-dimensional (2D)
123
+ - Video: Three-dimensional (3D)
124
+ - Audio: One-dimensional (1D)
125
+ - Action: One-dimensional (1D)
126
+ - Text: One-dimensional (1D)
127
+ - **Other Properties Related to Output**:
128
+ - The generated video is an MP4 file, with the resolution, frame rate, and duration specified in the input. The generated audio is encoded in AAC format, muxed into the video MP4 file with 2 channels (stereo) and a 48 kHz sample rate.
129
+ - Video generation supports durations from 5 to 400 frames, with 189 frames as the default generation duration.
130
+ - The generated action is only supported for compatible embodiments, including general camera motion (9D), autonomous vehicle (9D), egocentric motion (57D), single Franka Panda arm with RobotiQ gripper (10D), dual Franka Panda arm with RobotiQ gripper (20D), Agibot (29D), UR (10D), Google robot (10D), WidowX 250 (10D), UMI (9D).
131
+ - Audio: 48 kHz stereo AAC stream muxed into video mp4
132
+ - Video: mp4 at the FPS specified in input
133
+ - Image: JPEG
134
+ - **Reasoner Input**
135
+ - **Input Type(s)**: Text, Text+Image, Text+Video
136
+ - **Input Format(s)**:
137
+ - Text: String
138
+ - Image: jpg, png, jpeg, webp
139
+ - Video: mp4
140
+ - **Input Parameters**:
141
+ - Text: One-dimensional (1D)
142
+ - Image: Two-dimensional (2D)
143
+ - Video: Three-dimensional (3D)
144
+ - **Other Properties Related to Input**:
145
+ - Video inputs are recommended at a frame rate of 4 fps.
146
+ - Long-context inputs supported up to 256K tokens.
147
+ - **Input Size and Length limits:**
148
+ - **Text:** Up to 256K tokens (context window).
149
+ - **Image:** Standard input image formats; passed as file or URL.
150
+ - **Video:** mp4 at the recommended 4 fps.
151
+ - **Reasoner Output**
152
+ - **Output Type(s)**: Text
153
+ - **Output Format(s)**:
154
+ - Text: string
155
+ - **Output Parameters**:
156
+ - Text: One-dimensional (1D)
157
+ - **Other Properties Related to Output**:
158
+ - Default `max_tokens=4096+` is recommended for reasoning outputs; longer outputs may be requested.
159
+ - Reasoning outputs may include structured chain-of-thought, 2D/3D point localization, and bounding-box coordinates for vision-based tasks.
160
+
161
+ The video content visualizes the input text description as a short animated scene, capturing key elements within the specified time constraints.
162
+
163
+ Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA's hardware (e.g., GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster training and inference times compared to CPU-only solutions.
164
+
165
+ ## Software Integration
166
+
167
+ **Runtime Engine(s):**
168
+
169
+ - [PyTorch](https://github.com/nvidia/cosmos3)
170
+ - [vLLM-Omni](https://github.com/vllm-project/vllm-omni)
171
+ - [Hugging Face Diffusers](https://huggingface.co/docs/diffusers/en/index)
172
+ - [SGLang](https://github.com/sgl-project/sglang)
173
+
174
+ **Supported Hardware Microarchitecture Compatibility:**
175
+
176
+ - NVIDIA Ampere
177
+ - NVIDIA Blackwell
178
+ - NVIDIA Hopper
179
+
180
+ **Operating System(s):**
181
+
182
+ - Linux (We have not tested on other operating systems.)
183
+
184
+ **Note:** Only BF16 precision is tested. Other precisions like FP4, FP8, and FP16 are not officially supported.
185
+
186
+ The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment.
187
+
188
+ ## Training, Testing, and Evaluation Datasets
189
+
190
+ ### Dataset Overview
191
+
192
+ - **Total Size:** 1.3B data points
193
+ - **Total Number of Datasets:** 393 dataset entries
194
+ - **Dataset partition:** Training [100%], Testing [N/A — evaluation benchmarks used separately], Validation [N/A — evaluation benchmarks used separately]
195
+ - **Time period for training data collection:** 2024–2026
196
+ - **Time period for testing data collection:** N/A (standard public benchmarks)
197
+ - **Time period for validation data collection:** N/A (standard public benchmarks)
198
+
199
+ Raw data from internal and external sources is transformed into training-ready data through multiple stages of curation, filtering, and quality review. Data acquisition spans diverse multimodal sources — robotics, autonomous driving, industrial environments, indoor and outdoor scenes, varied lighting and weather conditions, camera viewpoints, object categories, and human activities — to broaden coverage across Physical AI operating environments. Automated filtering pipelines remove corrupted, duplicate, low-quality, and restricted content. Metadata analysis, heuristic rules, and model-assisted classifiers are applied during preprocessing to flag anomalous distributions and low-diversity subsets. Human review supplements automated filtering for selected datasets, benchmark construction, and targeted quality analysis. Datasets are balanced across modalities and task categories — visual reasoning, text-to-image, text-to-video, image-to-video, audio generation, video transfer, action-conditioned generation, and action command generation — to reduce overrepresentation of narrow domains. Synthetic and simulation-based augmentation supplements coverage of rare physical interactions and edge-case scenarios. Deduplication and provenance tracking are applied across the corpus. The resulting processed data is converted into model-ready tokenized or encoded representations through modality-specific preprocessors before training begins.
200
+
201
+ Training datasets passed through multiple layers of automated and manual safeguards designed to reduce the presence of harmful or policy-violating content across categories including weapons and weapons-related instructional content, criminal planning, child sexual abuse material (CSAM), non-consensual intimate imagery (NCII), sexual content involving minors, harassment, hate speech, profanity, threats and incitement to violence, self-harm or suicide-related content, and graphic violence. Data sources are reviewed for licensing compatibility, provenance, and alignment with internal data governance and safety policies before admission into training corpora. Automated filtering pipelines combine multiple detection strategies: hash-matching against known CSAM and NCII reference databases; classifier-based moderation models trained for explicit sexual content, hate speech, violence, weapons imagery, and other restricted categories; keyword and regex-based screening for criminal-planning, threats, and self-harm phrases in text data; metadata and provenance heuristics for source-level risk signals; and embedding-based anomaly detection to surface samples that fall outside expected distributions. Human review and targeted audits supplement automated filtering for selected datasets, benchmark construction, and safety-sensitive evaluation. For multimodal Physical AI data (robotics, autonomous driving, industrial scenes), additional filtering targets invalid action trajectories, physically implausible interactions, and unsafe control sequences. Synthetic and simulation-generated data are evaluated through internal validation before inclusion. Benchmark evaluations and red-team testing are applied post-training to surface remaining safety gaps across world generation, reasoning, audio, and action tasks. No large-scale data-filtering process can guarantee complete removal of all harmful content; residual risks may remain, particularly in rare edge cases or open-world deployment settings. Ongoing monitoring and dataset review continue post-release.
202
+
203
+ - For more information about the datasets used to train this model, please see the [Public Summary of Training Content](https://docs.nvidia.com/cosmos/latest/_downloads/e482b7114ce8dbfbb07d2d4b42cafe4e/training-content-Cosmos-3.pdf).
204
+
205
+ **Data Modality and Training Data Size**
206
+
207
+ | Modality | Reasoning Data Sample Count | Generation Data Sample Count |
208
+ | -------- | ------------------- | -------------------- |
209
+ | Text | 22M | Not Applicable |
210
+ | Image | 19M | 767M |
211
+ | Video | 1M | 348M |
212
+ | Audio | Not Applicable | 139M |
213
+ | Action | Not Applicable | 8M |
214
+
215
+ **Data Collection Method by dataset**
216
+
217
+ - Hybrid: Automatic/Sensors, Synthetic, Automated
218
+
219
+ **Labeling Method by dataset**
220
+
221
+ - Hybrid: Human, Automated
222
+
223
+ **Properties:** The training, testing, and evaluation datasets consist of diverse multimodal video, image, audio, action, synthetic, and sensor-conditioned data sourced from NVIDIA-owned data and publicly available, commercially permissive datasets. These datasets are curated to exclude known restricted content and to support building an Omni model that learns to generate and reason about dynamic physical environments across world reasoning and generation tasks.
224
+
225
+ ### Public Datasets
226
+
227
+ | Dataset                                                             | Samples           |
228
+ |---|---|
229
+ | OpenImage | 1.2M |
230
+ | Coyo700M | 100M |
231
+ | YouTube Video | 340M |
232
+ | UMI | 4.5M |
233
+
234
+ ### Private Datasets
235
+
236
+ | Dataset                                                             | Samples           |
237
+ |---|---|
238
+ | Egocentric | 7M |
239
+ | Nexar | 0.6M |
240
+ | AgiBot | 0.2M |
241
+ | HOI | 0.3M |
242
+
243
+ ### Synthetic Datasets
244
+
245
+ | Dataset | Samples |
246
+ |---|---|
247
+ | synthetic images generated using HiDream-I1 | 15M |
248
+ | synthetic images generated using Qwen-Image-2512 | 14M |
249
+ | synthetic captions generated using Qwen3-VL | 1115M |
250
+
251
+ ## Evaluation Datasets
252
+
253
+ **Data Collection Method by dataset**
254
+
255
+ - Hybrid: Automatic/Sensors, Synthetic, Automated
256
+
257
+ **Labeling Method by dataset**
258
+
259
+ - Hybrid: Human, Automated
260
+
261
+ **Properties:** The training, testing, and evaluation datasets consist of diverse multimodal video, image, audio, action, synthetic, and sensor-conditioned data sourced from NVIDIA-owned data and publicly available, commercially permissive datasets. These datasets are curated to exclude known restricted content and to support building an Omni model that learns to generate and reason about dynamic physical environments across world reasoning and generation tasks.
262
+
263
+ ## Benchmarks
264
+
265
+ Please see our [technical paper](https://research.nvidia.com/labs/cosmos-lab/cosmos3/technical-report.pdf) for detailed evaluations of the base model.
266
+
267
+ ### Overall
268
+
269
+ ![Overall benchmark results](images/benchmark-overall.png)
270
+
271
+ ### Reasoning Benchmarks
272
+
273
+ ![Reasoning benchmarks](images/benchmark-reasoning.png)
274
+
275
+ ### Generation Benchmarks
276
+
277
+ #### Visual-Audio Generation
278
+
279
+ ![Visual & audio generation benchmarks](images/benchmark-visual-audio.png)
280
+
281
+ #### Action
282
+
283
+ ![Action benchmarks — forward and inverse dynamics](images/benchmark-action-1.png)
284
+
285
+ ## Usage
286
+
287
+ - See [Cosmos](https://github.com/nvidia/cosmos) for details.
288
+
289
+ ### Prompt upsampling
290
+
291
+ For optimal quality, text prompts should be upsampled into a specific JSON structure. Description and code can be found [here](https://github.com/nvidia/cosmos-framework/blob/main/docs/prompt_upsampling.md).
292
+
293
+ For example, for text-to-video upsampling using Opus-4.6:
294
+
295
+ ```bash
296
+ git clone https://github.com/NVIDIA/cosmos-framework.git packages/cosmos-framework
297
+ pip install -e packages/cosmos-framework
298
+
299
+ export PROMPT_UPSAMPLER_ENDPOINT_URL="https://api.anthropic.com/v1/"
300
+ export PROMPT_UPSAMPLER_MODEL_NAME="claude-opus-4-6"
301
+ export PROMPT_UPSAMPLER_API_TOKEN="<you_token>"
302
+
303
+ python -m cosmos_framework.inference.prompt_upsampling \
304
+ --input assets/example_t2v_prompt_short.txt \
305
+ --output /tmp/upsampled_t2v_opus/ \
306
+ --mode text2video \
307
+ --endpoint-url "${PROMPT_UPSAMPLER_ENDPOINT_URL}" \
308
+ --model "${PROMPT_UPSAMPLER_MODEL_NAME}" \
309
+ --api-token "${PROMPT_UPSAMPLER_API_TOKEN}" \
310
+ --resolution 720 \
311
+ --aspect-ratio "16,9"
312
+ ```
313
+
314
+ The JSON-upsampled version of `assets/example_t2v_prompt_short.txt` is saved in `assets/example_t2v_prompt.json` for convenience, and is used for the video generation examples below.
315
+
316
+ ### vLLM-Omni
317
+
318
+ #### Container
319
+
320
+ ```
321
+ docker pull vllm/vllm-omni:cosmos3
322
+ ```
323
+
324
+ #### General Invocation
325
+
326
+ You can use the release-tested `vllm-omni` package for deploying an OpenAI-compatible API inference endpoint.
327
+ The recommended vLLM-Omni serving configuration for nvidia/Cosmos3-Super-FP8 on 8xH200, 8xH100, or 8xA100 is:
328
+
329
+ ```bash
330
+ vllm serve nvidia/Cosmos3-Super-FP8 \
331
+ --omni \
332
+ --host 0.0.0.0 \
333
+ --port 8000 \
334
+ --cfg-parallel-size 2 \
335
+ --ulysses-degree 4 \
336
+ --use-hsdp \
337
+ --hsdp-shard-size 8 \
338
+ --init-timeout 1800
339
+ ```
340
+
341
+ With this configuration, video generation with 50 steps should take approximately 55 seconds on H200 GPUs. For 2xH200, one can simply use `--cfg-parallel-size 2 --use-hsdp --hsdp-shard-size 2`, and a video should take approximately 3 minutes to generate. Tensor parallelism is also supported by setting `--tensor-parallel-size`. Setting `--enable-layerwise-offload` can help reduce memory usage on GPUs with less available memory.
342
+
343
+ #### Examples
344
+
345
+ ##### Download example prompts
346
+
347
+ The example inputs (`assets/`) live in this model repo. Download just this folder with the Hugging Face CLI:
348
+
349
+ ```bash
350
+ pip install -U "huggingface_hub[cli]"
351
+ hf download nvidia/Cosmos3-Super-FP8 assets/ --local-dir Cosmos3-Super-FP8
352
+ cd Cosmos3-Super-FP8
353
+ ```
354
+
355
+ Run all commands below from the downloaded repo root.
356
+
357
+ ---
358
+
359
+ ##### Image to video generation
360
+
361
+ ```python
362
+ import json
363
+ import mimetypes
364
+ from pathlib import Path
365
+
366
+ import requests
367
+
368
+ # 1. Read JSON-upsampled prompt and negative prompt
369
+ json_prompt = json.load(open("assets/example_i2v_prompt.json"))
370
+ negative_prompt = json.load(open("assets/negative_prompt.json"))
371
+
372
+ # 2. Build and send the multipart API request
373
+ url = "http://localhost:8000/v1/videos/sync"
374
+ image_path = Path("assets/example_i2v_input.jpg")
375
+ mime_type = mimetypes.guess_type(image_path)[0] or "image/png"
376
+ data = {
377
+ "prompt": json.dumps(json_prompt),
378
+ "negative_prompt": json.dumps(negative_prompt),
379
+ "size": "1280x720",
380
+ "num_frames": "189",
381
+ "fps": "24",
382
+ "num_inference_steps": "35",
383
+ "guidance_scale": "6.0",
384
+ "max_sequence_length": "4096",
385
+ "flow_shift": "10.0",
386
+ "extra_params": json.dumps(
387
+ {
388
+ "use_resolution_template": False,
389
+ "use_duration_template": False,
390
+ "guardrails": True,
391
+ }
392
+ ),
393
+ "seed": "17",
394
+ }
395
+
396
+ with image_path.open("rb") as image_file:
397
+ files = {
398
+ "input_reference": (image_path.name, image_file, mime_type),
399
+ }
400
+ print("Sending request to server...")
401
+ response = requests.post(
402
+ url,
403
+ data=data,
404
+ files=files,
405
+ headers={"Accept": "video/mp4"},
406
+ )
407
+ response.raise_for_status()
408
+
409
+ # 3. Save the generated video
410
+ output_path = Path("/tmp/cosmos3_super_i2v.mp4")
411
+ output_path.write_bytes(response.content)
412
+ print(f"Saved video to {output_path}")
413
+ ```
414
+
415
+ Example output:
416
+
417
+ <video controls width="1280" height="720" src="https://huggingface.co/nvidia/Cosmos3-Super-FP8/resolve/main/assets/example_i2v_output.mp4"></video>
418
+
419
+ ---
420
+
421
+ ##### Text to video generation
422
+
423
+ ```python
424
+ import json
425
+ from pathlib import Path
426
+
427
+ import requests
428
+
429
+ # 1. Read JSON-upsampled prompt and negative prompt
430
+ json_prompt = json.load(open("assets/example_t2v_prompt.json"))
431
+ negative_prompt = json.load(open("assets/negative_prompt.json"))
432
+
433
+ # 2. Build your API payload
434
+ data = {
435
+ "prompt": json.dumps(json_prompt),
436
+ "negative_prompt": json.dumps(negative_prompt),
437
+ "size": "1280x720",
438
+ "num_frames": "189",
439
+ "fps": "24",
440
+ "num_inference_steps": "35",
441
+ "guidance_scale": "6.0",
442
+ "max_sequence_length": "4096",
443
+ "flow_shift": "10.0",
444
+ "extra_params": json.dumps(
445
+ {
446
+ "use_resolution_template": False,
447
+ "use_duration_template": False,
448
+ "guardrails": True,
449
+ }
450
+ ),
451
+ "seed": "17",
452
+ }
453
+
454
+ # 3. Send the POST request
455
+ url = "http://localhost:8000/v1/videos/sync"
456
+ print("Sending request to server...")
457
+ response = requests.post(
458
+ url,
459
+ data=data,
460
+ headers={"Accept": "video/mp4"},
461
+ )
462
+ response.raise_for_status()
463
+
464
+ # 4. Save the generated video
465
+ output_path = Path("/tmp/cosmos3_super_t2v.mp4")
466
+ output_path.write_bytes(response.content)
467
+ print(f"Saved video to {output_path}")
468
+ ```
469
+
470
+ Example output:
471
+
472
+ <video controls width="1280" height="720" src="https://huggingface.co/nvidia/Cosmos3-Super-FP8/resolve/main/assets/example_t2v_output.mp4"></video>
473
+
474
+ ---
475
+
476
+ ##### Image to Video + Audio generation
477
+
478
+ ```python
479
+ import json
480
+ import mimetypes
481
+ from pathlib import Path
482
+
483
+ import requests
484
+
485
+ # 1. Read JSON-upsampled prompt and negative prompt
486
+ json_prompt = json.load(open("assets/example_i2v_prompt.json"))
487
+ negative_prompt = json.load(open("assets/negative_prompt.json"))
488
+
489
+ # 2. Build and send the multipart API request
490
+ url = "http://localhost:8000/v1/videos/sync"
491
+ image_path = Path("assets/example_i2v_input.jpg")
492
+ mime_type = mimetypes.guess_type(image_path)[0] or "image/png"
493
+ data = {
494
+ "prompt": json.dumps(json_prompt),
495
+ "negative_prompt": json.dumps(negative_prompt),
496
+ "size": "1280x720",
497
+ "num_frames": "189",
498
+ "fps": "24",
499
+ "num_inference_steps": "35",
500
+ "guidance_scale": "6.0",
501
+ "max_sequence_length": "4096",
502
+ "generate_sound": "true",
503
+ "sound_duration": "7.875",
504
+ "flow_shift": "10.0",
505
+ "extra_params": json.dumps(
506
+ {
507
+ "use_resolution_template": False,
508
+ "use_duration_template": False,
509
+ "guardrails": True,
510
+ }
511
+ ),
512
+ "seed": "17",
513
+ }
514
+
515
+ with image_path.open("rb") as image_file:
516
+ files = {
517
+ "input_reference": (image_path.name, image_file, mime_type),
518
+ }
519
+ print("Sending request to server...")
520
+ response = requests.post(
521
+ url,
522
+ data=data,
523
+ files=files,
524
+ headers={"Accept": "video/mp4"},
525
+ )
526
+ response.raise_for_status()
527
+
528
+ # 3. Save the generated video
529
+ output_path = Path("/tmp/cosmos3_super_i2vs.mp4")
530
+ output_path.write_bytes(response.content)
531
+ print(f"Saved video to {output_path}")
532
+ ```
533
+
534
+ Example output:
535
+
536
+ <video controls width="1280" height="720" src="https://huggingface.co/nvidia/Cosmos3-Super-FP8/resolve/main/assets/example_i2vs_output.mp4"></video>
537
+
538
+ ---
539
+
540
+ ##### Text to Video + Audio generation
541
+
542
+ ```python
543
+ import json
544
+ from pathlib import Path
545
+
546
+ import requests
547
+
548
+ # 1. Read JSON-upsampled prompt and negative prompt
549
+ json_prompt = json.load(open("assets/example_t2vs_prompt.json"))
550
+ negative_prompt = json.load(open("assets/negative_prompt.json"))
551
+
552
+ # 2. Build your API payload
553
+ data = {
554
+ "prompt": json.dumps(json_prompt),
555
+ "negative_prompt": json.dumps(negative_prompt),
556
+ "size": "1280x720",
557
+ "num_frames": "189",
558
+ "fps": "24",
559
+ "num_inference_steps": "35",
560
+ "guidance_scale": "6.0",
561
+ "max_sequence_length": "4096",
562
+ "generate_sound": "true",
563
+ "sound_duration": "7.875",
564
+ "flow_shift": "10.0",
565
+ "extra_params": json.dumps(
566
+ {
567
+ "use_resolution_template": False,
568
+ "use_duration_template": False,
569
+ "guardrails": True,
570
+ }
571
+ ),
572
+ "seed": "17",
573
+ }
574
+
575
+ # 3. Send the POST request
576
+ url = "http://localhost:8000/v1/videos/sync"
577
+ print("Sending request to server...")
578
+ response = requests.post(
579
+ url,
580
+ data=data,
581
+ headers={"Accept": "video/mp4"},
582
+ )
583
+ response.raise_for_status()
584
+
585
+ # 4. Save the generated video
586
+ output_path = Path("/tmp/cosmos3_super_t2vs.mp4")
587
+ output_path.write_bytes(response.content)
588
+ print(f"Saved video to {output_path}")
589
+ ```
590
+
591
+ Example output:
592
+
593
+ <video controls width="1280" height="720" src="https://huggingface.co/nvidia/Cosmos3-Super-FP8/resolve/main/assets/example_t2vs_output.mp4"></video>
594
+
595
+ ---
596
+
597
+ ##### Action generation
598
+
599
+ The forward-dynamics example uses AgiBotWorld-Beta robotics action trajectories, and the inverse-dynamics examples use autonomous-vehicle (AV) action trajectories. Source files:
600
+
601
+ - Forward dynamics first frame: `assets/example_action_fd_agibotworld_first_frame.png`
602
+ - Forward dynamics action chunks: `assets/example_action_fd_agibotworld_action_chunks.json`
603
+ - Forward dynamics output video: `assets/example_action_fd_agibotworld_4chunk_output.mp4`
604
+ - Inverse dynamics source videos: `assets/example_action_id_av_0_input.mp4`, `assets/example_action_id_av_1_input.mp4`
605
+ - Inverse dynamics predicted actions: `assets/example_action_id_av_0_output.json`, `assets/example_action_id_av_1_output.json`
606
+
607
+ ###### Action forward dynamics
608
+
609
+ The example below performs a 4-chunk AgiBotWorld-Beta robotics rollout with the vLLM-Omni `/v1/videos/sync` inference endpoint. Each request sends one conditioning frame through `input_reference` and one 16-step normalized 29-D action chunk through `extra_params["action"]`. The request also sets the top-level `size` field to the input image resolution, so vLLM-Omni returns each chunk at the same resolution as the conditioning image without reflection padding. The stitched output drops each chunk's conditioning frame, producing 64 generated frames. The script extracts the last generated frame from each chunk and uses it as the next chunk's conditioning frame.
610
+
611
+ ```python
612
+ import json
613
+ import mimetypes
614
+ from pathlib import Path
615
+
616
+ import imageio.v3 as iio
617
+ import numpy as np
618
+ import requests
619
+ from PIL import Image
620
+
621
+ url = "http://localhost:8000/v1/videos/sync"
622
+ first_frame_path = Path("assets/example_action_fd_agibotworld_first_frame.png")
623
+ action_spec = json.loads(Path("assets/example_action_fd_agibotworld_action_chunks.json").read_text())
624
+ action_chunks = action_spec["action_chunks"]
625
+
626
+ prompt = action_spec.get("prompt", "Pickup items in the supermarket")
627
+ fps = int(action_spec.get("fps", 10))
628
+ action_chunk_size = int(action_spec.get("action_chunk_size", 16))
629
+ current_frame_path = first_frame_path
630
+ input_width, input_height = Image.open(first_frame_path).size
631
+ chunk_video_paths = []
632
+ stitch_frames = []
633
+
634
+ for chunk_idx, action_chunk in enumerate(action_chunks):
635
+ mime_type = mimetypes.guess_type(current_frame_path)[0] or "image/png"
636
+ extra_params = {
637
+ "action_mode": "forward_dynamics",
638
+ "domain_name": action_spec.get("domain_name", "agibotworld"),
639
+ "action_chunk_size": action_chunk_size,
640
+ "image_size": action_spec.get("image_size", 480),
641
+ "view_point": action_spec.get("view_point", "concat_view"),
642
+ "action": action_chunk,
643
+ "guardrails": True,
644
+ }
645
+ data = {
646
+ "prompt": prompt,
647
+ "num_frames": str(action_chunk_size + 1), # conditioning frame + generated frames
648
+ "fps": str(fps),
649
+ "size": f"{input_width}x{input_height}", # return chunks at input resolution
650
+ "num_inference_steps": "30",
651
+ "guidance_scale": "1.0",
652
+ "flow_shift": "10.0",
653
+ "seed": "0",
654
+ "extra_params": json.dumps(extra_params),
655
+ }
656
+
657
+ with current_frame_path.open("rb") as image_file:
658
+ files = {"input_reference": (current_frame_path.name, image_file, mime_type)}
659
+ print(f"Sending action FD chunk {chunk_idx} to vLLM-Omni...")
660
+ response = requests.post(
661
+ url,
662
+ data=data,
663
+ files=files,
664
+ headers={"Accept": "video/mp4"},
665
+ timeout=600,
666
+ )
667
+ response.raise_for_status()
668
+
669
+ chunk_video_path = Path(f"/tmp/cosmos3_super_action_fd_chunk_{chunk_idx:02d}.mp4")
670
+ chunk_video_path.write_bytes(response.content)
671
+ chunk_video_paths.append(chunk_video_path)
672
+
673
+ # The returned chunk contains the conditioning frame followed by generated frames.
674
+ # Drop the conditioning frame when stitching the generated-only rollout.
675
+ frames = iio.imread(chunk_video_path)
676
+ stitch_frames.extend(frames[1:])
677
+
678
+ # Autoregressive conditioning: use the final generated frame from this chunk
679
+ # as the input image for the next vLLM-Omni request.
680
+ if chunk_idx + 1 < len(action_chunks):
681
+ current_frame_path = Path(f"/tmp/cosmos3_super_action_fd_ar_frame_{chunk_idx + 1:02d}.png")
682
+ iio.imwrite(current_frame_path, frames[-1])
683
+
684
+ stitched_path = Path("/tmp/cosmos3_super_action_fd_agibotworld_4chunk.mp4")
685
+ iio.imwrite(stitched_path, np.asarray(stitch_frames), fps=fps)
686
+ print("Generated chunk videos:", chunk_video_paths)
687
+ print("Saved stitched rollout:", stitched_path)
688
+ print("stitched resolution:", f"{input_width}x{input_height}")
689
+ ```
690
+
691
+
692
+ Example output:
693
+
694
+ <video width="640" controls src="https://huggingface.co/nvidia/Cosmos3-Super-FP8/resolve/main/assets/example_action_fd_agibotworld_4chunk_output.mp4"></video>
695
+
696
+ ###### Action inverse dynamics
697
+
698
+ ```python
699
+ import json
700
+ import time
701
+ from pathlib import Path
702
+
703
+ import requests
704
+
705
+ base_url = "http://localhost:8000"
706
+ input_videos = {
707
+ "av_inverse_0": Path("assets/example_action_id_av_0_input.mp4"),
708
+ "av_inverse_1": Path("assets/example_action_id_av_1_input.mp4"),
709
+ }
710
+
711
+ for name, video_path in input_videos.items():
712
+ extra_params = {
713
+ "action_mode": "inverse_dynamics",
714
+ "domain_name": "av",
715
+ "action_chunk_size": 60,
716
+ "image_size": 480,
717
+ "view_point": "ego_view",
718
+ "raw_action_dim": 9,
719
+ "guardrails": True,
720
+ }
721
+ data = {
722
+ "prompt": "You are an autonomous vehicle planning system.",
723
+ "num_frames": "61",
724
+ "fps": "10",
725
+ "num_inference_steps": "30",
726
+ "guidance_scale": "1.0",
727
+ "flow_shift": "10.0",
728
+ "seed": "0",
729
+ "extra_params": json.dumps(extra_params),
730
+ }
731
+
732
+ with video_path.open("rb") as video_file:
733
+ files = {
734
+ "input_reference": (video_path.name, video_file, "video/mp4"),
735
+ }
736
+ print(f"Submitting {name} request to server...")
737
+ response = requests.post(f"{base_url}/v1/videos", data=data, files=files)
738
+ response.raise_for_status()
739
+ initial = response.json()
740
+
741
+ while True:
742
+ response = requests.get(f"{base_url}/v1/videos/{initial['id']}", timeout=30)
743
+ response.raise_for_status()
744
+ final = response.json()
745
+ print(initial["id"], final.get("status"), f"{final.get('progress', 0)}%")
746
+ if final.get("status") == "completed":
747
+ break
748
+ if final.get("status") in {"failed", "cancelled"}:
749
+ raise RuntimeError(json.dumps(final, indent=2))
750
+ time.sleep(2)
751
+
752
+ action = final.get("action")
753
+ if not action or "data" not in action:
754
+ raise RuntimeError(f"Response did not include action data: {json.dumps(final, indent=2)}")
755
+
756
+ output_path = Path(f"/tmp/cosmos3_super_action_id_{name}.json")
757
+ output_path.write_text(json.dumps(action, indent=2))
758
+ print(f"Saved predicted action to {output_path}")
759
+ print("action shape:", action.get("shape"), "dtype:", action.get("dtype"))
760
+ ```
761
+
762
+ Example outputs:
763
+
764
+ - [av_inverse_0 predicted action JSON](https://huggingface.co/nvidia/Cosmos3-Super-FP8/blob/main/assets/example_action_id_av_0_output.json)
765
+ - [av_inverse_1 predicted action JSON](https://huggingface.co/nvidia/Cosmos3-Super-FP8/blob/main/assets/example_action_id_av_1_output.json)
766
+
767
+ <img width="1280" src="https://huggingface.co/nvidia/Cosmos3-Super-FP8/resolve/main/assets/example_action_id_av_0_output.png">
768
+
769
+ <img width="1280" src="https://huggingface.co/nvidia/Cosmos3-Super-FP8/resolve/main/assets/example_action_id_av_1_output.png">
770
+
771
+ ### vLLM
772
+
773
+ #### General Invocation
774
+
775
+ You can use the release-tested `vllm` package for deploying an OpenAI-compatible API endpoint:
776
+
777
+ ```shell
778
+ uv venv --python 3.13 --seed --managed-python
779
+ source .venv/bin/activate
780
+ uv pip install --torch-backend=cu130 "vllm==0.21.0" \
781
+ "vllm-cosmos3 @ git+https://github.com/NVIDIA/cosmos-framework.git#subdirectory=packages/vllm-cosmos3" \
782
+ openai
783
+ ```
784
+
785
+ Use `--torch-backend=cu130 "vllm==0.21.0"` for CUDA 13 drivers. For CUDA 12.8 drivers, use `--torch-backend=cu128 "vllm==0.19.1"`.
786
+
787
+ Start the Reasoner server:
788
+
789
+ ```shell
790
+ CUDA_VISIBLE_DEVICES=0,1,2,3 \
791
+ vllm serve nvidia/Cosmos3-Super-FP8 \
792
+ --hf-overrides '{"architectures": ["Cosmos3ReasonerForConditionalGeneration"]}' \
793
+ --tensor-parallel-size 4 \
794
+ --mm-encoder-tp-mode data \
795
+ --async-scheduling \
796
+ --allowed-local-media-path / \
797
+ --media-io-kwargs '{"video": {"num_frames": -1}}' \
798
+ --port 8000
799
+ ```
800
+
801
+ #### Examples
802
+
803
+ ##### Reasoning
804
+
805
+ Run this example from the model repository root. It reads the robot planning prompt from `assets/example_reasoning_prompt.json` and sends `assets/example_reasoning_input.png` to the local vLLM server.
806
+
807
+ ```python
808
+ import json
809
+ from pathlib import Path
810
+
811
+ import openai
812
+
813
+ # 1. Read the image reasoning prompt
814
+ example = json.load(open("assets/example_reasoning_prompt.json"))
815
+ image_path = Path("assets/example_reasoning_input.png").resolve()
816
+ image_url = image_path.as_uri()
817
+
818
+ # 2. Query the OpenAI-compatible vLLM server
819
+ client = openai.OpenAI(
820
+ api_key="EMPTY",
821
+ base_url="http://localhost:8000/v1",
822
+ )
823
+
824
+ response = client.chat.completions.create(
825
+ model=client.models.list().data[0].id,
826
+ messages=[
827
+ {
828
+ "role": "user",
829
+ "content": [
830
+ {"type": "image_url", "image_url": {"url": image_url}},
831
+ {"type": "text", "text": example["prompt"]},
832
+ ],
833
+ },
834
+ ],
835
+ max_tokens=example["max_tokens"],
836
+ seed=0,
837
+ )
838
+
839
+ # 3. Print the generated reasoning output
840
+ print(response.choices[0].message.content)
841
+ ```
842
+
843
+ Example input:
844
+
845
+ <img src="assets/example_reasoning_input.png" width="640">
846
+
847
+ Prompt:
848
+
849
+ ```text
850
+ The task is to put flower into the red bottle. Generate a plan consisting of subtasks for accomplish the task.
851
+ ```
852
+
853
+ Example output from the command above:
854
+
855
+ ```text
856
+ 1. Move the arm to the left side of the table.
857
+ 2. Pick up the flower.
858
+ 3. Move the arm to the right side of the table.
859
+ 4. Place the flower into the red bottle.
860
+ ```
861
+
862
+ ### Diffusers
863
+
864
+ #### Container
865
+
866
+ To install diffusers with Cosmos3OmniPipeline:
867
+
868
+ ```
869
+ uv venv --python 3.13 --seed --managed-python
870
+ source .venv/bin/activate
871
+ uv pip install \
872
+ "diffusers @ git+https://github.com/huggingface/diffusers.git" \
873
+ accelerate \
874
+ av \
875
+ cosmos_guardrail \
876
+ huggingface_hub \
877
+ imageio \
878
+ imageio-ffmpeg \
879
+ torch \
880
+ torchvision \
881
+ transformers
882
+
883
+ ```
884
+
885
+ #### Examples
886
+
887
+ ##### Text to video generation
888
+
889
+ Run this example from the model repository root. It reads the JSON-upsampled prompt from `assets/example_t2v_prompt.json` and the negative prompt from `assets/negative_prompt.json`. It then loads the pipeline and generate the video, then save it to an MP4 file.
890
+
891
+ ```python
892
+ import json
893
+ import torch
894
+ from diffusers import Cosmos3OmniPipeline
895
+ from diffusers.schedulers.scheduling_unipc_multistep import UniPCMultistepScheduler
896
+ from diffusers.utils import export_to_video
897
+
898
+ # Read JSON-upsampled prompt and negative prompt
899
+ json_prompt = json.load(open("assets/example_t2v_prompt.json"))
900
+ negative_prompt = json.load(open("assets/negative_prompt.json"))
901
+
902
+ pipe = Cosmos3OmniPipeline.from_pretrained(
903
+ "nvidia/Cosmos3-Super-FP8",
904
+ torch_dtype=torch.bfloat16,
905
+ device_map="cuda",
906
+ enable_safety_checker=True,
907
+ )
908
+ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=10.0)
909
+
910
+ result = pipe(
911
+ prompt=json.dumps(json_prompt),
912
+ negative_prompt=json.dumps(negative_prompt),
913
+ num_frames=189,
914
+ height=720,
915
+ width=1280,
916
+ num_inference_steps=35,
917
+ guidance_scale=6.0,
918
+ generator=torch.Generator(device="cuda").manual_seed(123),
919
+ )
920
+
921
+ export_to_video(result.video, "/tmp/cosmos3_super_t2v_diffusers.mp4", fps=24)
922
+ print("Saved video to /tmp/cosmos3_super_t2v_diffusers.mp4")
923
+ ```
924
+
925
+ Example output:
926
+
927
+ <video controls width="1280" height="720" src="https://huggingface.co/nvidia/Cosmos3-Super-FP8/resolve/main/assets/example_t2v_diffusers_output.mp4"></video>
928
+
929
+ ### SGLang
930
+
931
+ [SGLang Diffusion](https://docs.sglang.io/docs/sglang-diffusion/index) can serve `nvidia/Cosmos3-Super-FP8` through OpenAI-compatible image and video generation endpoints. Install SGLang from the main branch with diffusion dependencies, then start the server:
932
+
933
+ ```bash
934
+ git clone --branch main https://github.com/sgl-project/sglang.git
935
+ cd sglang
936
+ pip install -e "python[diffusion]"
937
+ pip install "cosmos-guardrail==0.3.1"
938
+
939
+ sglang serve \
940
+ --model-path nvidia/Cosmos3-Super-FP8 \
941
+ --num-gpus 4
942
+ ```
943
+
944
+ Cosmos 3 support in SGLang Diffusion currently requires the SGLang main branch. Switch to a stable SGLang release once Cosmos 3 support is included there.
945
+
946
+ For the video-specialized checkpoint:
947
+
948
+ ```bash
949
+ sglang serve \
950
+ --model-path nvidia/Cosmos3-Super-Image2Video \
951
+ --num-gpus 4
952
+ ```
953
+
954
+ Supported SGLang endpoints:
955
+
956
+ | Mode | Endpoint | Notes |
957
+ | --- | --- | --- |
958
+ | Text to image | `POST /v1/images/generations` | Returns base64 image data by default |
959
+ | Text to video | `POST /v1/videos` | Creates an async job; poll `GET /v1/videos/{id}` and download `/content` |
960
+ | Image to video | `POST /v1/videos` | Upload the conditioning image with `input_reference` |
961
+
962
+ Example text-to-video request:
963
+
964
+ ```bash
965
+ job_id=$(curl -sS -X POST http://localhost:30000/v1/videos \
966
+ --form-string "prompt=A small warehouse robot moves a blue box across a clean floor." \
967
+ --form-string "negative_prompt=blurry, distorted, low quality" \
968
+ --form-string "size=1280x720" \
969
+ --form-string "num_frames=81" \
970
+ --form-string "fps=24" \
971
+ --form-string "num_inference_steps=35" \
972
+ --form-string "guidance_scale=4.0" \
973
+ --form-string "flow_shift=10.0" \
974
+ --form-string "seed=42" \
975
+ --form-string 'extra_params={"guardrails":true,"use_resolution_template":false,"use_duration_template":false}' \
976
+ | python -c 'import json, sys; print(json.load(sys.stdin)["id"])')
977
+
978
+ while true; do
979
+ status=$(curl -sS "http://localhost:30000/v1/videos/${job_id}" \
980
+ | python -c 'import json, sys; print(json.load(sys.stdin)["status"])')
981
+ [ "$status" = "completed" ] && break
982
+ [ "$status" = "failed" ] && exit 1
983
+ sleep 1
984
+ done
985
+
986
+ curl -sS -L "http://localhost:30000/v1/videos/${job_id}/content" \
987
+ -o cosmos3_super_t2v_output.mp4
988
+ ```
989
+
990
+ Video-to-video, video-with-sound, and action generation are not supported by SGLang yet.
991
+
992
+ For complete serving instructions and request examples, see the [Cosmos3 SGLang cookbook](https://docs.sglang.io/cookbook/diffusion/Cosmos/Cosmos3).
993
+
994
+ ## Limitations
995
+
996
+ Cosmos3 may produce imperfect outputs in challenging scenarios. Generation artifacts include temporal inconsistency, unstable camera or object motion, imprecise physical interactions, inaccurate audio-video synchronization, and action-state drift — especially in long-horizon or high-resolution outputs. Reasoning may also be incorrect: object states, causal relationships, spatial geometry, temporal ordering, agent intent, and future outcomes can be misinferred, and complex or long-context inputs may yield hallucinated entities, inconsistent interpretations, or implausible predictions. Because the model lacks an explicit physics simulator, 3D geometry, 4D space-time evolution, object permanence, contact dynamics, and physical laws are only approximated — producing artifacts such as disappearing or morphing objects, unrealistic collisions, and physically implausible motions. Quality further degrades in out-of-distribution environments, safety-critical edge cases, and domains underrepresented in training.
997
+
998
+ Cosmos3 outputs should not be treated as physically accurate simulation, reliable ground-truth reasoning, or safety-certified decision making. Applications involving robotics control, autonomous systems, scientific simulation, or safety-critical planning require additional validation, external constraints, system-level safety analysis, and domain-specific guardrails before deployment.
999
+
1000
+ ## Inference
1001
+
1002
+ **Acceleration Engine:** [PyTorch](https://pytorch.org/), [vLLM](https://github.com/vllm-project/vllm), [vLLM-Omni](https://github.com/vllm-project/vllm-omni), [Hugging Face Diffusers](https://github.com/huggingface/diffusers), [SGLang](https://github.com/sgl-project/sglang), [SGLang Diffusion](https://docs.sglang.io/docs/sglang-diffusion/index)
1003
+
1004
+ **Test Hardware:** GB200 and H100
1005
+
1006
+ ## Ethical Considerations
1007
+
1008
+ NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. Developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
1009
+
1010
+ Please make sure you have proper rights and permissions for all input image and video content; if image or video includes people, personal health information, or intellectual property, the image or video generated will not blur or maintain proportions of image subjects included.
1011
+
1012
+ Users are responsible for model inputs and outputs. Users are responsible for ensuring safe integration of this model, including implementing guardrails as well as other safety mechanisms, prior to deployment.
1013
+
1014
+ For more detailed information on ethical considerations for this model, please see the Model Card++ [Explainability](EXPLAINABILITY.md), [Bias](BIAS.md), [Safety & Security](SAFETY.md), and [Privacy](PRIVACY.md) subcards. Please report model quality, risk, security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
images/benchmark-action-1.png ADDED

Git LFS Details

  • SHA256: 11772abc8515d29e62403d12a19194308e513d323852de9c7878a1006a3660ee
  • Pointer size: 131 Bytes
  • Size of remote file: 101 kB
images/benchmark-overall.png ADDED

Git LFS Details

  • SHA256: 25425f6be1f1f2099c484f3e887b420d18728de1f79e4600770461ef94ed44c7
  • Pointer size: 131 Bytes
  • Size of remote file: 269 kB
images/benchmark-reasoning.png ADDED

Git LFS Details

  • SHA256: ba95a3b243fc23c644e12dd8b22794af7002a1ee5a469322dbe1a55f080a12b4
  • Pointer size: 132 Bytes
  • Size of remote file: 2.68 MB
images/benchmark-visual-audio.png ADDED

Git LFS Details

  • SHA256: 2faab808cd9871de94c099ccc4bca428206814d818224879726d54e5a80b2578
  • Pointer size: 131 Bytes
  • Size of remote file: 366 kB