Spaces:
Running
on
Zero
Running
on
Zero
empty cache
Browse files
app.py
CHANGED
@@ -267,7 +267,10 @@ def ncut_run(
|
|
267 |
|
268 |
def _ncut_run(*args, **kwargs):
|
269 |
try:
|
270 |
-
|
|
|
|
|
|
|
271 |
except Exception as e:
|
272 |
gr.Error(str(e))
|
273 |
return [], "Error: " + str(e)
|
|
|
267 |
|
268 |
def _ncut_run(*args, **kwargs):
|
269 |
try:
|
270 |
+
ret = ncut_run(*args, **kwargs)
|
271 |
+
if torch.cuda.is_available():
|
272 |
+
torch.cuda.empty_cache()
|
273 |
+
return ret
|
274 |
except Exception as e:
|
275 |
gr.Error(str(e))
|
276 |
return [], "Error: " + str(e)
|