You need to agree to share your contact information to access this model

The information you provide will be collected, stored, processed and shared in accordance with the NVIDIA Privacy Policy.

NVIDIA Open Model License Agreement

Version Release Date: January 6, 2025
This NVIDIA Open Model License Agreement (the "Agreement") is a legal agreement between the Legal Entity You represent, or if no entity is identified, You and NVIDIA Corporation and its Affiliates ("NVIDIA") and governs Your use of the Models that NVIDIA provides to You under this Agreement. NVIDIA and You are each a "party" and collectively the "parties."
NVIDIA models released under this Agreement are intended to be used permissively and enable the further development of AI technologies. Subject to the terms of this Agreement, NVIDIA confirms that:

  • 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 Model Derivatives.
    By using, reproducing, modifying, distributing, performing or displaying any portion or element of the Model or Derivative Model, or otherwise accepting the terms of this Agreement, you agree to be bound by this Agreement.

1. Definitions

The following definitions apply to this Agreement:

1.1. "NVIDIA Cosmos Model" means a multimodal Model shared under this Agreement.

1.2. "Derivative Model" means all (a) modifications to the Model, (b) works based on the Model, and (c) any other derivative works of the Model. An output is not a Derivative Model.

1.3. "Legal Entity" means the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares, or (c) beneficial ownership of such entity.

1.4. "Model" means the machine learning model, software, checkpoints, learnt weights, algorithms, parameters, configuration files and documentation shared under this Agreement.

1.5. "You" or "Your" means an individual or Legal Entity exercising permissions granted by this Agreement.

2. Conditions for Use, License Grant, AI Ethics and IP Ownership

2.1. Conditions for Use. The Model and any Derivative Model are subject to additional terms as described in Section 2 and Section 3 of this Agreement and govern Your use. If You institute copyright or patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Model or a Derivative Model constitutes direct or contributory copyright or patent infringement, then any licenses granted to You under this Agreement for that Model or Derivative Model will terminate as of the date such litigation is filed. 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 this Agreement will automatically terminate. NVIDIA may update this Agreement to comply with legal and regulatory requirements at any time and You agree to either comply with any updated license or cease Your copying, use, and distribution of the Model and any Derivative Model.

2.2. License Grant. The rights granted herein are explicitly conditioned on Your full compliance with the terms of this Agreement. Subject to the terms and conditions of this Agreement, NVIDIA hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, revocable (as stated in Section 2.1) license to publicly perform, publicly display, reproduce, use, create derivative works of, make, have made, sell, offer for sale, distribute (through multiple tiers of distribution) and import the Model.

2.3. AI Ethics. Use of the Models under the Agreement must be consistent with NVIDIA's Trustworthy AI terms found at https://www.nvidia.com/en-us/agreements/trustworthy-ai/terms/.

2.4. NVIDIA owns the Model and any Model Derivatives created by NVIDIA. Subject to NVIDIA's underlying ownership rights in the Model or its Model Derivatives, You are and will be the owner of Your Model Derivatives. NVIDIA claims no ownership rights in outputs. You are responsible for outputs and their subsequent uses. Except as expressly granted in this Agreement, (a) NVIDIA reserves all rights, interests and remedies in connection with the Model and (b) no other license or right is granted to you by implication, estoppel or otherwise.

3. Redistribution

You may reproduce and distribute copies of the Model or Derivative Models thereof in any medium, with or without modifications, provided that You meet the following conditions:

3.1. If you distribute the Model, You must give any other recipients of the Model a copy of this Agreement and include the following attribution notice within a "Notice" text file with such copies: "Licensed by NVIDIA Corporation under the NVIDIA Open Model License";

3.2. If you distribute or make available a NVIDIA Cosmos Model, or a product or service (including an AI model) that contains or uses a NVIDIA Cosmos Model, use a NVIDIA Cosmos Model to create a Derivative Model, or use a NVIDIA Cosmos Model or its outputs to create, train, fine tune, or otherwise improve an AI model, you will include "Built on NVIDIA Cosmos" on a related website, user interface, blogpost, about page, or product documentation; and

3.3. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Models as a whole, provided Your use, reproduction, and distribution of the Model otherwise complies with the conditions stated in this Agreement.

4. Trademarks

This Agreement does not grant permission to use the trade names, trademarks, service marks, or product names of NVIDIA, except as required for reasonable and customary use in describing the origin of the Model and reproducing the content of the "Notice" text file.

5. Disclaimer of Warranty

Unless required by applicable law or agreed to in writing, NVIDIA provides the Model on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Model, Derivative Models and outputs and assume any risks associated with Your exercise of permissions under this Agreement.

6. Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, will NVIDIA be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this Agreement or out of the use or inability to use the Model, Derivative Models or outputs (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if NVIDIA has been advised of the possibility of such damages.

7. Indemnity

You will indemnify and hold harmless NVIDIA from and against any claim by any third party arising out of or related to your use or distribution of the Model, Model Derivatives or outputs.

8. Feedback

NVIDIA appreciates your feedback, and You agree that NVIDIA may use it without restriction or compensation to You.

9. Governing Law

This Agreement will be governed in all respects by the laws of the United States and the laws of the State of Delaware, without regard to conflict of laws principles or the United Nations Convention on Contracts for the International Sale of Goods. The state and federal courts residing in Santa Clara County, California will have exclusive jurisdiction over any dispute or claim arising out of or related to this Agreement, and the parties irrevocably consent to personal jurisdiction and venue in those courts; except that, either party may apply for injunctive remedies or an equivalent type of urgent legal relief in any jurisdiction.

10. Trade and Compliance

You agree to comply with all applicable export, import, trade and economic sanctions laws and regulations, as amended, including without limitation U.S. Export Administration Regulations and Office of Foreign Assets Control regulations. These laws include restrictions on destinations, end-users and end-use.

Log in or Sign Up to review the conditions and access this model content.

Cosmos Tokenizer: A suite of image and video tokenizers

Website

Model Overview

Description:

Cosmos Tokenizer is a suite of visual tokenizers for images and videos that delivers various compression rates while maintaining high reconstruction quality. Cosmos Tokenizer can serve as an effective and efficient building block in both diffusion-based and autoregressive models for image and video generation. This model is ready for commercial use.

Our tokenizers come in two types: Continuous (C) and Discrete (D), each with Image (I) and Video (V) variants:

  • Continuous tokenizers encode visual data into continuous latent embeddings, as shown in latent diffusion models like Stable Diffusion. These embeddings are suitable for models that generate data by sampling from continuous distributions.
  • Discrete tokenizers encode visual data into discrete latent codes, mapping them into quantized indices, as seen in autoregressive transformers such as VideoPoet. This discretization is required for models that generate data by optimizing the cross-entropy loss, such as the GPT models.
Continuous ( C ) Discrete ( D )
Images ( I ) Cosmos-Tokenizer-CI Cosmos-Tokenizer-DI
Videos ( V ) Cosmos-Tokenizer-CV Cosmos-Tokenizer-DV

Given an image or a video, Cosmos Tokenizer outputs either continuous latents or discrete tokens. Cosmos Tokenizer achieves spatial compression rates of 8x8 or 16x16 and temporal compression factors of 4x or 8x, resulting in a total compression factor of up to 2048x (=8x16x16). Cosmos Tokenizer delivers 8x more total compression than state-of-the-art (SOTA) methods while simultaneously maintaining higher image quality and running up to 12x faster than the best available SOTA tokenizers.

Model Developer: NVIDIA

Model Versions

This release (v1.0) of Cosmos Tokenizer includes the following tokenizers:

  • Continuous Tokenizers
  • Discrete Tokenizers

The previous release (v0.1) of Cosmos Tokenizer included the following tokenizers:

License:

This model is released under the NVIDIA Open Model License. For a custom license, please contact [email protected].

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.

Model Architecture:

We designed Cosmos Tokenizer using a lightweight and computationally efficient architecture, featuring a temporally causal design. Specifically, we employ causal temporal convolution and causal temporal attention layers to preserve the natural temporal order of video frames, ensuring seamless tokenization of images and videos using a single unified network architecture. The encoder and decoder form a symmetrical pair, which are mirrors of each other. The encoder starts with a 2-level Haar wavelet transform layer, which down-samples inputs by a factor of 4 in both spatial and temporal dimensions. Likewise, the decoder ends with an inverse wavelet transform. We employ the vanilla autoencoder (AE) formulation to model the latent space for continuous tokenizers. For discrete tokenizers, we adopt the Finite-Scalar-Quantization (FSQ) as the latent space quantizer.

image/jpeg

Input/Output Specifications

Encoder

  • Input

    • Type: Images or Videos
    • Format: RGB (Red, Green, Blue)
    • Properties:
      • Resolution: Minimum: 256px (shorter side). Maximum: Up to 4K
      • Video Length: Up to 8 seconds for 1080p videos (bounded by A100 80G GPU memory; higher resolutions will have shorter supported durations)
  • Output

    • Type: Tokens
    • Properties:
      • Integer indices ranging from 0 to 63,999

Decoder

  • Input

    • Type: Tokens
    • Properties:
      • Integer indices ranging from 0 to 63,999
  • Output

    • Type Images or Videos (matching input type)
    • Format: RGB (Red, Green, Blue)
    • Properties:
      • Resolution: Same as input resolution
      • Video Length: Same as input video length

Software Integration (Required For NVIDIA Models Only):

Runtime Engine(s):

Supported Hardware Microarchitecture Compatibility:

  • NVIDIA Ampere (e.g., A100)
  • NVIDIA Hopper (e.g., H100)

Note: We have only tested Cosmos Tokenizer with BF16 precision on Ampere and Hopper GPUs. If you are using older versions of NVIDIA GPUs (e.g., NVIDIA Volta GPUs), you may need to switch to FP32 precision.

Operating System(s):

  • Linux (We have not tested on other operating systems.)

Usage

Inference Engines:

Inference with Cosmos-Tokenizer (PyTorch)

Step-1: Installation of Cosmos-Tokenizer

Note: Currently, the Cosmos-Tokenizer code is only supported on Linux.

  • Please clone the Cosmos-Tokenizer from GitHub repo github.com/NVIDIA/Cosmos-Tokenizer.

    git clone https://github.com/NVIDIA/Cosmos-Tokenizer.git
    cd Cosmos-Tokenizer
    
  • Install dependencies

    pip3 install -r requirements.txt
    apt-get install -y ffmpeg
    
  • Preferably, you could build a docker image using our provided Dockerfile.

    docker build -t cosmos-docker -f Dockerfile.  
    # You can run the container as:
    docker run --gpus all -it --rm -v /home/${USER}:/home/${USER} \
        --workdir ${PWD} cosmos-docker /bin/bash
    

Step-2: Download Pre-trained Checkpoints

  • Create a local directory for the pre-trained checkpoints and download the pre-trained checkpoints from HuggingFace.

    from huggingface_hub import login, snapshot_download
    import os
    # You could get your Hugging Face token from https://huggingface.co/settings/tokens
    login(token=<YOUT-HF-TOKEN>, add_to_git_credential=True)
    # You could specify the tokenizers you want to download.
    model_names = [
            "Cosmos-1.0-Tokenizer-DV8x16x16",
    ]
    for model_name in model_names:
        hf_repo = "nvidia/" + model_name
        local_dir = "pretrained_ckpts/" + model_name
        os.makedirs(local_dir, exist_ok=True)
        print(f"downloading {model_name} to {local_dir}...")
        snapshot_download(repo_id=hf_repo, local_dir=local_dir)
    
  • Under the ech checkpoint directory pretrained_ckpts/<model-name>, we provide the encoder, decoder and the full autoencoder JIT models.

    ├── pretrained_ckpts/  
    │   ├── Cosmos-1.0-Tokenizer-DV8x16x16/
    │   │   ├── encoder.jit
    │   │   ├── decoder.jit
    │   │   ├── autoencoder.jit
    │   ...
    

Step-3: Run Inference

You can use the following example commands to encode and decode images or videos. For each, the same command works for both continuous and discrete tokenization. Simply provide the proper JIT-compiled ckpt to checkpoint_enc, checkpoint_dec, or the full autoencoder ckpt to checkpoint.

import torch
from cosmos_tokenizer.video_lib import CausalVideoTokenizer
model_name = "Cosmos-1.0-Tokenizer-DV8x16x16"
input_tensor = torch.randn(1, 3, 9, 512, 512).to('cuda').to(torch.bfloat16)
encoder = CausalVideoTokenizer(checkpoint_enc=f'pretrained_ckpts/{model_name}/encoder.jit')
(indices, codes) = encoder.encode(input_tensor)
torch.testing.assert_close(indices.shape, (1, 2, 32, 32))
torch.testing.assert_close(codes.shape, (1, 6, 2, 32, 32))

# The input tensor can be reconstructed by the decoder as:
decoder = CausalVideoTokenizer(checkpoint_dec=f'pretrained_ckpts/{model_name}/decoder.jit')
reconstructed_tensor = decoder.decode(indices)
torch.testing.assert_close(reconstructed_tensor.shape, input_tensor.shape)

The indices will have the shape (1, 2, 32, 32) and contain integral values in the range [1..64K], where the first of the three integral maps represents the first frame. The codes will contain the pre-quantization continuous latent with shape (1, 6, 2, 32, 32), where C=6 represents the number of FSQ levels.

Note: More inference usage commands, including both TorchScript (JIT) and PyTorch Inference APIs on real images and videos, can be found on our GitHub repository github.com/NVIDIA/Cosmos-Tokenizer.

Evaluation

TokenizationPerformance Comparison

We have extensively evaluated the additional Cosmos Tokenizer models on DAVIS video benchmark dataset.

Tokenizer Compression Ratio Height Num. of Frames Quantization PSNR (DAVIS) SSIM (DAVIS) rFVD (DAVIS)
VideoGPT 4×4×4 - - VQ 32.23 0.850 72.33
OmniTokenizer 4×8×8 - - VQ 28.44 0.712 188.60
Cosmos-Tokenizer-DV 4×8×8 720 17 FSQ 32.98 0.818 37.36
Cosmos-Tokenizer-DV 8×8×8 720 17 FSQ 32.11 0.775 100.15
Cosmos-Tokenizer-DV 8×16×16 720 17 FSQ 31.42 0.716 241.52
Cosmos-Tokenizer-DV 8×16×16 720 49 FSQ 31.59 0.719 259.33
  • We compare with the state-of-the-art discrete video tokenizer, OmniTokenizer.
  • Evaluation metrics:
    • Peak Signal-to-Noise Ratio (PSNR)
    • Structural Similarity (SSIM)
    • Reconstruction Fréchet Video Distance (rFVD)

Runtime Comparison

The following table shows the number of parameters and the averaged encoding and decoding times per image or video frame, measured on a single A100 80GB GPU. For comparison, we also list the parameters and average speeds of prior state-of-the-art tokenizer(s) with the same compression ratio.

Tokenizer Resolution Compression Ratio Parameters Time (ms)
OmniTokenizer 720x1280 4×8×8 54M 53.2
Cosmos-DV 720x1280 4×8×8 105M 51.5

Note: We benchmarked the runtime for images under the 8x8 compression and videos under the 4×8×8 compression. Tokenizers with different compression ratios are not included in this comparison.

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.

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.

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.

Bias

Field Response
Participation considerations from adversely impacted groups protected classes in model design and testing: None
Measures taken to mitigate against unwanted bias: None

Explainability

Field Response
Intended Application & Domain: Tokenization of images and videos
Model Type: Auto-Encoder
Intended Users: Generative AI developers for image and video generation models
Output: Images/Videos and Latent Tokens
Describe how the model works: Compresses and decompresses visual input (image/video).
Technical Limitations: Due to tokenizer compression limitations, some visual information (such as small text and other structured fine details) may not be reconstructed accurately. The tokenizers may not produce as high of a reconstruction results for videos with low resolution, e.g. less than 320p.
Verified to have met prescribed NVIDIA quality standards: Yes
Performance Metrics: Peak Signal-to-Noise Ratio (PSNR), Structural Similarity (SSIM), Reconstruction Fréchet Video Distance (rFVD), Reconstruction Fréchet Inception Distance (rFID), Latency
Potential Known Risks: Tokenizer's output can parse all forms of input, including what may be considered toxic, offensive, or indecent.
Licensing: NVIDIA Open Model License

Privacy

Field Response
Generatable or reverse engineerable personal information? No
Protected class data used to create this model? None Known
Was consent obtained for any personal data used? None Known
How often is dataset reviewed? Before Release
Is a mechanism in place to honor data subject right of access or deletion of personal data? Not Applicable
If personal collected for the development of the model, was it collected directly by NVIDIA? Not Applicable
If personal collected for the development of the model by NVIDIA, do you maintain or have access to disclosures made to data subjects? Not Applicable
If personal collected for the development of this AI model, was it minimized to only what was required? Not Applicable
Is there provenance for all datasets used in training? Yes
Does data labeling (annotation, metadata) comply with privacy laws? Yes
Is data compliant with data subject requests for data correction or removal, if such a request was made? Not Applicable

Safety

Field Response
Model Application(s): Tokenization of images and videos
Describe the life critical impact (if present). None Known
Use Case Restrictions: NVIDIA Open Model License
Model and dataset restrictions: The Principle of least privilege (PoLP) is applied limiting access for dataset generation and model development. Restrictions enforce dataset access during training, and dataset license constraints adhered to. Model checkpoints are made available on Hugging Face, and may become available on cloud providers' model catalog.

Core Contributors

Fitsum Reda, Jinwei Gu, Xian Liu, Songwei Ge, Ting-Chun Wang, Haoxiang Wang, Ming-Yu Liu

Downloads last month
108
Inference API
Unable to determine this model’s pipeline type. Check the docs .

Collections including nvidia/Cosmos-1.0-Tokenizer-DV8x16x16