Views
No views yet
nvidia/Cosmos3-Nano, produced with NVIDIA
TensorRT Model Optimizer. The transformer's attention + FFN linears (~11.8 B params, 77.6%
of the transformer) are quantized to INT4 with AWQ scaling; embeddings, all norms, the
diffusion time-embedder, and modality I/O adapters stay in BF16. Activations remain BF16.Derivative ofnvidia/Cosmos3-Nano. © NVIDIA. Distributed under OpenMDW-1.1 (license text
- NVIDIA's original copyright/origin notices retained, per the license). Not affiliated with, nor endorsed by, NVIDIA.
| Metric | BF16 | INT4-AWQ |
|---|---|---|
| PickScore (human preference; higher better) | 21.85 | 21.88 (Δ +0.04) |
| FID vs BF16 (lower=closer) | — | 95.8 |
| Functional fidelity (velocity cosine, identical inputs) | 1.000 | ~0.998 |
| Worst-case PickScore drop over 96 prompts | — | −0.97 (tightest of all recipes tested) |
worst_case_contact_sheet.png.1import torch
2from huggingface_hub import snapshot_download
3from diffusers import Cosmos3OmniPipeline, Cosmos3OmniTransformer
4import modelopt.torch.opt as mto
5
6repo = snapshot_download("Reza2kn/Cosmos3-Nano-INT4-AWQ")
7tf = Cosmos3OmniTransformer.from_config(
8 Cosmos3OmniTransformer.load_config(f"{repo}/transformer/config.json")).to(torch.bfloat16)
9mto.restore(tf, f"{repo}/transformer/modelopt_quantized.pt") # restores 4-bit weights
10pipe = Cosmos3OmniPipeline.from_pretrained(
11 repo, transformer=tf, torch_dtype=torch.bfloat16, enable_safety_checker=False).to("cuda")
12
13with torch.autocast("cuda", dtype=torch.bfloat16): # required (see note)
14 img = pipe("A red panda astronaut floating in a nebula", num_frames=1,
15 height=480, width=480).video[0][0]
16img.save("out.png")from load_quantized import load; pipe = load() (helper script included).diffusers (git main / ≥0.39 — Cosmos3 support), nvidia-modelopt, torch (cu128
for Blackwell). The autocast is required: a few positional/rotary tensors are computed in float32
on the fly and must be cast to bf16 before hitting the 4-bit linears.INT4_AWQ_CFG (awq_lite), weight-only; calibrated on a multimodal image+video prompt set
through the real denoising loop.self_attn.{to_q,to_k,to_v,to_out,add_q_proj,add_k_proj,add_v_proj,to_add_out}, mlp.*,
mlp_moe_gen.*, lm_head. Kept BF16: embeddings, modality embeds, norms (incl. QK-norm),
time_embedder, proj_in/proj_out, audio/action adapters.