Important
This repository is no longer maintained and will not receive further updates. It has been replaced by LTX2.5 Serverless.
Serverless LTX 2.3, minus the goldfish-memory cold start.
This repo turns ComfyUI + LTX 2.3 into a RunPod serverless template that keeps its brain on /workspace: Comfy install, Python venv, caches, and downloaded model assets survive worker churn instead of being painfully rediscovered on every boot.
Less boot drama. More actual inference.
- Build or publish one of the LTX image targets from
docker-bake.hcl. - Create a RunPod serverless template that uses that image.
- Attach a network volume so
/workspaceis persistent. - Deploy the endpoint with
Active Workers = 0unless you enjoy paying for idle GPUs. - Set at least:
PERSIST_WORKSPACE=trueLTX23_PRELOAD_VARIANT=distilledLTX23_PRELOAD_UPSCALERS=trueHUGGINGFACE_ACCESS_TOKEN=<your_hf_read_token>
- Export your ComfyUI workflow with
Workflow > Export (API). - Send it to
/runor/runsync.
For detailed deployment steps, see Deployment Guide.
| Target | Use Case |
|---|---|
base |
Default clean CUDA 12.8 / cu128 base image |
ltx2-3-distilled |
Default target for CUDA 12.8 deployments |
ltx2-3-distilled-fp8 |
Lower VRAM pressure with the FP8 distilled checkpoint |
ltx2-3-distilled-cuda13 |
Experimental CUDA 13 path for newer Blackwell-oriented stacks |
base-cuda12-8-1 |
Explicit CUDA 12.8 base image alias for custom LTX builds |
base-cuda13-0 |
Clean CUDA 13 base image for custom experimental builds |
Example image tags (replace <repo> and <version> with your values):
<repo>:<version>-base<repo>:<version>-ltx2.3-distilled-cu128<repo>:<version>-ltx2.3-distilled-fp8-cu128<repo>:<version>-ltx2.3-distilled-cu130
Hardware requirements: 32GB+ VRAM and 100GB+ free disk recommended. See Deployment Guide for details.
For a sane first boot on RunPod serverless, use:
PERSIST_WORKSPACE=true
RUN_MODE=worker
COMFY_NODES=127.0.0.1:8188
LTX23_PRELOAD_VARIANT=distilled
LTX23_PRELOAD_UPSCALERS=true
HUGGINGFACE_ACCESS_TOKEN=hf_xxxFor a plain pod instead of a serverless worker:
PERSIST_WORKSPACE=true
RUN_MODE=pod
LOCAL_COMFY_NODE=127.0.0.1:8188
LTX23_PRELOAD_VARIANT=distilled
LTX23_PRELOAD_UPSCALERS=true
HUGGINGFACE_ACCESS_TOKEN=hf_xxxThis preloads the main LTX checkpoint plus the official latent upscalers and distilled LoRA into persistent storage. Some secondary assets may still download on first render.
For the full list of environment variables, see Configuration Guide.
The container supports explicit runtime modes via RUN_MODE:
worker: default serverless worker behavior, starts ComfyUI, the frontend, andrunpod.serverless.start(...)local-api: starts ComfyUI, the frontend, and the local RunPod-style API on port8000pod: starts ComfyUI and the frontend only, without the serverless handler
If RUN_MODE is unset, the image stays backward compatible:
SERVE_API_LOCALLY=truemaps toRUN_MODE=local-api- otherwise it falls back to
RUN_MODE=worker
The worker accepts:
input.workflow: required ComfyUI API workflow JSONinput.images: optional list of base64-encoded input imagesinput.priority: optional queue hint,standardby default andvipfor the legacy custom path
The worker returns:
output.images[]when the workflow produces image outputsoutput.videos[]when the workflow produces video outputs
Artifact entries look like this:
{
"filename": "LTX_2.3_i2v.mp4",
"type": "base64",
"data": "AAAAIGZ0eXBpc29tAAACAGlzb20uLi4=",
"media_type": "video/mp4"
}If S3 is configured, type becomes url and data is a presigned URL. See Configuration Guide for S3 setup.
curl -X POST \
-H "Authorization: Bearer <runpod_api_key>" \
-H "Content-Type: application/json" \
-d '{"input":{"workflow":{... your Comfy API workflow ...},"images":[{"name":"source.png","image":"data:image/png;base64,..." }]}}' \
https://api.runpod.ai/v2/<endpoint_id>/runsyncTo get your workflow JSON:
- Open your ComfyUI instance
- Enable "Dev mode Options" in settings
- Build your workflow
- Click
Workflow > Export (API) - Use the exported JSON in your API request
A checked-in LTX image-to-video API workflow is available at video_ltx2_3_i2v_API.json.
The worker still accepts the older compatibility payload below for existing clients:
{
"input": {
"api_key": "your-worker-secret",
"prompt": "your prompt",
"image_url": "https://example.com/source.png",
"priority": "standard"
}
}Treat that mode as legacy. It exists so old callers do not explode on contact, not because it is the API you should build new things around.
- Deployment Guide - Detailed RunPod template/endpoint creation, GPU recommendations
- Configuration Guide - Comprehensive list and explanation of all environment variables
- Customization Guide - In-depth guide on using Network Volumes and building custom Docker images
- Network Volumes & Model Paths - How to use network volumes and debug model detection issues
- Development Guide - Instructions for local setup, running tests, using docker-compose
- CI/CD Guide - Explanation of the GitHub Actions workflows for Docker Hub deployment
- Conventions - Project conventions and rules for development
- Acknowledgments - Credits and thanks
