# backend/requirements-base.txt
# Base requirements WITHOUT PyTorch (installed separately based on GPU)
# IMPORTANT: Keep in sync with requirements.txt — start.sh prefers this file

# Core Flask/Backend Dependencies
Flask==3.1.3
Flask-Executor==1.0.0
Flask-Migrate==4.0.7
Flask-SQLAlchemy==3.1.1
Flask-SocketIO==5.3.6
flask-cors==6.0.0
alembic==1.13.1
anthropic>=0.40.0
python-dotenv==1.2.2

# Background Tasks & Caching
celery==5.4.0
redis==5.0.4
eventlet==0.40.3

# Data Processing & Analysis
numpy<2.0,>=1.26.4  # Pin to <2.0 for PyTorch compatibility
pandas==2.2.2
pydantic==2.11.7
psutil==5.9.8

# Web Scraping & File Processing
beautifulsoup4==4.12.3
lxml==6.1.1
pypdf==6.10.2
requests==2.33.0
duckduckgo-search==8.1.1

# Database & Utilities
psycopg2-binary==2.9.9
python-slugify==8.0.4
loguru==0.7.2

# LLM/AI Dependencies (without torch)
llama-index-core>=0.13.0,<0.15.0  # Compatible with llama-index-embeddings-ollama
llama-index-llms-ollama>=0.7.0  # Updated for llama-index-core 0.14.x
llama-index-embeddings-ollama>=0.8.0
llama-index-readers-file>=0.5.0  # Updated for llama-index-core 0.14.x

# Image Generation Dependencies (without torch)
diffusers>=0.38.0
transformers>=4.50.3,<5.0  # ComfyUI needs >=4.50.3, diffusers incompatible with 5.x
accelerate==1.2.1
safetensors>=0.4.0
Pillow==12.2.0

# ComfyUI / Video Generation Dependencies
torchsde>=0.2.6
sentencepiece>=0.2.0
kornia>=0.7.1
spandrel>=0.4.0
av>=14.2.0
pydantic-settings>=2.0

# Face Restoration & Enhancement
gfpgan==1.3.5  # Downgraded from 1.3.8 for torchvision compatibility
realesrgan==0.3.0
facexlib==0.3.0
basicsr>=1.4.2  # Required by GFPGAN and RealESRGAN
lmdb>=1.0.0  # Required by GFPGAN
scipy>=1.10.0  # Required by GFPGAN
tqdm>=4.65.0  # Required by GFPGAN and RealESRGAN
PyYAML>=6.0  # Required by GFPGAN (note: package name is PyYAML, not pyyaml)
tb-nightly  # Required by GFPGAN (optional for runtime, but recommended)

# Anatomy & Pose Control
controlnet-aux==0.0.9
mediapipe==0.10.14

# Video Processing Dependencies
opencv-python==4.8.1.78
imageio==2.34.0
imageio-ffmpeg==0.5.1

# Voice Processing Dependencies
piper-tts==1.3.0
onnxruntime==1.22.1

# Testing Dependencies
pytest==9.0.3
pytest-timeout==2.3.1
pytest-playwright==0.7.0
playwright==1.52.0

# Desktop Automation Dependencies
pyautogui>=0.9.54      # GUI automation (mouse, keyboard)
pynput>=1.7.6          # Keyboard/mouse monitoring
watchdog>=3.0.0        # File system monitoring
pyperclip>=1.8.2       # Cross-platform clipboard
plyer>=2.1.0           # Native notifications
pathspec>=0.12.0       # gitignore_filter / upload_api — required for upload blueprint
