TSXu commited on
Commit
e0c788a
·
1 Parent(s): 51bfc24

Fix torchvision compatibility: install torchvision<0.20 with torch<2.9

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,10 +4,10 @@ Gradio Demo for Chinese Calligraphy Generation - HuggingFace Space Version
4
  With Float8 quantization and AOT compilation for faster inference
5
  """
6
 
7
- # Install compatible torch + spaces versions (following FLUX-Kontext-fp8 pattern)
8
  import os
9
- os.system('pip install --upgrade --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu126 "torch<2.9" spaces')
10
- print("torch + spaces installation complete!")
11
 
12
  # IMPORTANT: import spaces first before any CUDA-related packages
13
  import spaces
 
4
  With Float8 quantization and AOT compilation for faster inference
5
  """
6
 
7
+ # Install compatible torch + torchvision + spaces versions (following FLUX-Kontext-fp8 pattern)
8
  import os
9
+ os.system('pip install --upgrade --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu126 "torch<2.9" "torchvision<0.20" spaces')
10
+ print("torch + torchvision + spaces installation complete!")
11
 
12
  # IMPORTANT: import spaces first before any CUDA-related packages
13
  import spaces