# VideoGen - Universal Video Generation Toolkit
# Copyleft © 2026 Stefy <stefy@nexlab.net>
# Compatible with Python 3.12+

# Core Dependencies (Required)
torch>=2.2.0
torchvision>=0.17.0
torchaudio>=2.2.0
diffusers>=0.32.0
transformers>=4.40.0
accelerate>=0.27.0
xformers>=0.0.25  # May need --pre flag for Python 3.13
spandrel>=0.2.0
psutil>=5.9.0
ffmpeg-python>=0.2.0
ftfy>=6.2.0
Pillow>=10.2.0
safetensors>=0.4.2
huggingface-hub>=0.23.0
peft>=0.10.0  # Required for LoRA adapter loading
numpy>=1.26.0  # Python 3.12+ compatible

# Audio Dependencies (Optional - for TTS and music generation)
scipy>=1.12.0
soundfile>=0.12.1
librosa>=0.10.2
edge-tts>=6.1.10
# bark  # Install with: pip install git+https://github.com/suno-ai/bark.git

# NOTE: audiocraft (MusicGen) is NOT compatible with Python 3.13 due to blis/spacy dependencies
# For Python 3.12 or lower, you can try:
# pip install audiocraft
# For Python 3.13+, use an alternative or wait for audiocraft updates

# Speech-to-Text & Translation (Optional - for dubbing and subtitles)
openai-whisper>=20231117  # For transcription
# Or: pip install openai-whisper
# Translation uses transformers (already listed above) with MarianMT models

# Lip Sync Dependencies (Optional)
opencv-python>=4.9.0
# face-recognition  # Requires dlib which may have issues on Python 3.13
# dlib  # Install with: pip install dlib (requires cmake)

# Character Consistency Dependencies (Optional - for IP-Adapter, InstantID)
# insightface>=0.7.3  # Install with: pip install insightface
# onnxruntime-gpu>=1.17.0  # Required for insightface GPU acceleration
# or onnxruntime>=1.17.0  # CPU only

# Model Management
requests>=2.31.0
urllib3>=2.2.0

# Progress and UI
tqdm>=4.66.0
rich>=13.7.0

# Configuration
pydantic>=2.6.0

# Distributed Processing
# accelerate  # Already listed above

# Web Interface Dependencies (Optional - for webapp.py)
flask>=3.0.2
flask-cors>=4.0.0
flask-socketio>=5.3.6
eventlet>=0.36.0
python-socketio>=5.11.0
werkzeug>=3.0.1

# MCP Server Dependencies (Optional - for AI agent integration)
# mcp>=1.0.0  # Install with: pip install mcp

# Optional: NSFW Classification
# onnxruntime>=1.17.0

# ============================================================================
# SYSTEM DEPENDENCIES (Debian/Ubuntu)
# ============================================================================
#
# BEFORE installing Python packages, install these system dependencies:
#
# sudo apt-get update
# sudo apt-get install -y \
#     build-essential \
#     cmake \
#     pkg-config \
#     ffmpeg \
#     libavformat-dev \
#     libavcodec-dev \
#     libavdevice-dev \
#     libavutil-dev \
#     libavfilter-dev \
#     libswscale-dev \
#     libswresample-dev \
#     libsdl2-dev \
#     libssl-dev \
#     libcurl4-openssl-dev \
#     python3-dev
#
# For face-recognition (optional):
# sudo apt-get install -y libdlib-dev
#
# ============================================================================
# INSTALLATION NOTES FOR PYTHON 3.12+
# ============================================================================
#
# For Python 3.12+, some packages may require specific installation methods:
#
# 1. PyTorch (with CUDA support):
#    pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
#
# 2. xformers (may need --pre for Python 3.13):
#    pip install --pre xformers
#
# 3. diffusers (latest from git for newest features):
#    pip install git+https://github.com/huggingface/diffusers.git
#
# 4. transformers (latest from git for newest models):
#    pip install git+https://github.com/huggingface/transformers.git
#
# 5. For face-recognition (requires dlib):
#    - On Ubuntu/Debian: sudo apt-get install cmake libdlib-dev
#    - pip install dlib
#    - pip install face-recognition
#
# 6. For audiocraft (MusicGen) - NOT COMPATIBLE WITH PYTHON 3.13:
#    - audiocraft depends on spacy → thinc → blis
#    - blis fails to compile on Python 3.13 due to GCC incompatibility
#    - For Python 3.12 or lower:
#        pip install av
#        pip install audiocraft
#    - For Python 3.13+, use an alternative music generation library or
#      create a separate Python 3.12 environment for audiocraft
#
# 7. For bark (TTS):
#    pip install git+https://github.com/suno-ai/bark.git
#
# ============================================================================
# QUICK INSTALL (Python 3.12+)
# ============================================================================
#
# # 1. Install system dependencies first:
# sudo apt-get update && sudo apt-get install -y \
#     build-essential cmake pkg-config ffmpeg \
#     libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev \
#     libavfilter-dev libswscale-dev libswresample-dev \
#     libsdl2-dev libssl-dev python3-dev
#
# # 2. Install PyTorch with CUDA:
# pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
#
# # 3. Install xformers:
# pip install --pre xformers
#
# # 4. Install latest diffusers and transformers:
# pip install git+https://github.com/huggingface/diffusers.git
# pip install git+https://github.com/huggingface/transformers.git
#
# # 5. Install remaining dependencies:
# pip install -r requirements.txt --break-system-packages
#