yimingc9 commited on
Commit
7a7e899
·
1 Parent(s): 3c58630

Use ZeroGPU-compatible PyTorch

Browse files
Files changed (2) hide show
  1. README.md +5 -8
  2. requirements.txt +3 -5
README.md CHANGED
@@ -42,10 +42,7 @@ cd physformer
42
  conda create -n physformer python=3.10 -y
43
  conda activate physformer
44
 
45
- # Install PyTorch (CUDA 12.4)
46
- pip install torch==2.5.1 torchvision==0.20.1 --index-url https://download.pytorch.org/whl/cu124
47
-
48
- # Install remaining requirements
49
  pip install -r requirements.txt
50
  ```
51
 
@@ -245,10 +242,10 @@ Use the project inference environment with PyTorch installed. The copied code ex
245
  - matplotlib
246
  - imageio and imageio-ffmpeg only if saving GIF/MP4 renders
247
 
248
- `requirements.txt` includes PyTorch so Hugging Face Spaces can build directly from this repository.
249
- For local installs, you may still install PyTorch explicitly first so pip chooses the intended CUDA
250
- wheel. The copied model uses PyTorch scaled-dot-product attention and requires a CUDA fast-attention
251
- backend; it does not directly import the external `flash-attn` package.
252
 
253
  The packaged `src/official_demo_inference/configs/vertex_counts_multiobj_all.json` replaces the
254
  checkpoint's original training-machine absolute vertex-count path. A legacy copy is also kept under
 
42
  conda create -n physformer python=3.10 -y
43
  conda activate physformer
44
 
45
+ # Install requirements. The Hugging Face Space uses the ZeroGPU-supported PyTorch version pinned here.
 
 
 
46
  pip install -r requirements.txt
47
  ```
48
 
 
242
  - matplotlib
243
  - imageio and imageio-ffmpeg only if saving GIF/MP4 renders
244
 
245
+ `requirements.txt` includes a ZeroGPU-supported PyTorch version so Hugging Face Spaces can build
246
+ directly from this repository. The copied model uses PyTorch scaled-dot-product attention and
247
+ requires a CUDA fast-attention backend; it does not directly import the external `flash-attn`
248
+ package.
249
 
250
  The packaged `src/official_demo_inference/configs/vertex_counts_multiobj_all.json` replaces the
251
  checkpoint's original training-machine absolute vertex-count path. A legacy copy is also kept under
requirements.txt CHANGED
@@ -1,8 +1,6 @@
1
- # Hugging Face Spaces installs this file directly. For local installs, it is still fine to install
2
- # PyTorch explicitly first with the CUDA wheel index; pip will then treat it as already satisfied.
3
- --extra-index-url https://download.pytorch.org/whl/cu124
4
- torch==2.5.1
5
- torchvision==0.20.1
6
 
7
  # Core runtime dependencies for the copied inference/render code.
8
  gradio>=4
 
1
+ # Hugging Face ZeroGPU currently accepts only selected PyTorch versions.
2
+ # The demo does not import torchvision.
3
+ torch==2.8.0
 
 
4
 
5
  # Core runtime dependencies for the copied inference/render code.
6
  gradio>=4