Spaces:
Runtime error
Runtime error
Commit
ยท
b7d4d15
1
Parent(s):
12ddb17
update
Browse files- app.py +3 -3
- requirements.txt +7 -4
app.py
CHANGED
@@ -13,7 +13,7 @@ import subprocess
|
|
13 |
import shutil
|
14 |
|
15 |
# install others
|
16 |
-
subprocess.run("pip install spandrel==0.4.1 --no-deps", shell=True, check=True)
|
17 |
|
18 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
DTYPE = torch.float16
|
@@ -108,7 +108,7 @@ remove_bg_fn = lambda x: remove_bg(x, birefnet, transform_image, DEVICE)
|
|
108 |
if not os.path.exists("checkpoints/RealESRGAN_x2plus.pth"):
|
109 |
hf_hub_download("dtarnow/UPscaler", filename="RealESRGAN_x2plus.pth", local_dir="checkpoints")
|
110 |
if not os.path.exists("checkpoints/big-lama.pt"):
|
111 |
-
|
112 |
|
113 |
def start_session(req: gr.Request):
|
114 |
save_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
@@ -465,4 +465,4 @@ with gr.Blocks(title="TripoSG") as demo:
|
|
465 |
demo.load(start_session)
|
466 |
demo.unload(end_session)
|
467 |
|
468 |
-
demo.launch()
|
|
|
13 |
import shutil
|
14 |
|
15 |
# install others
|
16 |
+
#subprocess.run("pip install spandrel==0.4.1 --no-deps", shell=True, check=True)
|
17 |
|
18 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
DTYPE = torch.float16
|
|
|
108 |
if not os.path.exists("checkpoints/RealESRGAN_x2plus.pth"):
|
109 |
hf_hub_download("dtarnow/UPscaler", filename="RealESRGAN_x2plus.pth", local_dir="checkpoints")
|
110 |
if not os.path.exists("checkpoints/big-lama.pt"):
|
111 |
+
hf_hub_download("cocktailpeanut/biglama", filename="big-lama.pt", local_dir="checkpoints")
|
112 |
|
113 |
def start_session(req: gr.Request):
|
114 |
save_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
|
|
465 |
demo.load(start_session)
|
466 |
demo.unload(end_session)
|
467 |
|
468 |
+
demo.launch()
|
requirements.txt
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
-
|
|
|
|
|
2 |
diffusers
|
3 |
transformers==4.49.0
|
4 |
einops
|
@@ -17,7 +19,8 @@ open3d
|
|
17 |
timm
|
18 |
kornia
|
19 |
ninja
|
20 |
-
https://huggingface.co/spaces/JeffreyXiang/TRELLIS/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl?download=true
|
21 |
-
cvcuda_cu12
|
22 |
gltflib
|
23 |
-
torch-cluster
|
|
|
|
1 |
+
gradio
|
2 |
+
spaces
|
3 |
+
#torchvision
|
4 |
diffusers
|
5 |
transformers==4.49.0
|
6 |
einops
|
|
|
19 |
timm
|
20 |
kornia
|
21 |
ninja
|
22 |
+
#https://huggingface.co/spaces/JeffreyXiang/TRELLIS/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl?download=true
|
23 |
+
#cvcuda_cu12
|
24 |
gltflib
|
25 |
+
#torch-cluster
|
26 |
+
spandrel==0.4.1
|