Agents / README.md
Skydata001's picture
Update README.md
a3404dc verified
|
Raw
History Blame Contribute Delete
2.82 kB
---
license: mit
title: Wan
sdk: docker
emoji: πŸ†
colorFrom: blue
colorTo: blue
pinned: true
thumbnail: >-
https://cdn-uploads.huggingface.co/production/uploads/690c81642c226d46d51dc1a5/EhLyLqcHHk_Q_gb7xR1HF.jpeg
short_description: Wan
---
# AI Video Swarm
8Γ— L40S GPU Video Generation Platform on Hugging Face Spaces
## Hardware
- **8Γ— NVIDIA L40S** (48GB VRAM each = 384GB total)
- **192 vCPU**
- **1534 GB RAM**
## File Structure
```
.
β”œβ”€β”€ app.py # FastAPI main app
β”œβ”€β”€ index.html # Main UI (single file, RTL Arabic)
β”œβ”€β”€ pass.html # Auth gateway
β”œβ”€β”€ logs.html # Real-time logs dashboard
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ Dockerfile # HF Spaces compatible
β”œβ”€β”€ README.md # This file
β”œβ”€β”€ agents/
β”‚ β”œβ”€β”€ __init__.py
β”‚ β”œβ”€β”€ orchestrator.py # Master coordinator
β”‚ β”œβ”€β”€ prompt_engineer.py # LLM prompt enhancement
β”‚ β”œβ”€β”€ image_generator.py # FLUX.1-dev keyframe
β”‚ β”œβ”€β”€ video_generator.py # Wan 2.6 + LTX-2.3
β”‚ β”œβ”€β”€ face_restorer.py # GFPGAN (placeholder)
β”‚ β”œβ”€β”€ frame_interpolator.py # RIFE (placeholder)
β”‚ β”œβ”€β”€ video_upscaler.py # Real-ESRGAN (placeholder)
β”‚ └── log_monitor.py # Logging agent
β”œβ”€β”€ config/
β”‚ β”œβ”€β”€ __init__.py
β”‚ β”œβ”€β”€ settings.py # App config
β”‚ β”œβ”€β”€ models_config.py # Model params
β”‚ └── gpu_allocation.py # GPU mapping
└── core/
β”œβ”€β”€ __init__.py
β”œβ”€β”€ auth.py # JWT auth
β”œβ”€β”€ r2_client.py # Cloudflare R2
└── websocket_manager.py # WS connections
```
## Environment Variables (Secrets)
Set these in HF Space Settings > Secrets:
- `HF_TOKEN` β€” HuggingFace access token
- `PASS_KEY` β€” Password for login
- `R2_ACCOUNT_ID` β€” Cloudflare R2 account ID
- `R2_BUCKET_NAME` β€” R2 bucket name
- `R2_ACCESS_KEY_ID` β€” R2 access key
- `R2_SECRET_ACCESS_KEY` β€” R2 secret key
- `R2_PUBLIC_DOMAIN` β€” R2 public domain
## Models Used
| Agent | Model | GPU | VRAM |
|-------|-------|-----|------|
| Video Primary | Wan 2.6 14B (FP8) | GPU-0 | ~45GB |
| Video Backup | LTX-2.3 | GPU-1 | ~20GB |
| Image | FLUX.1-dev (FP8) | GPU-5 | ~16GB |
| Upscale | Real-ESRGAN | GPU-4 | ~8GB |
| Face Restore | GFPGAN | GPU-2 | ~8GB |
| Interpolation | RIFE | GPU-3 | ~6GB |
| Audio | F5-TTS | GPU-6 | ~6GB |
| Orchestrator | Qwen 2.5 72B | GPU-7 | ~40GB |
## Notes
- PyTorch wheels include CUDA 12.4 β€” no need for nvidia/cuda base image
- All models load at startup (no cold start)
- FP8 inference on L40S for 2Γ— speed
- NVENC hardware encoding for final output