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
Use SGLang main branch for Cosmos3 install
Browse files
README.md
CHANGED
|
@@ -927,10 +927,10 @@ Cosmos3 outputs should not be treated as physically accurate simulation, reliabl
|
|
| 927 |
|
| 928 |
## SGLang Serve
|
| 929 |
|
| 930 |
-
[SGLang Diffusion](https://github.com/sgl-project/sglang) can serve Cosmos3-Nano through OpenAI-compatible image and video endpoints. Install SGLang from
|
| 931 |
|
| 932 |
```shell
|
| 933 |
-
git clone https://github.com/sgl-project/sglang.git
|
| 934 |
cd sglang
|
| 935 |
pip install -e "python[diffusion]"
|
| 936 |
pip install "cosmos-guardrail==0.3.1"
|
|
@@ -938,6 +938,8 @@ pip install "cosmos-guardrail==0.3.1"
|
|
| 938 |
sglang serve --model-path nvidia/Cosmos3-Nano
|
| 939 |
```
|
| 940 |
|
|
|
|
|
|
|
| 941 |
For a video-specialized checkpoint, use `Cosmos3-Super-Image2Video` with multiple GPUs:
|
| 942 |
|
| 943 |
```shell
|
|
|
|
| 927 |
|
| 928 |
## SGLang Serve
|
| 929 |
|
| 930 |
+
[SGLang Diffusion](https://github.com/sgl-project/sglang) can serve Cosmos3-Nano through OpenAI-compatible image and video endpoints. Install SGLang from the main branch with diffusion dependencies, then start a server:
|
| 931 |
|
| 932 |
```shell
|
| 933 |
+
git clone --branch main https://github.com/sgl-project/sglang.git
|
| 934 |
cd sglang
|
| 935 |
pip install -e "python[diffusion]"
|
| 936 |
pip install "cosmos-guardrail==0.3.1"
|
|
|
|
| 938 |
sglang serve --model-path nvidia/Cosmos3-Nano
|
| 939 |
```
|
| 940 |
|
| 941 |
+
Cosmos 3 support in SGLang Diffusion currently requires the SGLang main branch. Switch to a stable SGLang release once Cosmos 3 support is included there.
|
| 942 |
+
|
| 943 |
For a video-specialized checkpoint, use `Cosmos3-Super-Image2Video` with multiple GPUs:
|
| 944 |
|
| 945 |
```shell
|