Andrzej Kryszpiniuk commited on
Commit
61073b1
·
1 Parent(s): f7ff9dc

Use runtime install with --no-build-isolation (fix for ZeroGPU build)

Browse files
Files changed (2) hide show
  1. app.py +11 -3
  2. requirements.txt +1 -1
app.py CHANGED
@@ -112,9 +112,17 @@ except ImportError:
112
  # (Optional) side-step allocator+NVML quirks in restrictive containers
113
  env.setdefault("PYTORCH_NO_CUDA_MEMORY_CACHING", "1")
114
 
115
- # FIX: Use pre-built wheel from requirements.txt to avoid build errors
116
- # subprocess.check_call([sys.executable, "-m", "pip", "install", "git+https://github.com/graphdeco-inria/diff-gaussian-rasterization"], env=env)
117
- import diff_gaussian_rasterization # noqa: F401
 
 
 
 
 
 
 
 
118
 
119
 
120
  from gslrm.model.gaussians_renderer import render_turntable, imageseq2video
 
112
  # (Optional) side-step allocator+NVML quirks in restrictive containers
113
  env.setdefault("PYTORCH_NO_CUDA_MEMORY_CACHING", "1")
114
 
115
+ # FIX: Install from source with --no-build-isolation to use existing torch
116
+ try:
117
+ import diff_gaussian_rasterization
118
+ except ImportError:
119
+ print("Installing diff-gaussian-rasterization...")
120
+ subprocess.check_call(
121
+ [sys.executable, "-m", "pip", "install", "--no-build-isolation",
122
+ "git+https://github.com/graphdeco-inria/diff-gaussian-rasterization"],
123
+ env=env,
124
+ )
125
+ import diff_gaussian_rasterization # noqa: F401
126
 
127
 
128
  from gslrm.model.gaussians_renderer import render_turntable, imageseq2video
requirements.txt CHANGED
@@ -26,4 +26,4 @@ pytorch-msssim==1.0.0
26
  ffmpeg-python==0.2.0
27
  tqdm
28
  spaces
29
- https://huggingface.co/camenduru/gaussian-splatting/resolve/main/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl
 
26
  ffmpeg-python==0.2.0
27
  tqdm
28
  spaces
29
+