Spaces:
Build error
Build error
Update inference.py
Browse files- inference.py +7 -2
inference.py
CHANGED
|
@@ -293,8 +293,13 @@ class StyleTTS2(torch.nn.Module):
|
|
| 293 |
|
| 294 |
tokens = [0] + tokens + [0]
|
| 295 |
tokens = torch.LongTensor(tokens).unsqueeze(0).to(device)
|
| 296 |
-
|
| 297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
|
| 299 |
with torch.no_grad():
|
| 300 |
input_lengths = torch.LongTensor([tokens.shape[-1]]).to(device)
|
|
|
|
| 293 |
|
| 294 |
tokens = [0] + tokens + [0]
|
| 295 |
tokens = torch.LongTensor(tokens).unsqueeze(0).to(device)
|
| 296 |
+
|
| 297 |
+
print("\n========== TOKEN DEBUG ==========")
|
| 298 |
+
print("Max token id:", text_tensor.max().item())
|
| 299 |
+
print("Min token id:", text_tensor.min().item())
|
| 300 |
+
print("First 50 tokens:", text_tensor[0][:50].tolist())
|
| 301 |
+
print("=================================\n")
|
| 302 |
+
|
| 303 |
|
| 304 |
with torch.no_grad():
|
| 305 |
input_lengths = torch.LongTensor([tokens.shape[-1]]).to(device)
|