Instructions to use nvidia/Cosmos3-Super-Text2Image-4Step with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Cosmos
How to use nvidia/Cosmos3-Super-Text2Image-4Step 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
- Notebooks
- Google Colab
- Kaggle
Add Diffusers usage section for the distilled 4-step T2I pipeline
#17
by yzhautouskay - opened
Files changed (3)
37 unmodified lines3839404137 unmodified linesimages/aa-t2i-all-models-2026-07-17.png filter=lfs diff=lfs merge=lfs -textimages/aa-t2i-open-models-2026-07-17.png filter=lfs diff=lfs merge=lfs -textassets/benchmark-text2image.png filter=lfs diff=lfs merge=lfs -textassets/example_output_diffusers.png filter=lfs diff=lfs merge=lfs -text195 unmodified lines196197198199200201202292 unmodified lines4954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635642 unmodified lines567568569505570571572573195 unmodified lines
- [PyTorch](https://github.com/nvidia/cosmos3)- [vLLM-Omni](https://github.com/vllm-project/vllm-omni)- [Hugging Face Diffusers](https://github.com/huggingface/diffusers)
**Supported Hardware Microarchitecture Compatibility:**
292 unmodified lines

## Usage: Run Inference with Diffusers
`Cosmos3-Super-Text2Image-4Step` is supported by the Hugging Face Diffusers **modular** pipeline. The distilled checkpoint is not compatible with `Cosmos3OmniPipeline` or `Cosmos3OmniModularPipeline`; it must be loaded with `Cosmos3DistilledModularPipeline`.
### Install
Install Diffusers from the main branch until a release containing `Cosmos3DistilledModularPipeline` is available:
```bashuv venv --python 3.13 --seed --managed-pythonsource .venv/bin/activateuv pip install \ "diffusers @ git+https://github.com/huggingface/diffusers.git" \ accelerate \ av \ cosmos_guardrail \ huggingface_hub \ imageio \ imageio-ffmpeg \ torch \ torchvision \ transformers```
The safety checker requires access to the gated [nvidia/Cosmos-1.0-Guardrail](https://huggingface.co/nvidia/Cosmos-1.0-Guardrail) repository.
### Example: Text to Image Generation
```pythonimport json
import torchfrom diffusers import Cosmos3DistilledModularPipeline
json_prompt = json.load(open("assets/example_caption.json"))json_prompt["resolution"] = {"H": 768, "W": 768}json_prompt["aspect_ratio"] = "1,1"
pipe = Cosmos3DistilledModularPipeline.from_pretrained("nvidia/Cosmos3-Super-Text2Image-4Step")pipe.load_components(torch_dtype=torch.bfloat16)pipe.enable_safety_checker()pipe.to("cuda")
images = pipe( prompt=json.dumps(json_prompt), num_frames=1, height=768, width=768, add_resolution_template=False, generator=torch.Generator(device="cuda").manual_seed(1143), output="videos",)images[0].save("cosmos3_t2i_4step_diffusers.png")print("Saved image to cosmos3_t2i_4step_diffusers.png")```
Single-frame generation uses `num_frames=1`, and the frame comes back through the pipeline's `videos` output.
The 4-step schedule and the guidance scale come from the checkpoint: `num_inference_steps` is fixed to the length of the distilled sigma schedule and `guidance_scale` is forced to `1.0`, so passing any other value raises an error. `negative_prompt` is ignored, and unlike the base Cosmos3 models there is no scheduler to swap in and no `flow_shift` to set.
Example output generated from `assets/example_caption.json`:

## Limitations
Cosmos3 may produce imperfect outputs in challenging scenarios. Generation artifacts include temporal inconsistency, unstable camera or object motion, imprecise physical interactions, inaccurate audio-video synchronization, and action-state drift — especially in long-horizon or high-resolution outputs. Reasoning may also be incorrect: object states, causal relationships, spatial geometry, temporal ordering, agent intent, and future outcomes can be misinferred, and complex or long-context inputs may yield hallucinated entities, inconsistent interpretations, or implausible predictions. Because the model lacks an explicit physics simulator, 3D geometry, 4D space-time evolution, object permanence, contact dynamics, and physical laws are only approximated — producing artifacts such as disappearing or morphing objects, unrealistic collisions, and physically implausible motions. Quality further degrades in out-of-distribution environments, safety-critical edge cases, and domains underrepresented in training.2 unmodified lines
## Inference
**Acceleration Engine:** [PyTorch](https://pytorch.org/), [vLLM-Omni](https://github.com/vllm-project/vllm-omni)**Acceleration Engine:** [PyTorch](https://pytorch.org/), [vLLM-Omni](https://github.com/vllm-project/vllm-omni), [Hugging Face Diffusers](https://github.com/huggingface/diffusers)
**Test Hardware:** RTX PRO 6000, H20, H100, H200, B200
.gitattributes+1
README.md+66-1
assets/example_output_diffusers.pngAdded

Large File Pointer Details
- SHA256: 9e8a7b0392fbbbb1bd6686ed2627bb8062b61fe8ba295a441602e26f1a2a8f77
- Pointer size: 131 Bytes
- Size of remote file: 719 kB