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
Add Diffusers usage section for the distilled 4-step I2V pipeline
Browse filesDocuments Cosmos3DistilledModularPipeline with the same example prompt and first-frame image as the vLLM-Omni example, and adds the generated example output video.
Files changed (3)
37 unmodified lines38394037 unmodified linesassets/example_output.mp4 filter=lfs diff=lfs merge=lfs -textimages/aa-i2v-all-models-2026-07-17.png filter=lfs diff=lfs merge=lfs -textimages/aa-i2v-open-models-2026-07-17.png filter=lfs diff=lfs merge=lfs -text37 unmodified lines3839404137 unmodified linesassets/example_output.mp4 filter=lfs diff=lfs merge=lfs -textimages/aa-i2v-all-models-2026-07-17.png filter=lfs diff=lfs merge=lfs -textimages/aa-i2v-open-models-2026-07-17.png filter=lfs diff=lfs merge=lfs -textassets/example_output_diffusers.mp4 filter=lfs diff=lfs merge=lfs -text
489 unmodified lines490491492493494495489 unmodified lines<video controls width="832" height="480" src="https://huggingface.co/nvidia/Cosmos3-Super-Image2Video-4Step/resolve/main/assets/example_output.mp4"></video>### Inferencing with Custom Prompts`Cosmos3-Super-Image2Video-4Step` supports dense natural-language prompts together with a first-frame image, and it also supports JSON-format upsampled prompts for improved quality. The recommended way to prepare an upsampled prompt is to use [Prepare Prompts with Prompt Upsampling](#usage-prepare-prompts-with-prompt-upsampling). The helper below is a simple proof-of-concept script for building a JSON-format prompt from a custom natural-language instruction and the input image. It requires an OpenAI-compatible VLM model like `claude-opus-4.7` and `gpt-5.5`.489 unmodified lines490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566489 unmodified lines<video controls width="832" height="480" src="https://huggingface.co/nvidia/Cosmos3-Super-Image2Video-4Step/resolve/main/assets/example_output.mp4"></video>## 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.### InstallInstall 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: Image to Video GenerationRun 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 jsonimport torchfrom 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")pipe = Cosmos3DistilledModularPipeline.from_pretrained("nvidia/Cosmos3-Super-Image2Video-4Step")pipe.load_components(torch_dtype=torch.bfloat16)pipe.enable_safety_checker()pipe.to("cuda")videos = pipe(prompt=json_prompt["prompt"],image=image,num_frames=189,height=480,width=832,fps=24,add_resolution_template=False,add_duration_template=False,output="videos",)export_to_video(videos, "cosmos3_i2v_4step_diffusers.mp4", fps=24, macro_block_size=1)print("Saved video to cosmos3_i2v_4step_diffusers.mp4")```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_first_frame.png`:<video controls width="832" height="480" src="https://huggingface.co/nvidia/Cosmos3-Super-Image2Video-4Step/resolve/main/assets/example_output_diffusers.mp4"></video>### Inferencing with Custom Prompts`Cosmos3-Super-Image2Video-4Step` supports dense natural-language prompts together with a first-frame image, and it also supports JSON-format upsampled prompts for improved quality. The recommended way to prepare an upsampled prompt is to use [Prepare Prompts with Prompt Upsampling](#usage-prepare-prompts-with-prompt-upsampling). The helper below is a simple proof-of-concept script for building a JSON-format prompt from a custom natural-language instruction and the input image. It requires an OpenAI-compatible VLM model like `claude-opus-4.7` and `gpt-5.5`.
123version https://git-lfs.github.com/spec/v1oid sha256:7337f6ae74b214bcca061c7de85e952e8cd8206d69755e8fb2fdb46784aa2641size 1135801.gitattributes+1
README.md+71
assets/example_output_diffusers.mp4Added+3