Cosmos-Tokenize1 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. The models are 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.
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.
Model Architecture:
Cosmos-Tokenize1-DI16x16-360p is a lightweight and computationally efficient architecture. The encoder starts with a 1-level Haar wavelet transform layer, which down-samples inputs by a factor of 2 in both spatial dimension. Likewise, the decoder ends with an inverse wavelet transform. We employ the vanilla autoencoder (AE) formulation to model the latent space for continuous tokenizers.
image/jpeg
Input/Output Specifications
Encoder
Input
Type: Images
Format: RGB (Red, Green, Blue)
Parameters: Two-dimensional (2D)
Properties:
Resolution: Minimum: 256px (shorter side). Maximum: Up to 4K
Output
Type: Tokens
Format: 16-Channel Vector
Parameters: Two-dimensional (2D)
Properties:
Continuous-valued feature vectors with a dimensionality of 16
Decoder
Input
Type: Tokens
Format: 16-Channel Vector
Parameters: Two-dimensional (2D)
Properties:
Continuous-valued feature vectors with a dimensionality of 16
Output
Type Images (matching input type)
Format: RGB (Red, Green, Blue)
Parameters: Two-dimensional (2D)
Properties:
Resolution: Same as input resolution. The output image is a reconstruction of the input image.
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.)
We have extensively evaluated the Cosmos Tokenizer suite on various image and video benchmark datasets.
For the evaluation of image tokenizers, we follow prior art to evaluate on MS-COCO 2017, ImageNet-1K, FFHQ, and CelebA-HQ. We use the MS-COCO 2017 validation subset of 5,000 images, ImageNet-1K validation subset of 50,000 images, FFHQ subset of 10,000 images, and CelebA-HQ subset of 14,645 images as image evaluation benchmark.
Tokenizer
Compression Ratio
Quantization
PSNR (MS-COCO)
SSIM (MS-COCO)
rFID (MS-COCO)
PSNR (ImageNet-1K)
SSIM (ImageNet-1K)
rFID (ImageNet-1K)
PSNR (FFHQ)
SSIM (FFHQ)
rFID (FFHQ)
PSNR (CelebA-HQ)
SSIM (CelebA-HQ)
rFID (CelebA-HQ)
Open-MAGVIT2
16×16
LFQ
30.06
0.502
6.649
29.62
0.398
2.701
31.77
0.774
1.994
32.36
0.844
2.865
LlamaGen
8×8
VQ
30.71
0.616
4.123
30.28
0.498
1.403
33.39
0.868
0.701
34.82
0.937
0.502
LlamaGen
16×16
VQ
29.93
0.491
6.077
29.81
0.448
1.657
31.58
0.772
1.366
32.18
0.837
1.113
Cosmos-Tokenizer-DI
8×8
FSQ
31.74
0.730
4.564
31.73
0.725
1.841
35.35
0.892
0.555
37.77
0.948
0.261
Cosmos-Tokenizer-DI
16×16
FSQ
30.74
0.591
12.252
30.69
0.582
6.529
33.17
0.808
7.663
33.86
0.854
5.953
We compare with the state-of-the-art discrete image tokenizers, Open-MAGVIT2 and LlamaGen.
Evaluation metrics:
Peak Signal-to-Noise Ratio (PSNR)
Structural Similarity (SSIM)
Reconstruction Fréchet Inception Distance (rFID)
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)
LlamaGen
1024x1024
8×8
70M
475
Cosmos-Tokenizer-DI
1024x1024
8×8
79M
64.2
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.
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.
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.
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.
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.