Instructions to use nvidia/Cosmos3-Super-Image2Video-4Step with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Cosmos
How to use nvidia/Cosmos3-Super-Image2Video-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
List Diffusers as a runtime engine and trim the Diffusers section
Browse files492 unmodified lines49349449549649749849649749849919 unmodified lines5195205215245255225235241 unmodified line526527528533534535529530531492 unmodified lines
## Usage: Run Inference with Diffusers
`Cosmos3-Super-Image2Video-4Step` is supported by the Hugging Face Diffusers **modular** pipeline, using the same JSON-format upsampled prompt and first-frame image as the vLLM-Omni example above. The distilled checkpoint is not compatible with `Cosmos3OmniPipeline` or `Cosmos3OmniModularPipeline`; it must be loaded with `Cosmos3DistilledModularPipeline`.
This path loads the full 64B model on a single device in BF16, so it needs a B200/GB200-class GPU. On H100/H200-class GPUs, use the multi-GPU vLLM-Omni serving configuration above instead.`Cosmos3-Super-Image2Video-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
19 unmodified lines
### Example: Image to Video Generation
Run this from the downloaded repo root, using the same `assets/example_prompt.json` and `assets/example_first_frame.png` inputs as the vLLM-Omni request. The example generates at 480p (`832x480` at 16:9), the recommended setting for this distilled I2V checkpoint.
```pythonimport json
1 unmodified linefrom diffusers import Cosmos3DistilledModularPipelinefrom diffusers.utils import export_to_video, load_image
# The prompt file holds the same positive and negative prompt fields the vLLM-Omni# example uses. Only the positive prompt is passed here: classifier-free guidance is# baked into the distilled weights, so the negative prompt has no effect.json_prompt = json.load(open("assets/example_prompt.json"))image = load_image("assets/example_first_frame.png")
README.md+1-8