Hunsain Mazhar commited on
Commit
5ed2da6
Β·
1 Parent(s): 3358f3e

Remove monkey patch for diffusers compatibility; revert huggingface_hub and gradio versions for stability

Browse files
Files changed (2) hide show
  1. app.py +0 -9
  2. requirements.txt +12 -18
app.py CHANGED
@@ -3,15 +3,6 @@ import os
3
  import gc
4
  import shutil
5
 
6
-
7
- # --- MONKEY PATCH: Fix for diffusers 0.25 vs huggingface_hub ---
8
- import huggingface_hub
9
- if not hasattr(huggingface_hub, "cached_download"):
10
- # Create a dummy alias so diffusers 0.25.1 doesn't crash on import
11
- huggingface_hub.cached_download = huggingface_hub.hf_hub_download
12
- # ---------------------------------------------------------------
13
-
14
- # Now continue with normal imports...
15
  # --- 1. System Setup & Error Handling ---
16
  # Force install detectron2 if missing
17
  try:
 
3
  import gc
4
  import shutil
5
 
 
 
 
 
 
 
 
 
 
6
  # --- 1. System Setup & Error Handling ---
7
  # Force install detectron2 if missing
8
  try:
requirements.txt CHANGED
@@ -1,33 +1,27 @@
1
  # --- CORE INFRASTRUCTURE ---
2
- # huggingface_hub 0.25.2 is the LAST version to support 'cached_download'
3
- # We MUST use this to prevent the ImportError.
4
- huggingface_hub==0.25.2
5
  spaces==0.30.2
6
- # Gradio 4.44.1 is stable and fixes the Auth/ZeroGPU bugs from 4.36
7
- gradio==4.44.1
8
 
9
  # --- AI FRAMEWORKS ---
10
- torch==2.1.2
11
- torchvision==0.16.2
12
- torchaudio==2.1.2
13
- numpy<2.0.0
14
  accelerate==0.26.1
15
 
16
  # --- IDM-VTON DEPENDENCIES ---
17
- # Keeps 'PositionNet' working
18
- diffusers==0.25.1
19
  transformers==4.36.2
20
- pydantic>=2.0.0
21
-
22
- # --- UTILITIES ---
23
  scipy==1.10.1
24
  scikit-image==0.21.0
25
  opencv-python-headless
26
- pillow==9.5.0
27
  matplotlib==3.7.4
28
- tqdm
29
- config
30
- einops
31
  basicsr
32
  av
33
  fvcore
 
1
  # --- CORE INFRASTRUCTURE ---
 
 
 
2
  spaces==0.30.2
3
+ gradio==4.36.1
4
+ huggingface_hub==0.24.6
5
 
6
  # --- AI FRAMEWORKS ---
7
+ torch==2.1.0
8
+ torchvision==0.16.0
9
+ torchaudio==2.1.0
10
+ numpy==1.24.4
11
  accelerate==0.26.1
12
 
13
  # --- IDM-VTON DEPENDENCIES ---
14
+ diffusers==0.25.0
 
15
  transformers==4.36.2
16
+ pydantic==2.10.6
 
 
17
  scipy==1.10.1
18
  scikit-image==0.21.0
19
  opencv-python-headless
20
+ pillow==9.4.0
21
  matplotlib==3.7.4
22
+ tqdm==4.64.1
23
+ config==0.5.1
24
+ einops==0.7.0
25
  basicsr
26
  av
27
  fvcore