Refresh model card and examples

This commit is contained in:
Owen Song
2026-06-16 19:50:26 +00:00
committed by system
parent eba693f919
commit da503eb446
37 changed files with 113 additions and 159 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ def load_acoustic(path: Path, device: torch.device) -> tuple[MicroFastSpeech, di
model.load_state_dict(ckpt["model"])
model.eval()
params = int(ckpt.get("params") or sum(p.numel() for p in model.parameters()))
return model, ckpt.get("speakers") or {"qwen3_mark": 0}, params
return model, ckpt.get("speakers") or {"mark": 0}, params
def load_vocoder(path: Path, device: torch.device) -> tuple[HifiGanGenerator, int]:
@@ -91,7 +91,7 @@ def synthesize(
phone = phone.unsqueeze(0).to(device)
tone = tone.unsqueeze(0).to(device)
lang = lang.unsqueeze(0).to(device)
speaker = torch.LongTensor([int(speakers.get("qwen3_mark", 0))]).to(device)
speaker = torch.LongTensor([int(speakers.get("mark", next(iter(speakers.values()), 0)))]).to(device)
mel = acoustic.infer(
phone,
tone,