MogensR commited on
Commit
7a4dd4e
·
verified ·
1 Parent(s): 0b45506

Update requirements.txt

Browse files
Files changed (1) hide show
  1. requirements.txt +15 -129
requirements.txt CHANGED
@@ -1,151 +1,37 @@
1
- # ============================================================================
2
- # PYTORCH CUDA WHEELS (CUDA 12.1) - Always keep at the top for Hugging Face
3
- # ============================================================================
4
  --extra-index-url https://download.pytorch.org/whl/cu121
5
 
6
- # ============================================================================
7
- # CORE PYTHON DEPENDENCIES (Python 3.10)
8
- # ============================================================================
9
  numpy==1.26.4
10
  Pillow>=10.0.1,<11.0
11
- setuptools>=65.7.0,<69.0
12
- wheel>=0.40.0,<1.0
13
- typing-extensions>=4.12.2,<5.0
14
 
15
- # ============================================================================
16
- # WEB FRAMEWORK & UI
17
- # ============================================================================
18
  gradio==4.44.0
19
- gradio_client==1.3.0
20
- fastapi>=0.104.0,<1.0
21
- uvicorn[standard]>=0.24.0,<1.0
22
- python-multipart>=0.0.6,<1.0
23
 
24
- # ============================================================================
25
- # DEEP LEARNING & AI MODELS (Python 3.10 + CUDA 12.1)
26
- # ============================================================================
27
  torch==2.5.1
28
  torchvision==0.20.1
29
- torchaudio==2.5.1
 
30
  transformers>=4.45.0,<5.0
31
  huggingface_hub>=0.25.0,<1.0
32
- # Bump Accelerate so Diffusers offloading & memory features are available
33
  accelerate>=0.30.0,<1.0
34
- safetensors==0.4.3
35
- tokenizers>=0.19.0,<1.0
36
- datasets>=2.14.0,<3.0
37
  einops==0.8.0
38
- timm>=0.9.16,<1.0
39
- # xFormers optional; if no wheel for your env, Diffusers will still run without it
40
- xformers>=0.0.28,<0.1.0
41
-
42
- # >>> NEW: Diffusers for AI background generation <
43
- diffusers>=0.30.0,<0.31
44
 
45
- # ============================================================================
46
- # COMPUTER VISION & VIDEO PROCESSING
47
- # ============================================================================
48
- opencv-contrib-python-headless==4.10.0.84
49
- git+https://github.com/facebookresearch/segment-anything-2.git
50
- # Fix for imageio version pinning to avoid conflicts with moviepy & scikit-image:
51
  imageio==2.25.0
52
  imageio-ffmpeg>=0.4.9,<1.0
53
  ffmpeg-python>=0.2.0,<1.0
54
- av>=11.0.0,<12.0
55
  moviepy>=1.0.3,<2.0
56
- albumentations>=1.3.1,<2.0
57
-
58
- # ============================================================================
59
- # SCIENTIFIC COMPUTING
60
- # ============================================================================
61
- scipy==1.13.1
62
- pandas>=2.0.3,<3.0
63
- matplotlib>=3.7.2,<4.0
64
- seaborn>=0.12.2,<1.0
65
- tqdm>=4.66.1,<5.0
66
-
67
- # ============================================================================
68
- # CONFIGURATION & UTILITIES
69
- # ============================================================================
70
- hydra-core==1.3.2
71
- omegaconf==2.3.0
72
- python-dotenv>=1.0.0,<2.0
73
- pyyaml>=6.0.1,<7.0
74
- click>=8.1.7,<9.0
75
- rich>=13.5.0,<14.0
76
- typer>=0.9.0,<1.0
77
-
78
- # ============================================================================
79
- # PERFORMANCE & OPTIMIZATION
80
- # ============================================================================
81
- numba>=0.58.0,<1.0
82
- joblib>=1.3.2,<2.0
83
- diskcache>=5.6.3,<6.0
84
- psutil>=5.9.5,<6.0
85
- gputil>=1.4.0,<2.0
86
- pynvml>=11.5.0,<12.0
87
- onnx>=1.14.0,<2.0
88
- onnxruntime>=1.16.0,<2.0
89
 
90
- # ============================================================================
91
- # LOGGING & MONITORING
92
- # ============================================================================
93
- loguru>=0.7.2,<1.0
94
- tensorboard>=2.15.0,<3.0
95
- wandb>=0.16.0,<1.0
96
- prometheus-client>=0.19.0,<1.0
97
-
98
- # ============================================================================
99
- # ERROR HANDLING & VALIDATION
100
- # ============================================================================
101
- pydantic>=2.5.0,<3.0
102
- marshmallow>=3.20.0,<4.0
103
- cerberus>=1.3.5,<2.0
104
-
105
- # ============================================================================
106
- # MATANYONE - UPDATED TO USE MAIN BRANCH (Fixes tensor dimension issue)
107
- # ============================================================================
108
  git+https://github.com/pq-yang/MatAnyone.git@main
109
 
110
- # ============================================================================
111
- # API & ASYNC SUPPORT
112
- # ============================================================================
113
- aiohttp>=3.9.0,<4.0
114
- aiofiles>=23.2.0,<24.0
115
- httpx>=0.25.0,<1.0
116
- websockets>=12.0,<13.0
117
- redis>=5.0.0,<6.0
118
- celery>=5.3.0,<6.0
119
-
120
- # ============================================================================
121
- # TESTING
122
- # ============================================================================
123
- pytest>=7.4.3,<8.0
124
- pytest-cov>=4.1.0,<5.0
125
- pytest-asyncio>=0.21.1,<1.0
126
- pytest-benchmark>=4.0.0,<5.0
127
-
128
- # ============================================================================
129
- # CODE QUALITY
130
- # ============================================================================
131
- black>=23.11.0,<24.0
132
- ruff>=0.1.6,<1.0
133
- mypy>=1.7.0,<2.0
134
- pre-commit>=3.5.0,<4.0
135
-
136
- # ============================================================================
137
- # DEPLOYMENT & PRODUCTION
138
- # ============================================================================
139
- gunicorn>=21.2.0,<22.0
140
- supervisor>=4.2.5,<5.0
141
- python-crontab>=3.0.0,<4.0
142
 
143
- # ============================================================================
144
- # NOTES / FIXES
145
- # ============================================================================
146
- # 1. Keep --extra-index-url at the top.
147
- # 2. Install MatAnyone from GitHub main branch (fixes tensor dimension issue).
148
- # 3. Imageio pinned to 2.25.0 to avoid moviepy/scikit-image breakage.
149
- # 4. If CUDA issues: clear HF cache and restart Space.
150
- # 5. Diffusers added for AI background creation; Accelerate bumped to enable memory offload features.
151
- # 6. Gradio pinned to 4.44.0 with compatible client for stability.
 
1
+ # CUDA support for T4
 
 
2
  --extra-index-url https://download.pytorch.org/whl/cu121
3
 
4
+ # Core
 
 
5
  numpy==1.26.4
6
  Pillow>=10.0.1,<11.0
 
 
 
7
 
8
+ # UI
 
 
9
  gradio==4.44.0
 
 
 
 
10
 
11
+ # PyTorch for T4 GPU
 
 
12
  torch==2.5.1
13
  torchvision==0.20.1
14
+
15
+ # Models
16
  transformers>=4.45.0,<5.0
17
  huggingface_hub>=0.25.0,<1.0
 
18
  accelerate>=0.30.0,<1.0
 
 
 
19
  einops==0.8.0
 
 
 
 
 
 
20
 
21
+ # Video processing
22
+ opencv-python-headless==4.8.1.78 # CHANGED: Safer version without WASM
 
 
 
 
23
  imageio==2.25.0
24
  imageio-ffmpeg>=0.4.9,<1.0
25
  ffmpeg-python>=0.2.0,<1.0
 
26
  moviepy>=1.0.3,<2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
+ # SAM2 and MatAnyone
29
+ git+https://github.com/facebookresearch/segment-anything-2.git
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  git+https://github.com/pq-yang/MatAnyone.git@main
31
 
32
+ # Scientific computing
33
+ scipy==1.13.1
34
+ tqdm>=4.66.1,<5.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
+ # Optional for AI backgrounds
37
+ diffusers>=0.30.0,<0.31