Spaces:
Paused
Paused
Updating to fp16
Browse files
main.py
CHANGED
|
@@ -30,7 +30,9 @@ tts_model = ChatterboxMultilingualTTS.from_pretrained(device=device_map)
|
|
| 30 |
# Optimize for T4 GPU using half-precision (FP16)
|
| 31 |
# FP16 provides a significant speed boost with negligible quality loss
|
| 32 |
if device_map == "cuda":
|
| 33 |
-
tts_model.to(torch.float16)
|
|
|
|
|
|
|
| 34 |
|
| 35 |
print("Model loaded.")
|
| 36 |
|
|
|
|
| 30 |
# Optimize for T4 GPU using half-precision (FP16)
|
| 31 |
# FP16 provides a significant speed boost with negligible quality loss
|
| 32 |
if device_map == "cuda":
|
| 33 |
+
tts_model.t3.to(torch.float16)
|
| 34 |
+
tts_model.s3gen.to(torch.float16)
|
| 35 |
+
tts_model.ve.to(torch.float16)
|
| 36 |
|
| 37 |
print("Model loaded.")
|
| 38 |
|