Add sample_start_step setting to configure when sampling starts (#949)

Co-authored-by: Jaret Burkett <jaretburkett@gmail.com>
This commit is contained in:
fatalis
2026-07-15 12:15:50 -05:00
committed by GitHub
parent 4ece17b71f
commit 8bbd051667
31 changed files with 46 additions and 2 deletions

View File

@@ -2371,7 +2371,11 @@ class BaseSDTrainProcess(BaseTrainProcess):
# todo improve this logic to send one of each through if we can buckets and batch size might be an issue
is_reg_step = False
is_save_step = self.save_config.save_every and self.step_num % self.save_config.save_every == 0
is_sample_step = self.sample_config.sample_every and self.step_num % self.sample_config.sample_every == 0
is_sample_step = (
self.sample_config.sample_every
and self.step_num >= self.sample_config.sample_start_step
and self.step_num % self.sample_config.sample_every == 0
)
if self.train_config.disable_sampling:
is_sample_step = False