jboth commited on
Commit
784d43d
·
verified ·
1 Parent(s): 56e808f

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -22,9 +22,8 @@ if os.environ.get("HF_TOKEN"):
22
  # --- Stubs (must be before sam3d imports) ---
23
  STUB_KAOLIN = Path("/home/user/app/kaolin_stub")
24
  STUB_PT3D = Path("/home/user/app/pytorch3d_stub")
25
- STUB_SPCONV = Path("/home/user/app/spconv_stub")
26
  STUB_FA = Path("/home/user/app/flash_attn_stub")
27
- for stub in [STUB_KAOLIN, STUB_PT3D, STUB_SPCONV, STUB_FA]:
28
  if stub.exists():
29
  sys.path.insert(0, str(stub))
30
  print(f"Stub added: {stub.name}")
@@ -55,6 +54,10 @@ for idx in ["https://docs.gsplat.studio/whl/pt210cu128",
55
  if _pip("--no-deps", f"--extra-index-url={idx}", "gsplat"):
56
  break
57
 
 
 
 
 
58
  # DO NOT import CUDA-dependent packages here!
59
 
60
  # --- Clone sam-3d-objects ---
 
22
  # --- Stubs (must be before sam3d imports) ---
23
  STUB_KAOLIN = Path("/home/user/app/kaolin_stub")
24
  STUB_PT3D = Path("/home/user/app/pytorch3d_stub")
 
25
  STUB_FA = Path("/home/user/app/flash_attn_stub")
26
+ for stub in [STUB_KAOLIN, STUB_PT3D, STUB_FA]:
27
  if stub.exists():
28
  sys.path.insert(0, str(stub))
29
  print(f"Stub added: {stub.name}")
 
54
  if _pip("--no-deps", f"--extra-index-url={idx}", "gsplat"):
55
  break
56
 
57
+ # spconv (sparse convolution – needed for SAM3D's SLatFlowModel)
58
+ # cu124 wheel is forward-compatible with cu128
59
+ _pip("spconv-cu124==2.3.8")
60
+
61
  # DO NOT import CUDA-dependent packages here!
62
 
63
  # --- Clone sam-3d-objects ---