Spaces:
Running on Zero
Running on Zero
Fix torchvision compatibility: install torchvision<0.20 with torch<2.9
Browse files
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
|