Spaces:
Runtime error
Runtime error
Update demo_gradio.py
Browse files- demo_gradio.py +1 -2
demo_gradio.py
CHANGED
|
@@ -43,11 +43,10 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
| 43 |
# stx()
|
| 44 |
|
| 45 |
model = model.to(device)
|
| 46 |
-
|
| 47 |
|
| 48 |
img_multiple_of = 8
|
| 49 |
|
| 50 |
-
|
| 51 |
with torch.inference_mode():
|
| 52 |
if torch.cuda.is_available():
|
| 53 |
torch.cuda.ipc_collect()
|
|
|
|
| 43 |
# stx()
|
| 44 |
|
| 45 |
model = model.to(device)
|
| 46 |
+
model.eval()
|
| 47 |
|
| 48 |
img_multiple_of = 8
|
| 49 |
|
|
|
|
| 50 |
with torch.inference_mode():
|
| 51 |
if torch.cuda.is_available():
|
| 52 |
torch.cuda.ipc_collect()
|