Silence expected inference-only checkpoint load diagnostics
Browse files- inference.py +8 -1
- release_manifest.json +2 -2
inference.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
from __future__ import annotations
|
| 2 |
|
| 3 |
import argparse
|
|
|
|
| 4 |
import re
|
| 5 |
import sys
|
| 6 |
from pathlib import Path
|
|
@@ -83,7 +84,13 @@ class InflectTTS:
|
|
| 83 |
self.hps.train.segment_size // self.hps.data.hop_length,
|
| 84 |
**self.hps.model,
|
| 85 |
).to(self.device).eval()
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
self.sample_rate = int(self.hps.data.sampling_rate)
|
| 88 |
|
| 89 |
def _tokens(self, text: str) -> tuple[torch.Tensor, torch.Tensor]:
|
|
|
|
| 1 |
from __future__ import annotations
|
| 2 |
|
| 3 |
import argparse
|
| 4 |
+
import logging
|
| 5 |
import re
|
| 6 |
import sys
|
| 7 |
from pathlib import Path
|
|
|
|
| 84 |
self.hps.train.segment_size // self.hps.data.hop_length,
|
| 85 |
**self.hps.model,
|
| 86 |
).to(self.device).eval()
|
| 87 |
+
root_logger = logging.getLogger()
|
| 88 |
+
previous_level = root_logger.level
|
| 89 |
+
try:
|
| 90 |
+
root_logger.setLevel(logging.WARNING)
|
| 91 |
+
utils.load_checkpoint(str(self.root / "model.pth"), self.model, None)
|
| 92 |
+
finally:
|
| 93 |
+
root_logger.setLevel(previous_level)
|
| 94 |
self.sample_rate = int(self.hps.data.sampling_rate)
|
| 95 |
|
| 96 |
def _tokens(self, text: str) -> tuple[torch.Tensor, torch.Tensor]:
|
release_manifest.json
CHANGED
|
@@ -27,8 +27,8 @@
|
|
| 27 |
},
|
| 28 |
{
|
| 29 |
"path": "inference.py",
|
| 30 |
-
"bytes":
|
| 31 |
-
"sha256": "
|
| 32 |
},
|
| 33 |
{
|
| 34 |
"path": "inflect_nano_v2_frontend.py",
|
|
|
|
| 27 |
},
|
| 28 |
{
|
| 29 |
"path": "inference.py",
|
| 30 |
+
"bytes": 6252,
|
| 31 |
+
"sha256": "11f45c95cd1eb9eaa1814b464fcf290a8bc1a93158743fa2ac01dc4b0181c0a1"
|
| 32 |
},
|
| 33 |
{
|
| 34 |
"path": "inflect_nano_v2_frontend.py",
|