Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@

from resemble_enhance.enhancer.inference import denoise, enhance

# Device configuration with optimizations for modern GPUs
if torch.cuda.is_available():
device = "cuda"
# Enable TF32 for Ampere and newer GPUs (3x speedup)
# Compatible with PyTorch 2.1+ using new API when available
if hasattr(torch.backends.cuda.matmul, 'fp32_precision'):
torch.backends.cuda.matmul.fp32_precision = 'tf32'
torch.backends.cudnn.conv.fp32_precision = 'tf32'
else:
torch.backends.cuda.matmul.allow_tf32 = True
torch.backends.cudnn.allow_tf32 = True
# Enable cuDNN autotuner
torch.backends.cudnn.benchmark = True
else:
device = "cpu"

Expand Down
11 changes: 6 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
celluloid>=0.2.0
deepspeed>=0.12.4
deepspeed>=0.14.0
librosa>=0.10.1
matplotlib>=3.8.1
numpy>=1.26.2
numpy>=1.26.2,<2.0.0
omegaconf>=2.3.0
pandas>=2.1.3
ptflops>=0.7.1.2
rich>=13.7.0
scipy>=1.11.4
soundfile>=0.12.1
torch>=2.1.1
torchaudio>=2.1.1
torchvision>=0.16.1
torch>=2.1.0
torchaudio>=2.1.0
torchvision>=0.16.0
torchcodec>=0.1.0
tqdm>=4.66.1
resampy>=0.4.2
tabulate>=0.8.10
Expand Down