The LightX2V server is a distributed video generation service built with FastAPI that processes image-to-video tasks using a multi-process architecture with GPU support. It implements a sophisticated task queue system with distributed inference capabilities for high-throughput video generation workloads.
The LightX2V server is a distributed video/image generation service built with FastAPI that processes image-to-video and text-to-image tasks using a multi-process architecture with GPU support. It implements a sophisticated task queue system with distributed inference capabilities for high-throughput generation workloads.
## Directory Structure
```
server/
├── __init__.py
├── __main__.py # Entry point
├── main.py # Server startup
├── config.py # Configuration
├── task_manager.py # Task management
├── schema.py # Data models (VideoTaskRequest, ImageTaskRequest)
├── api/
│ ├── __init__.py
│ ├── router.py # Main router aggregation
│ ├── deps.py # Dependency injection container
│ ├── server.py # ApiServer class
│ ├── files.py # /v1/files/*
│ ├── service_routes.py # /v1/service/*
│ └── tasks/
│ ├── __init__.py
│ ├── common.py # Common task operations
│ ├── video.py # POST /v1/tasks/video
│ └── image.py # POST /v1/tasks/image
├── services/
│ ├── __init__.py
│ ├── file_service.py # File service (unified download)