Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import spaces
|
|
8 |
def inference(audio_file, model_name, guidance_scale, ddim_steps, seed):
|
9 |
audiosr = build_model(model_name=model_name)
|
10 |
|
11 |
-
if torch.cuda.
|
12 |
torch.cuda.empty_cache() # empty cuda cache
|
13 |
|
14 |
gc.collect()
|
|
|
8 |
def inference(audio_file, model_name, guidance_scale, ddim_steps, seed):
|
9 |
audiosr = build_model(model_name=model_name)
|
10 |
|
11 |
+
if torch.cuda.is_available():
|
12 |
torch.cuda.empty_cache() # empty cuda cache
|
13 |
|
14 |
gc.collect()
|