Refresh model card and examples
This commit is contained in:
@@ -881,7 +881,7 @@ def save_checkpoint(path: Path, model: nn.Module, optim, cfg: MicroFastSpeechCon
|
||||
def train(args: argparse.Namespace) -> None:
|
||||
device = torch.device(args.device)
|
||||
rows = load_rows(args.durations_jsonl, args.max_rows)
|
||||
speakers = {voice: idx for idx, voice in enumerate(sorted({str(r.get("voice_id") or "qwen3_mark") for r in rows}))}
|
||||
speakers = {voice: idx for idx, voice in enumerate(sorted({str(r.get("voice_id") or "mark") for r in rows}))}
|
||||
max_phone_id = max(max(map(int, r["phone_ids"])) for r in rows)
|
||||
max_tone_id = max(max(map(int, r["tone_ids"])) for r in rows)
|
||||
max_lang_id = max(max(map(int, r["lang_ids"])) for r in rows)
|
||||
@@ -901,7 +901,7 @@ def train(args: argparse.Namespace) -> None:
|
||||
use_group_duration_planner=args.group_duration_planner,
|
||||
)
|
||||
for row in rows:
|
||||
row["speaker_id"] = speakers[str(row.get("voice_id") or "qwen3_mark")]
|
||||
row["speaker_id"] = speakers[str(row.get("voice_id") or "mark")]
|
||||
random.Random(args.seed).shuffle(rows)
|
||||
|
||||
model = MicroFastSpeech(cfg).to(device)
|
||||
@@ -981,7 +981,7 @@ def train(args: argparse.Namespace) -> None:
|
||||
predicted_prosody_delta_loss = torch.zeros((), device=device)
|
||||
if args.predicted_prosody_mel_weight > 0.0 or args.predicted_prosody_delta_weight > 0.0:
|
||||
# Train the predictor heads against the acoustic result they produce at
|
||||
# inference, while retaining teacher durations so this path remains
|
||||
# inference, while retaining reference durations so this path remains
|
||||
# differentiable and isolates prosody exposure bias.
|
||||
predicted_conditioning = model(phone, tone, lang, speaker, durations)
|
||||
if args.predicted_prosody_mel_weight > 0.0:
|
||||
|
||||
Reference in New Issue
Block a user