A simple web-based service for generating 10-20 second videos using Open-Sora 2.0, with image and text input.
NEW: Run frontend & backend locally, use remote GPU for generation!
This is the most cost-effective and flexible setup:
# On Lambda GPU instance
./lambda_run_gpu_service.sh --api-key your-secret-key
# On your local machine
./run_local.sh --gpu-url http://lambda-ip:8001 --api-key your-secret-key
# Open browser
http://localhost:8000
Complete guide: See QUICKSTART_REMOTE.md and REMOTE_GPU_SETUP.md
Run everything (frontend + backend + GPU) on a single Lambda instance.
# 1. Launch instance at https://cloud.lambdalabs.com
# 2. SSH into instance
ssh ubuntu@<instance-ip>
# 3. Run automated setup
git clone <your-repo-url> ~/sora2
cd ~/sora2
./lambda_setup.sh
# 4. Start service
./lambda_run.sh
Complete guide: See LAMBDA_LABS.md
For local GPU servers or other cloud providers.
git clone https://github.com/hpcaitech/Open-Sora.git
cd Open-Sora
pip install -v .
pip install xformers==0.0.27.post2 --index-url https://download.pytorch.org/whl/cu121
pip install flash-attn --no-build-isolation
cd /path/to/sora2
pip install -r requirements.txt
Edit backend/config.py and set the OPENSORA_PATH to your Open-Sora installation directory.
# From the project root
python backend/main.py
The service will start on http://localhost:8000
http://localhost:8000 in your browserPOST /api/generate
Content-Type: multipart/form-data
Parameters:
- image: File (required)
- prompt: string (required)
- duration: integer (10-20, default: 15)
- aspect_ratio: string (default: "16:9")
- motion_score: float (0.0-1.0, default: 0.5)
Response:
{
"video_id": "uuid",
"status": "processing"
}
GET /api/status/{video_id}
Response:
{
"status": "completed",
"video_url": "/api/download/{video_id}"
}
GET /api/download/{video_id}
Edit backend/config.py:
OPENSORA_PATH = "/path/to/Open-Sora"
OUTPUT_DIR = "./outputs"
MAX_CONCURRENT_JOBS = 2
ENABLE_QUEUE = True
--offload True for memory optimization on GPUs with <40GB VRAMAdd --offload True to the generation command in backend/generator.py
--nproc_per_nodeModels are downloaded automatically from HuggingFace. If you experience issues:
This service wrapper is provided as-is. Open-Sora 2.0 is licensed under Apache 2.0.
A simple web-based service for generating 10-20 second videos using Open-Sora 2.0, with image and text input.
NEW: Run frontend & backend locally, use remote GPU for generation!
This is the most cost-effective and flexible setup:
# On Lambda GPU instance
./lambda_run_gpu_service.sh --api-key your-secret-key
# On your local machine
./run_local.sh --gpu-url http://lambda-ip:8001 --api-key your-secret-key
# Open browser
http://localhost:8000
Complete guide: See QUICKSTART_REMOTE.md and REMOTE_GPU_SETUP.md
Run everything (frontend + backend + GPU) on a single Lambda instance.
# 1. Launch instance at https://cloud.lambdalabs.com
# 2. SSH into instance
ssh ubuntu@<instance-ip>
# 3. Run automated setup
git clone <your-repo-url> ~/sora2
cd ~/sora2
./lambda_setup.sh
# 4. Start service
./lambda_run.sh
Complete guide: See LAMBDA_LABS.md
For local GPU servers or other cloud providers.
git clone https://github.com/hpcaitech/Open-Sora.git
cd Open-Sora
pip install -v .
pip install xformers==0.0.27.post2 --index-url https://download.pytorch.org/whl/cu121
pip install flash-attn --no-build-isolation
cd /path/to/sora2
pip install -r requirements.txt
Edit backend/config.py and set the OPENSORA_PATH to your Open-Sora installation directory.
# From the project root
python backend/main.py
The service will start on http://localhost:8000
http://localhost:8000 in your browserPOST /api/generate
Content-Type: multipart/form-data
Parameters:
- image: File (required)
- prompt: string (required)
- duration: integer (10-20, default: 15)
- aspect_ratio: string (default: "16:9")
- motion_score: float (0.0-1.0, default: 0.5)
Response:
{
"video_id": "uuid",
"status": "processing"
}
GET /api/status/{video_id}
Response:
{
"status": "completed",
"video_url": "/api/download/{video_id}"
}
GET /api/download/{video_id}
Edit backend/config.py:
OPENSORA_PATH = "/path/to/Open-Sora"
OUTPUT_DIR = "./outputs"
MAX_CONCURRENT_JOBS = 2
ENABLE_QUEUE = True
--offload True for memory optimization on GPUs with <40GB VRAMAdd --offload True to the generation command in backend/generator.py
--nproc_per_nodeModels are downloaded automatically from HuggingFace. If you experience issues:
This service wrapper is provided as-is. Open-Sora 2.0 is licensed under Apache 2.0.