Spaces:
Runtime error
Runtime error
[Admin maintenance] Support new ZeroGPU hardware
Browse filesThank you so much for having shared this Space with the community on this demo. We have upgraded the ZeroGPU infra-structure to run on modern blackwell architecture.
For that, we need to upgrade your demo to support that. This PR fixes your demo to work with the new architecture. As this is something we broke on our end, we may merge this PR autonomously. If this breaks unexpectedly or brings unintended consequences, feel free to revert, modify or otherwise. Any issues you can email apolinario@huggingface.co
- app.py +12 -5
- requirements.txt +6 -9
app.py
CHANGED
|
@@ -15,13 +15,12 @@
|
|
| 15 |
|
| 16 |
import os
|
| 17 |
os.system("rm -rf /data-nvme/zerogpu-offload/")
|
| 18 |
-
os.system("pip install chumpy")
|
| 19 |
os.system("pip uninstall -y basicsr")
|
| 20 |
os.system("pip install git+https://github.com/hitsz-zuoqi/BasicSR/")
|
| 21 |
os.system("pip install numpy==1.23.0")
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
os.system("pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py310_cu121_pyt240/download.html")
|
| 25 |
import cv2
|
| 26 |
import time
|
| 27 |
from PIL import Image
|
|
@@ -31,6 +30,14 @@ import base64
|
|
| 31 |
import spaces
|
| 32 |
import torch
|
| 33 |
torch._dynamo.config.disable = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
import subprocess
|
| 35 |
import os
|
| 36 |
import argparse
|
|
@@ -400,7 +407,7 @@ def launch_pretrained():
|
|
| 400 |
hf_hub_download(repo_id="3DAIGC/LHM-500M-HF", repo_type='model', filename='model.safetensors', local_dir="./exps/releases/video_human_benchmark/human-lrm-500M/step_060000/")
|
| 401 |
|
| 402 |
def launch_env_not_compile_with_cuda():
|
| 403 |
-
os.system("pip install chumpy")
|
| 404 |
os.system("pip uninstall -y basicsr")
|
| 405 |
os.system("pip install git+https://github.com/hitsz-zuoqi/BasicSR/")
|
| 406 |
os.system("pip install numpy==1.23.0")
|
|
|
|
| 15 |
|
| 16 |
import os
|
| 17 |
os.system("rm -rf /data-nvme/zerogpu-offload/")
|
| 18 |
+
os.system("pip install --no-build-isolation chumpy")
|
| 19 |
os.system("pip uninstall -y basicsr")
|
| 20 |
os.system("pip install git+https://github.com/hitsz-zuoqi/BasicSR/")
|
| 21 |
os.system("pip install numpy==1.23.0")
|
| 22 |
+
# diff_gaussian_rasterization / pytorch3d / simple_knn are now installed at build time from
|
| 23 |
+
# requirements.txt (prebuilt Blackwell sm_120 wheels); no runtime pip install needed.
|
|
|
|
| 24 |
import cv2
|
| 25 |
import time
|
| 26 |
from PIL import Image
|
|
|
|
| 30 |
import spaces
|
| 31 |
import torch
|
| 32 |
torch._dynamo.config.disable = True
|
| 33 |
+
|
| 34 |
+
# torch>=2.6 flipped torch.load's default to weights_only=True, which breaks loading
|
| 35 |
+
# these (trusted, first-party) checkpoints that pickle argparse.Namespace and other globals.
|
| 36 |
+
_orig_torch_load = torch.load
|
| 37 |
+
def _torch_load_full(*args, **kwargs):
|
| 38 |
+
kwargs.setdefault("weights_only", False)
|
| 39 |
+
return _orig_torch_load(*args, **kwargs)
|
| 40 |
+
torch.load = _torch_load_full
|
| 41 |
import subprocess
|
| 42 |
import os
|
| 43 |
import argparse
|
|
|
|
| 407 |
hf_hub_download(repo_id="3DAIGC/LHM-500M-HF", repo_type='model', filename='model.safetensors', local_dir="./exps/releases/video_human_benchmark/human-lrm-500M/step_060000/")
|
| 408 |
|
| 409 |
def launch_env_not_compile_with_cuda():
|
| 410 |
+
os.system("pip install --no-build-isolation chumpy")
|
| 411 |
os.system("pip uninstall -y basicsr")
|
| 412 |
os.system("pip install git+https://github.com/hitsz-zuoqi/BasicSR/")
|
| 413 |
os.system("pip install numpy==1.23.0")
|
requirements.txt
CHANGED
|
@@ -12,7 +12,6 @@ diffusers
|
|
| 12 |
dna==0.0.1
|
| 13 |
gfpgan==1.3.8
|
| 14 |
gsplat==1.4.0
|
| 15 |
-
huggingface_hub==0.23.2
|
| 16 |
imageio==2.19.3
|
| 17 |
jaxtyping==0.2.38
|
| 18 |
kiui==0.2.14
|
|
@@ -38,14 +37,12 @@ setuptools==74.0.0
|
|
| 38 |
taming_transformers_rom1504==0.0.6
|
| 39 |
timm==1.0.15
|
| 40 |
|
| 41 |
-
#
|
| 42 |
-
#
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
https://
|
| 46 |
-
https://
|
| 47 |
-
|
| 48 |
-
|
| 49 |
|
| 50 |
tqdm==4.66.4
|
| 51 |
transformers==4.41.2
|
|
|
|
| 12 |
dna==0.0.1
|
| 13 |
gfpgan==1.3.8
|
| 14 |
gsplat==1.4.0
|
|
|
|
| 15 |
imageio==2.19.3
|
| 16 |
jaxtyping==0.2.38
|
| 17 |
kiui==0.2.14
|
|
|
|
| 37 |
taming_transformers_rom1504==0.0.6
|
| 38 |
timm==1.0.15
|
| 39 |
|
| 40 |
+
# Blackwell (sm_120) ZeroGPU: use stock torch 2.8.0 (default PyPI cu128 wheel supports sm_120)
|
| 41 |
+
# plus prebuilt CUDA-extension wheels from multimodalart/zerogpu-blackwell-wheels (tag pt28-cu128-cp310).
|
| 42 |
+
torch==2.8.0
|
| 43 |
+
torchvision==0.23.0
|
| 44 |
+
https://huggingface.co/datasets/multimodalart/zerogpu-blackwell-wheels/resolve/main/wheels/pt28-cu128-cp310/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl
|
| 45 |
+
https://huggingface.co/datasets/multimodalart/zerogpu-blackwell-wheels/resolve/main/wheels/pt28-cu128-cp310/pytorch3d-0.7.9-cp310-cp310-linux_x86_64.whl
|
|
|
|
|
|
|
| 46 |
|
| 47 |
tqdm==4.66.4
|
| 48 |
transformers==4.41.2
|