Spaces:
Running
on
Zero
Running
on
Zero
lemonaddie
commited on
Commit
•
cfc0ae6
1
Parent(s):
eaed46e
Update app.py
Browse files
app.py
CHANGED
@@ -500,11 +500,11 @@ def main():
|
|
500 |
|
501 |
repo = git.Repo.clone_from(REPO_URL, REPO_DIR)
|
502 |
sys.path.append(os.path.join(os.getcwd(), REPO_DIR))
|
503 |
-
|
|
|
504 |
from pipeline.depth_normal_pipeline_clip_cfg import DepthNormalEstimationPipeline
|
505 |
|
506 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
507 |
-
a = torch.zeros((1), device=device)
|
508 |
pipe = DepthNormalEstimationPipeline.from_pretrained(CHECKPOINT)
|
509 |
|
510 |
try:
|
@@ -514,6 +514,8 @@ def main():
|
|
514 |
pass # run without xformers
|
515 |
|
516 |
pipe = pipe.to(device)
|
|
|
|
|
517 |
run_demo_server(pipe)
|
518 |
|
519 |
|
|
|
500 |
|
501 |
repo = git.Repo.clone_from(REPO_URL, REPO_DIR)
|
502 |
sys.path.append(os.path.join(os.getcwd(), REPO_DIR))
|
503 |
+
|
504 |
+
+import spaces
|
505 |
from pipeline.depth_normal_pipeline_clip_cfg import DepthNormalEstimationPipeline
|
506 |
|
507 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
508 |
pipe = DepthNormalEstimationPipeline.from_pretrained(CHECKPOINT)
|
509 |
|
510 |
try:
|
|
|
514 |
pass # run without xformers
|
515 |
|
516 |
pipe = pipe.to(device)
|
517 |
+
|
518 |
+
+@spaces.GPU
|
519 |
run_demo_server(pipe)
|
520 |
|
521 |
|