Merge pull request #907 from shirayu/add_option_sample_at_first

Add option --sample_at_first
This commit is contained in:
Kohya S
2023-12-03 21:00:32 +09:00
committed by GitHub
8 changed files with 66 additions and 7 deletions

View File

@@ -466,6 +466,19 @@ def train(args):
accelerator.print(f"\nepoch {epoch+1}/{num_train_epochs}")
current_epoch.value = epoch + 1
# For --sample_at_first
sdxl_train_util.sample_images(
accelerator,
args,
epoch,
global_step,
accelerator.device,
vae,
[tokenizer1, tokenizer2],
[text_encoder1, text_encoder2],
unet,
)
for m in training_models:
m.train()