Spaces:
Running
on
Zero
Running
on
Zero
Update chatterbox/tts_turbo.py
Browse files- chatterbox/tts_turbo.py +9 -0
chatterbox/tts_turbo.py
CHANGED
|
@@ -182,6 +182,15 @@ class ChatterboxTurboTTS:
|
|
| 182 |
|
| 183 |
return cls(t3, s3gen, ve, tokenizer, device, conds=conds)
|
| 184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
@classmethod
|
| 186 |
def from_pretrained(cls, device) -> 'ChatterboxTurboTTS':
|
| 187 |
# Check if MPS is available on macOS
|
|
|
|
| 182 |
|
| 183 |
return cls(t3, s3gen, ve, tokenizer, device, conds=conds)
|
| 184 |
|
| 185 |
+
def to(self, device):
|
| 186 |
+
self.device = device
|
| 187 |
+
self.t3 = self.t3.to(device)
|
| 188 |
+
self.s3gen = self.s3gen.to(device)
|
| 189 |
+
self.ve = self.ve.to(device)
|
| 190 |
+
if self.conds is not None:
|
| 191 |
+
self.conds = self.conds.to(device)
|
| 192 |
+
return self
|
| 193 |
+
|
| 194 |
@classmethod
|
| 195 |
def from_pretrained(cls, device) -> 'ChatterboxTurboTTS':
|
| 196 |
# Check if MPS is available on macOS
|