๐ Complete Setup Guide
Prerequisites
- Python 3.9 or higher
- Git
- 10GB free disk space (for local models)
Step-by-Step Setup
1. Clone the Repository
git clone <your-repo-url>
cd hailuo-clone
2. Create Virtual Environment
python3 -m venv venv
source venv/bin/activate
3. Choose Your Backend
Option A: Replicate API (Recommended)
pip install -r requirements.txt
pip install replicate
echo "REPLICATE_API_TOKEN=your_token_here" > .env
python backend_replicate.py
Option B: Local Generation
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install torch torchvision torchaudio
pip install -r requirements_local.txt
python backend_local.py
Option C: Hugging Face Spaces
pip install -r requirements.txt
python backend_enhanced.py
4. Test the Setup
- Open the appropriate HTML file in your browser
- Enter a test prompt: "A cat playing with a ball of yarn"
- Click "Generate Video"
- Wait for the video to generate
Quick Commands
Start Replicate Backend
source venv/bin/activate
python backend_replicate.py
Start Local Backend
source venv/bin/activate
python backend_local.py
Start Enhanced Backend
source venv/bin/activate
python backend_enhanced.py
Troubleshooting
Port Already in Use
lsof -i :5000
kill -9 <PID>
Missing Dependencies
pip install --upgrade -r requirements.txt
API Token Issues
cat .env
Next Steps