Cosmos
Diffusers
Safetensors
cosmos3_omni
nvidia
cosmos3
vllm
vllm-omni
sglang
sglang-diffusion
text, image, video, audio, and action generation
omnimodel
Instructions to use nvidia/Cosmos3-Nano with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Cosmos
How to use nvidia/Cosmos3-Nano with Cosmos:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Diffusers
How to use nvidia/Cosmos3-Nano with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nvidia/Cosmos3-Nano", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| { | |
| "block_quantize": null, | |
| "calib_cfg": { | |
| "method": "max" | |
| }, | |
| "channel_quantize": null, | |
| "disable_conv_quantization": false, | |
| "forward_loop": null, | |
| "modelopt_config": { | |
| "algorithm": "max", | |
| "quant_cfg": [ | |
| { | |
| "enable": false, | |
| "quantizer_name": "*" | |
| }, | |
| { | |
| "cfg": { | |
| "axis": null, | |
| "fake_quant": false, | |
| "num_bits": [ | |
| 4, | |
| 3 | |
| ] | |
| }, | |
| "quantizer_name": "*weight_quantizer" | |
| }, | |
| { | |
| "cfg": { | |
| "axis": null, | |
| "num_bits": [ | |
| 4, | |
| 3 | |
| ] | |
| }, | |
| "quantizer_name": "*input_quantizer" | |
| }, | |
| { | |
| "enable": false, | |
| "parent_class": "nn.BatchNorm1d", | |
| "quantizer_name": "*" | |
| }, | |
| { | |
| "enable": false, | |
| "parent_class": "nn.BatchNorm2d", | |
| "quantizer_name": "*" | |
| }, | |
| { | |
| "enable": false, | |
| "parent_class": "nn.BatchNorm3d", | |
| "quantizer_name": "*" | |
| }, | |
| { | |
| "enable": false, | |
| "parent_class": "nn.LeakyReLU", | |
| "quantizer_name": "*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*lm_head*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*proj_out.*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*block_sparse_moe.gate*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*router*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*mlp.gate.*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*mlp.shared_expert_gate.*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*linear_attn.conv1d*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*mixer.conv1d*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*output_layer*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "output.*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*proj_in*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*proj_out*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*time_embedder*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*audio_proj_in*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*audio_proj_out*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*action_proj_in*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*action_proj_out*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*lm_head*" | |
| }, | |
| { | |
| "enable": false, | |
| "quantizer_name": "*visual*" | |
| } | |
| ] | |
| }, | |
| "modules_to_not_convert": [ | |
| "proj_in", | |
| "proj_out", | |
| "time_embedder", | |
| "audio_proj_in", | |
| "audio_proj_out", | |
| "action_proj_in", | |
| "action_proj_out", | |
| "lm_head", | |
| "visual" | |
| ], | |
| "quant_method": "modelopt", | |
| "quant_type": "FP8_FP8", | |
| "scale_block_quantize": null, | |
| "scale_channel_quantize": null, | |
| "weight_only": false, | |
| "config_groups": { | |
| "group_0": { | |
| "input_activations": { | |
| "dynamic": false, | |
| "num_bits": 8, | |
| "type": "float" | |
| }, | |
| "weights": { | |
| "dynamic": false, | |
| "num_bits": 8, | |
| "type": "float" | |
| }, | |
| "targets": [ | |
| "Linear" | |
| ] | |
| } | |
| }, | |
| "quant_algo": "FP8", | |
| "ignore": [ | |
| "proj_in", | |
| "proj_out", | |
| "time_embedder*", | |
| "audio_proj_in", | |
| "audio_proj_out", | |
| "action_proj_in", | |
| "action_proj_out", | |
| "lm_head", | |
| "model.visual*", | |
| "visual*" | |
| ], | |
| "producer": { | |
| "name": "modelopt", | |
| "version": "0.44.0" | |
| } | |
| } |