Spaces:
Sleeping
Sleeping
Staticaliza
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,7 @@ campplus_model.to(device)
|
|
90 |
print("[INFO] | CAMPPlus model loaded, set to eval mode, and moved to CPU.")
|
91 |
|
92 |
# Load BigVGAN model
|
93 |
-
bigvgan_model = bigvgan.BigVGAN.from_pretrained('nvidia/
|
94 |
bigvgan_model.remove_weight_norm()
|
95 |
bigvgan_model = bigvgan_model.eval().to(device)
|
96 |
print("[INFO] | BigVGAN model loaded, weight norm removed, set to eval mode, and moved to CPU.")
|
@@ -107,7 +107,7 @@ codec_encoder = {k: v.eval().to(device) for k, v in codec_encoder.items()}
|
|
107 |
print("[INFO] | FAcodec model loaded, set to eval mode, and moved to CPU.")
|
108 |
|
109 |
# Load Whisper model with float32 and compatible size
|
110 |
-
whisper_name = model_params.speech_tokenizer.whisper_name if hasattr(model_params.speech_tokenizer, 'whisper_name') else "
|
111 |
whisper_model = WhisperModel.from_pretrained(whisper_name, torch_dtype=torch.float32).to(device)
|
112 |
del whisper_model.decoder # Remove decoder as it's not used
|
113 |
whisper_feature_extractor = AutoFeatureExtractor.from_pretrained(whisper_name)
|
|
|
90 |
print("[INFO] | CAMPPlus model loaded, set to eval mode, and moved to CPU.")
|
91 |
|
92 |
# Load BigVGAN model
|
93 |
+
bigvgan_model = bigvgan.BigVGAN.from_pretrained('nvidia/bigvgan_v2_22khz_80band_256x', use_cuda_kernel=False)
|
94 |
bigvgan_model.remove_weight_norm()
|
95 |
bigvgan_model = bigvgan_model.eval().to(device)
|
96 |
print("[INFO] | BigVGAN model loaded, weight norm removed, set to eval mode, and moved to CPU.")
|
|
|
107 |
print("[INFO] | FAcodec model loaded, set to eval mode, and moved to CPU.")
|
108 |
|
109 |
# Load Whisper model with float32 and compatible size
|
110 |
+
whisper_name = model_params.speech_tokenizer.whisper_name if hasattr(model_params.speech_tokenizer, 'whisper_name') else "biodatlab/distill-whisper-th-small"
|
111 |
whisper_model = WhisperModel.from_pretrained(whisper_name, torch_dtype=torch.float32).to(device)
|
112 |
del whisper_model.decoder # Remove decoder as it's not used
|
113 |
whisper_feature_extractor = AutoFeatureExtractor.from_pretrained(whisper_name)
|