Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
d23f500
1
Parent(s):
19368fa
extend zerogpu maximum time to 100 seconds
Browse files
app.py
CHANGED
|
@@ -264,11 +264,11 @@ def _build_model(cfg):
|
|
| 264 |
def launch_pretrained():
|
| 265 |
from huggingface_hub import snapshot_download, hf_hub_download
|
| 266 |
hf_hub_download(repo_id="DyrusQZ/LHM_Runtime", repo_type='model', filename='assets.tar', local_dir="./")
|
| 267 |
-
os.system("tar -
|
| 268 |
hf_hub_download(repo_id="DyrusQZ/LHM_Runtime", repo_type='model', filename='LHM-0.5B.tar', local_dir="./")
|
| 269 |
-
os.system("tar -
|
| 270 |
hf_hub_download(repo_id="DyrusQZ/LHM_Runtime", repo_type='model', filename='LHM_prior_model.tar', local_dir="./")
|
| 271 |
-
os.system("tar -
|
| 272 |
|
| 273 |
def launch_env_not_compile_with_cuda():
|
| 274 |
os.system("pip install chumpy")
|
|
@@ -361,7 +361,7 @@ def get_image_base64(path):
|
|
| 361 |
|
| 362 |
def demo_lhm(pose_estimator, face_detector, lhm, cfg):
|
| 363 |
|
| 364 |
-
@spaces.GPU(duration=
|
| 365 |
def core_fn(image: str, video_params, working_dir):
|
| 366 |
image_raw = os.path.join(working_dir.name, "raw.png")
|
| 367 |
with Image.fromarray(image) as img:
|
|
|
|
| 264 |
def launch_pretrained():
|
| 265 |
from huggingface_hub import snapshot_download, hf_hub_download
|
| 266 |
hf_hub_download(repo_id="DyrusQZ/LHM_Runtime", repo_type='model', filename='assets.tar', local_dir="./")
|
| 267 |
+
os.system("tar -xf assets.tar && rm assets.tar")
|
| 268 |
hf_hub_download(repo_id="DyrusQZ/LHM_Runtime", repo_type='model', filename='LHM-0.5B.tar', local_dir="./")
|
| 269 |
+
os.system("tar -xf LHM-0.5B.tar && rm LHM-0.5B.tar")
|
| 270 |
hf_hub_download(repo_id="DyrusQZ/LHM_Runtime", repo_type='model', filename='LHM_prior_model.tar', local_dir="./")
|
| 271 |
+
os.system("tar -xf LHM_prior_model.tar && rm LHM_prior_model.tar")
|
| 272 |
|
| 273 |
def launch_env_not_compile_with_cuda():
|
| 274 |
os.system("pip install chumpy")
|
|
|
|
| 361 |
|
| 362 |
def demo_lhm(pose_estimator, face_detector, lhm, cfg):
|
| 363 |
|
| 364 |
+
@spaces.GPU(duration=100)
|
| 365 |
def core_fn(image: str, video_params, working_dir):
|
| 366 |
image_raw = os.path.join(working_dir.name, "raw.png")
|
| 367 |
with Image.fromarray(image) as img:
|