Spaces:
Build error
Build error
zxhuang1698
commited on
Commit
·
f92bf0d
1
Parent(s):
414b431
use persistent data for ckpt
Browse files
app.py
CHANGED
@@ -132,7 +132,7 @@ def infer_sample(opt, var, graph):
|
|
132 |
return var.mesh_pred[0]
|
133 |
|
134 |
def infer(input_image_path, input_mask_path):
|
135 |
-
opt_cmd = options.parse_arguments(["--yaml=options/shape.yaml", "--datadir=examples", "--eval.vox_res=128", "--ckpt
|
136 |
opt = options.set(opt_cmd=opt_cmd, safe_check=False)
|
137 |
opt.device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
138 |
|
@@ -148,7 +148,7 @@ def infer(input_image_path, input_mask_path):
|
|
148 |
print("Downloading checkpoint...")
|
149 |
subprocess.run(
|
150 |
shlex.split(
|
151 |
-
"wget -q -O
|
152 |
)
|
153 |
)
|
154 |
|
|
|
132 |
return var.mesh_pred[0]
|
133 |
|
134 |
def infer(input_image_path, input_mask_path):
|
135 |
+
opt_cmd = options.parse_arguments(["--yaml=options/shape.yaml", "--datadir=examples", "--eval.vox_res=128", "--ckpt=/data/shape.ckpt"])
|
136 |
opt = options.set(opt_cmd=opt_cmd, safe_check=False)
|
137 |
opt.device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
138 |
|
|
|
148 |
print("Downloading checkpoint...")
|
149 |
subprocess.run(
|
150 |
shlex.split(
|
151 |
+
"wget -q -O /data/shape.ckpt https://www.dropbox.com/scl/fi/hv3w9z59dqytievwviko4/shape.ckpt?rlkey=a2gut89kavrldmnt8b3df92oi&dl=0"
|
152 |
)
|
153 |
)
|
154 |
|