Umut Kocasari Claude Opus 4.8 commited on
Commit
138ce2c
·
1 Parent(s): 6d76d9e

Add torchvision (not in the ZeroGPU base image)

Browse files

depth_anything_3.utils.io.input_processor imports torchvision.transforms, but the
ZeroGPU base image ships only torch (2.11.0, CUDA 13), not torchvision. Pin
torchvision==0.26.0, which requires exactly torch==2.11.0 (verified on PyPI), so
it installs onto the existing runtime torch without pulling a different CUDA build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Files changed (1) hide show
  1. requirements.txt +7 -2
requirements.txt CHANGED
@@ -1,7 +1,11 @@
1
  # FaceAnything Space dependencies.
2
  #
3
- # torch / torchvision are provided by the Space runtime (ZeroGPU / GPU image) and
4
- # are intentionally NOT pinned here so they match the platform CUDA build.
 
 
 
 
5
  #
6
  # xformers is intentionally omitted: the model falls back to a pure-PyTorch SwiGLU
7
  # when it is absent (see dinov2/layers/swiglu_ffn.py), and pinning it tends to
@@ -9,6 +13,7 @@
9
  # kernel and your torch build is compatible.
10
 
11
  spaces
 
12
 
13
  numpy==1.26.4
14
  scipy==1.16.3
 
1
  # FaceAnything Space dependencies.
2
  #
3
+ # torch is provided by the Space runtime (ZeroGPU image ships torch==2.11.0, CUDA
4
+ # 13) so it is NOT pinned here. torchvision, however, is NOT in the base image and
5
+ # must be installed — pinned to the build that matches the runtime torch
6
+ # (torchvision 0.26.0 requires torch==2.11.0), so it slots onto the existing torch
7
+ # without dragging in a different CUDA build. Bump both together if HF changes the
8
+ # base image torch version (check the build logs).
9
  #
10
  # xformers is intentionally omitted: the model falls back to a pure-PyTorch SwiGLU
11
  # when it is absent (see dinov2/layers/swiglu_ffn.py), and pinning it tends to
 
13
  # kernel and your torch build is compatible.
14
 
15
  spaces
16
+ torchvision==0.26.0 # matches runtime torch==2.11.0 (NOT in the base image)
17
 
18
  numpy==1.26.4
19
  scipy==1.16.3