Skip to content

Commit 4c323d5

Browse files
committed
0.5.0 fix grad_accum bug from 0.4.0, SWivid#715 SWivid#728
1 parent 6f26d07 commit 4c323d5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "f5-tts"
7-
version = "0.4.6"
7+
version = "0.5.0"
88
description = "F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching"
99
readme = "README.md"
1010
license = {text = "MIT License"}

src/f5_tts/model/trainer.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ def train(self, train_dataset: Dataset, num_workers=16, resumable_with_seed: int
360360
self.scheduler.step()
361361
self.optimizer.zero_grad()
362362

363-
if self.is_main and self.accelerator.sync_gradients:
364-
self.ema_model.update()
363+
if self.accelerator.sync_gradients:
364+
if self.is_main:
365+
self.ema_model.update()
365366

366367
global_update += 1
367368
progress_bar.update(1)

0 commit comments

Comments
 (0)