Diffusion
Overview
Dynamo serves diffusion models for text-to-image, text-to-video, image-to-video, text-to-audio, and text-to-text generation. These workloads use the same frontend, routing, scaling, and observability infrastructure as LLM inference.
The built-in backends expose OpenAI-compatible endpoints for images (/v1/images/generations), videos (/v1/videos), audio (/v1/audio/speech), and text generation.
Built-in diffusion backends currently use Dynamo CLI launch scripts and python -m dynamo.* entrypoints. Dynamo does not yet ship prebuilt Kubernetes recipes for these backends. FastVideo is the exception and includes a Kubernetes deployment path.
Install the Backend
Choose the tab for the backend you plan to use.
vLLM-Omni
SGLang
TensorRT-LLM
FastVideo
vLLM-Omni provides image, video, and audio generation through python -m dynamo.vllm.omni.
Prerequisites
- A working vLLM backend setup.
- An
amd64host. Dynamo container builds do not install vLLM-Omni onarm64.
Dynamo container images include vLLM-Omni. A PyPI installation of ai-dynamo[vllm] does not include it automatically. For a source installation, pin the vLLM-Omni release that matches your vLLM version:
Local launchers, media storage, and stage configuration
The agg_omni_*.sh and disagg_omni_glm_image.sh scripts launch the frontend and workers directly on one host. They are intended for local development and testing and do not create a DynamoGraphDeployment.
Generated media uses fsspec storage. The default is file:///tmp/dynamo_media. Set --media-output-fs-url for S3, GCS, or Azure Blob storage, and optionally set --media-output-http-url to rewrite response URLs.
vLLM-Omni includes built-in YAML stage configurations for supported models. Set --stage-configs-path only to override them.
See the vLLM-Omni Configuration reference for the complete flag surface.
SGLang provides LLM diffusion, image diffusion, and video generation through its standard Dynamo backend.
Prerequisites
- A working SGLang backend setup.
No separate installation is required. Select the worker mode for your workload:
Troubleshoot a CuDNN version mismatch
If startup reports cuDNN frontend 1.8.1 requires cuDNN lib >= 9.5.0, set:
This can occur when PyTorch includes an older CuDNN version than SGLang requires for Conv3d operations.
See the SGLang Configuration reference.
TensorRT-LLM provides experimental image and video generation through tensorrt_llm._torch.visual_gen.
Prerequisites
- TensorRT-LLM installed with the
visual_genmodule. - A Dynamo runtime with image and video model types.
- A GPU with enough VRAM for the selected model.
Text-to-image requires no additional setup beyond TensorRT-LLM and Dynamo.
Configure MP4 video encoding
Text-to-video output requires imageio and ffmpeg. Dynamo’s runtime images include an ffmpeg build that encodes VP9 (libvpx-vp9), so .mp4 output is a VP9 stream in an MP4 container and no GPU encoder is needed.
Changed: output_format: "mp4" previously returned H.264 and now returns VP9. The file extension is unchanged, so a client that passes the bytes straight to a player may fail without an error from Dynamo. VP9-in-MP4 plays in Chrome, Firefox and ffmpeg, but not in Safari or QuickTime.
VP9 is used on every GPU because NVIDIA omits the hardware H.264 encoder (NVENC) from the datacenter line — A100, H100, H200, B200 and GB200 have none — so a hardware H.264 path would work only on L4/L40S/RTX-class parts. The alternative, a software H.264 encoder, is what the codec-compliant images deliberately exclude.
To get H.264, transcode on the client: ffmpeg -i output.mp4 -c:v libx264 output-h264.mp4.
Outside the container, install the Python wrapper without its bundled binary and point it to your ffmpeg:
See the TensorRT-LLM Configuration reference.
FastVideo is a custom text-to-video worker that serves /v1/videos through its typed API.
Prerequisites
- A GPU-enabled host or Kubernetes cluster.
- An NVIDIA GPU runtime.
- A container registry for the custom runtime image.
Build and deploy FastVideo
Build the purpose-built runtime from examples/diffusers/Dockerfile. The image installs FastVideo 0.2.0 and the Dynamo package with /v1/videos support.
Kubernetes is the recommended deployment path. Follow the FastVideo tab for image build, deployment, and configuration instructions.