Image-to-Video
Cosmos
Diffusers
Safetensors
cosmos3_omni
nvidia
cosmos3
vllm-omni
sglang
sglang-diffusion
video-generation
Instructions to use nvidia/Cosmos3-Super-Image2Video with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Cosmos
How to use nvidia/Cosmos3-Super-Image2Video 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-Super-Image2Video with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nvidia/Cosmos3-Super-Image2Video", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_class_name": "Cosmos3OmniTransformer", | |
| "_diffusers_version": "0.39.0", | |
| "action_dim": 32, | |
| "action_gen": false, | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "base_fps": 16, | |
| "dtype": "bfloat16", | |
| "enable_fps_modulation": true, | |
| "freeze_und": false, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 5120, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 25600, | |
| "joint_attn_implementation": "two_way", | |
| "latent_channel": 48, | |
| "latent_patch_size": 2, | |
| "max_action_dim": 32, | |
| "max_position_embeddings": 262144, | |
| "model_type": "qwen3_vl_text", | |
| "num_attention_heads": 64, | |
| "num_embodiment_domains": 32, | |
| "num_hidden_layers": 64, | |
| "num_key_value_heads": 8, | |
| "patch_latent_dim": 192, | |
| "position_embedding_type": "unified_3d_mrope", | |
| "qk_norm": false, | |
| "qk_norm_for_diffusion": true, | |
| "qk_norm_for_text": true, | |
| "quantization_config": { | |
| "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", | |
| "runtime": { | |
| "diffusion_step_policy": { | |
| "schema_version": 1, | |
| "type": "first_last_n", | |
| "index_space": "denoising_loop_iteration", | |
| "scope": [ | |
| "transformer" | |
| ], | |
| "default_mode": "native", | |
| "first_steps": { | |
| "count": 3, | |
| "mode": "a16" | |
| }, | |
| "last_steps": { | |
| "count": 3, | |
| "mode": "a16" | |
| }, | |
| "overlap": "a16", | |
| "reasoner": "a16" | |
| } | |
| }, | |
| "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" | |
| } | |
| }, | |
| "rms_norm_eps": 1e-06, | |
| "rope_axes_dim": [ | |
| 24, | |
| 20, | |
| 20 | |
| ], | |
| "rope_scaling": { | |
| "mrope_interleaved": true, | |
| "mrope_section": [ | |
| 24, | |
| 20, | |
| 20 | |
| ], | |
| "rope_type": "default" | |
| }, | |
| "rope_theta": 5000000, | |
| "sound_dim": null, | |
| "sound_gen": false, | |
| "sound_latent_fps": 25, | |
| "temporal_compression_factor_sound": 1, | |
| "timestep_scale": 0.001, | |
| "unified_3d_mrope_reset_spatial_ids": true, | |
| "unified_3d_mrope_temporal_modality_margin": 15000, | |
| "use_cache": true, | |
| "use_moe": true, | |
| "video_temporal_causal": false, | |
| "vocab_size": 151936 | |
| } | |