mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 22:35:09 +00:00
Move progress bar to account for sampling image first
This commit is contained in:
@@ -1163,10 +1163,6 @@ class NetworkTrainer:
|
|||||||
args.max_train_steps > initial_step
|
args.max_train_steps > initial_step
|
||||||
), f"max_train_steps should be greater than initial step / max_train_stepsは初期ステップより大きい必要があります: {args.max_train_steps} vs {initial_step}"
|
), f"max_train_steps should be greater than initial step / max_train_stepsは初期ステップより大きい必要があります: {args.max_train_steps} vs {initial_step}"
|
||||||
|
|
||||||
progress_bar = tqdm(
|
|
||||||
range(args.max_train_steps - initial_step), smoothing=0, disable=not accelerator.is_local_main_process, desc="steps"
|
|
||||||
)
|
|
||||||
|
|
||||||
epoch_to_start = 0
|
epoch_to_start = 0
|
||||||
if initial_step > 0:
|
if initial_step > 0:
|
||||||
if args.skip_until_initial_step:
|
if args.skip_until_initial_step:
|
||||||
@@ -1271,6 +1267,10 @@ class NetworkTrainer:
|
|||||||
|
|
||||||
clean_memory_on_device(accelerator.device)
|
clean_memory_on_device(accelerator.device)
|
||||||
|
|
||||||
|
progress_bar = tqdm(
|
||||||
|
range(args.max_train_steps - initial_step), smoothing=0, disable=not accelerator.is_local_main_process, desc="steps"
|
||||||
|
)
|
||||||
|
|
||||||
for epoch in range(epoch_to_start, num_train_epochs):
|
for epoch in range(epoch_to_start, num_train_epochs):
|
||||||
accelerator.print(f"\nepoch {epoch+1}/{num_train_epochs}\n")
|
accelerator.print(f"\nepoch {epoch+1}/{num_train_epochs}\n")
|
||||||
current_epoch.value = epoch + 1
|
current_epoch.value = epoch + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user