From 6e30e5726b4404d9bfca16046350377898f6fd5d Mon Sep 17 00:00:00 2001 From: DKnight54 <126916963+DKnight54@users.noreply.github.com> Date: Sat, 8 Feb 2025 12:51:18 +0800 Subject: [PATCH] Update accel_sdxl_gen_img.py --- accel_sdxl_gen_img.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/accel_sdxl_gen_img.py b/accel_sdxl_gen_img.py index 459ff496..e2fe2eda 100644 --- a/accel_sdxl_gen_img.py +++ b/accel_sdxl_gen_img.py @@ -2928,15 +2928,16 @@ def main(args): distributed_state.wait_for_everyone() # ext_separated_list_of_batches = gather_object(ext_separated_list_of_batches) del extinfo - + logger.info(f"\nDevice {distributed_state.device}: {ext_separated_list_of_batches}") if len(ext_separated_list_of_batches) > 0: for batch_list in ext_separated_list_of_batches: with torch.no_grad(): with distributed_state.split_between_processes(batch_list) as batches: for j in range(len(batches)): - logger.info(f"\nLoading batch {j+1}/{len(batches)} of {len(batches[j])} prompts onto device {distributed_state.local_process_index}:\nbatch_list:") + batchlogstr=f"\nLoading batch {j+1}/{len(batches)} of {len(batches[j])} prompts onto device {distributed_state.local_process_index}:\nbatch_list:" for i in range(len(batches[j])): - logger.info(f"Image: {batches[j][i].global_count}\nDevice {distributed_state.device}: Prompt {i+1}: {batches[j][i].base.prompt}\nNegative Prompt: {batches[j][i].base.negative_prompt}\nSeed: {batches[j][i].base.seed}") + batchlogstr += f"\nImage: {batches[j][i].global_count}\nDevice {distributed_state.device}: Prompt {i+1}: {batches[j][i].base.prompt}\nNegative Prompt: {batches[j][i].base.negative_prompt}\nSeed: {batches[j][i].base.seed}" + logger.info(batchlogstr) prev_image = process_batch(batch_list[j], distributed_state, highres_fix)[0] distributed_state.wait_for_everyone()