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
Use SGLang main branch for Cosmos3 install
Browse files
README.md
CHANGED
|
@@ -416,10 +416,10 @@ python scripts/upsample_prompt.py \
|
|
| 416 |
|
| 417 |
### SGLang
|
| 418 |
|
| 419 |
-
SGLang-Diffusion can serve `nvidia/Cosmos3-Super-Image2Video` through the OpenAI-compatible async video endpoint. Install SGLang from
|
| 420 |
|
| 421 |
```bash
|
| 422 |
-
git clone https://github.com/sgl-project/sglang.git
|
| 423 |
cd sglang
|
| 424 |
pip install -e "python[diffusion]"
|
| 425 |
pip install "cosmos-guardrail==0.3.1"
|
|
@@ -429,6 +429,8 @@ sglang serve \
|
|
| 429 |
--num-gpus 4
|
| 430 |
```
|
| 431 |
|
|
|
|
|
|
|
| 432 |
Example image-to-video request:
|
| 433 |
|
| 434 |
```bash
|
|
|
|
| 416 |
|
| 417 |
### SGLang
|
| 418 |
|
| 419 |
+
SGLang-Diffusion can serve `nvidia/Cosmos3-Super-Image2Video` through the OpenAI-compatible async video endpoint. Install SGLang from the main branch with diffusion dependencies, then start the server:
|
| 420 |
|
| 421 |
```bash
|
| 422 |
+
git clone --branch main https://github.com/sgl-project/sglang.git
|
| 423 |
cd sglang
|
| 424 |
pip install -e "python[diffusion]"
|
| 425 |
pip install "cosmos-guardrail==0.3.1"
|
|
|
|
| 429 |
--num-gpus 4
|
| 430 |
```
|
| 431 |
|
| 432 |
+
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.
|
| 433 |
+
|
| 434 |
Example image-to-video request:
|
| 435 |
|
| 436 |
```bash
|