Spaces:
Paused
Paused
| 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 | |