Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,6 @@ from audiosr import super_resolution, build_model
|
|
4 |
import torch
|
5 |
import gc # free up memory
|
6 |
|
7 |
-
torch.cuda.set_per_process_memory_fraction(0.95, 0) # This reserves 95% of GPU memory for this process
|
8 |
-
torch.backends.cuda.matmul.allow_tf32 = True # Optional: Enable TensorFloat-32 mode for efficient memory usage
|
9 |
-
torch.cuda.set_max_split_size_mb(64) # Adjust 64 MB to suit your needs based on experimentation
|
10 |
|
11 |
# @spaces.GPU(duration=180)
|
12 |
def inference(audio_file, model_name, guidance_scale, ddim_steps, seed):
|
@@ -51,4 +48,4 @@ iface = gr.Interface(
|
|
51 |
description="Audio Super Resolution with AudioSR"
|
52 |
)
|
53 |
|
54 |
-
iface.launch(share=False)
|
|
|
4 |
import torch
|
5 |
import gc # free up memory
|
6 |
|
|
|
|
|
|
|
7 |
|
8 |
# @spaces.GPU(duration=180)
|
9 |
def inference(audio_file, model_name, guidance_scale, ddim_steps, seed):
|
|
|
48 |
description="Audio Super Resolution with AudioSR"
|
49 |
)
|
50 |
|
51 |
+
iface.launch(share=False)
|