Arsh9210/Cosmos-1.0-Diffusion-7B-Video2World
Cosmos-1.0-Diffusion: A Suite of Diffusion-based World Foundation Models
**Cosmos** | **Code** | **Paper** | **Paper Website**
Model Overview
Description:
Cosmos World Foundation Models: A family of highly performant pre-trained world foundation models purpose-built for generating physics-aware videos and world states for physical AI development.
The Cosmos diffusion models are a collection of diffusion based world foundation models that generate dynamic, high quality videos from text, image, or video inputs. It can serve as the building block for various applications or research that are related to world generation. The models are ready for commercial use under NVIDIA Open Model license agreement.
Model Developer: NVIDIA
Model Versions
In Cosmos 1.0 release, the Cosmos Diffusion WFM family includes the following models:
- Cosmos-1.0-Diffusion-7B-Text2World
- Given a text description, predict an output video of 121 frames.
- Cosmos-1.0-Diffusion-14B-Text2World
- Given a text description, predict an output video of 121 frames.
- Cosmos-1.0-Diffusion-7B-Video2World
- Given a text description and an image as the first frame, predict the future 120 frames.
- Cosmos-1.0-Diffusion-14B-Video2World
- Given a text description and an image as the first frame, predict the future 120 frames.
License:
This model is released under the NVIDIA Open Model License. For a custom license, please contact cosmos-license@nvidia.com.
Under the NVIDIA Open Model License, NVIDIA confirms:
- Models are commercially usable.
- You are free to create and distribute Derivative Models.
- NVIDIA does not claim ownership to any outputs generated using the Models or Derivative Models.
Important Note: If you bypass, disable, reduce the efficacy of, or circumvent any technical limitation, safety guardrail or associated safety guardrail hyperparameter, encryption, security, digital rights management, or authentication mechanism contained in the Model, your rights under NVIDIA Open Model License Agreement will automatically terminate.
- Cosmos-1.0-Guardrail is the safety guardrail for this model.
Model Architecture:
Cosmos-1.0-Diffusion-7B-Video2World is a diffusion transformer model designed for video denoising in the latent space. The network is composed of interleaved self-attention, cross-attention and feedforward layers as its building blocks. The cross-attention layers allow the model to condition on input text throughout the denoising process. Before each layers, adaptive layer normalization is applied to embed the time information for denoising. When image or video is provided as input, their latent frames are concatenated with the generated frames along the temporal dimension. Augment noise is added to conditional latent frames to bridge the training and inference gap.
Input/Output Specifications
- Input
- Input Type(s): Text+Image, Text+Video
- Input Format(s):
- Text: String
- Image: jpg, png, jpeg, webp
- Video: mp4
- Input Parameters:
- Text: One-dimensional (1D)
- Image: Two-dimensional (2D)
- Video: Three-dimensional (3D)
- Other Properties Related to Input:
- The input string should contain fewer than 300 words and should provide descriptive content for world generation, such as a scene description, key objects or characters, background, and any specific actions or motions to be depicted within the 5-second duration.
- The input image should be of 1280x704 resolution.
- The input video should be of 1280x704 resolution and 9 input frames.
- Output
- Output Type(s): Video
- Output Format(s): mp4
- Output Parameters: Three-dimensional (3D)
- Other Properties Related to Output: By default, the generated video is a 5-second clip with a resolution of 1280x704 pixels and a frame rate of 24 frames per second (fps). The video content visualizes the input text description as a short animated scene, capturing key elements within the specified time constraints. Aspect ratios and resolutions are configurable, with options including 1:1 (960x960 pixels), 4:3 (960x704 pixels), 3:4 (704x960 pixels), 16:9 (1280x704 pixels), and 9:16 (704x1280 pixels). The frame rate is also adjustable within a range of 12 to 40 fps.
Software Integration
Runtime Engine(s):
Supported Hardware Microarchitecture Compatibility:
- NVIDIA Blackwell
- NVIDIA Hopper
- NVIDIA Ampere
Note: We have only tested doing inference with BF16 precision.
Operating System(s):
- Linux (We have not tested on other operating systems.)
Usage
- See Cosmos for details.
Cosmos can also be used with Diffusers!
import torch
from diffusers import CosmosVideoToWorldPipeline
from diffusers.utils import export_to_video, load_video
model_id = "nvidia/Cosmos-1.0-Diffusion-7B-Video2World"
pipe = CosmosVideoToWorldPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16)
pipe.to("cuda")
prompt = "The video depicts a winding mountain road covered in snow, with a single vehicle traveling along it. The road is flanked by steep, rocky cliffs and sparse vegetation. The landscape is characterized by rugged terrain and a river visible in the distance. The scene captures the solitude and beauty of a winter drive through a mountainous region."
video = load_video(
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cosmos/cosmos-video2world-input-vid.mp4"
)[:21] # This example uses only the first 21 frames
video = pipe(video=video, prompt=prompt).frames[0]
export_to_video(video, "output.mp4", fps=30)Evaluation
Please see our technical paper for detailed evaluations.
Inference Time and GPU Memory Usage
The numbers provided below may vary depending on system specs and are for reference only.
The following table shows the end-to-end inference runtime on a single H100 GPU, excluding model initialization time:
Ethical Considerations
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. When downloaded or used in accordance with our terms of service, 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.
For more detailed information on ethical considerations for this model, please see the subcards of Explainability, Bias, Safety & Security, and Privacy below. Please report security vulnerabilities or NVIDIA AI Concerns here.
Plus Plus (++) Promise
We value you, the datasets, the diversity they represent, and what we have been entrusted with. This model and its associated data have been:
- Verified to comply with current applicable disclosure laws, regulations, and industry standards.
- Verified to comply with applicable privacy labeling requirements.
- Annotated to describe the collector/source (NVIDIA or a third-party).
- Characterized for technical limitations.
- Reviewed to ensure proper disclosure is accessible to, maintained for, and in compliance with NVIDIA data subjects and their requests.
- Reviewed before release.
- Tagged for known restrictions and potential safety implications.
