Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
82970d1
1
Parent(s):
e2bc640
feat: improve timings
Browse files
app.py
CHANGED
|
@@ -496,10 +496,10 @@ def predict(
|
|
| 496 |
# only move if needed
|
| 497 |
if current != device:
|
| 498 |
pipe.model.to(device)
|
| 499 |
-
|
| 500 |
|
| 501 |
pipe.model.eval()
|
| 502 |
-
|
| 503 |
tprint("model ready to run inference")
|
| 504 |
|
| 505 |
# run inference
|
|
|
|
| 496 |
# only move if needed
|
| 497 |
if current != device:
|
| 498 |
pipe.model.to(device)
|
| 499 |
+
tprint(f"model moved to {device}")
|
| 500 |
|
| 501 |
pipe.model.eval()
|
| 502 |
+
tprint(f"Running on {next(pipe.model.parameters()).device}")
|
| 503 |
tprint("model ready to run inference")
|
| 504 |
|
| 505 |
# run inference
|