aboutsummaryrefslogtreecommitdiff
path: root/modules/textual_inversion/preprocess.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-01-11 19:04:54 +0300
committerGitHub <noreply@github.com>2023-01-11 19:04:54 +0300
commit6d7f3d107263ed4e767bd2a50cce82f125d4ddbf (patch)
tree5a511db80b026a6399486c8e338ef797232929bc /modules/textual_inversion/preprocess.py
parent97ff69eff338c6641f4abf430bf5ac112c1775e0 (diff)
parent3f43d8a966ba8462ba019a5ad573f94508cd45f8 (diff)
Merge pull request #6648 from vladmandic/progress-description
Set TQDM progress bar and state textinfo description
Diffstat (limited to 'modules/textual_inversion/preprocess.py')
-rw-r--r--modules/textual_inversion/preprocess.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/textual_inversion/preprocess.py b/modules/textual_inversion/preprocess.py
index feb876c6..3c1042ad 100644
--- a/modules/textual_inversion/preprocess.py
+++ b/modules/textual_inversion/preprocess.py
@@ -135,7 +135,8 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre
params.process_caption_deepbooru = process_caption_deepbooru
params.preprocess_txt_action = preprocess_txt_action
- for index, imagefile in enumerate(tqdm.tqdm(files)):
+ pbar = tqdm.tqdm(files)
+ for index, imagefile in enumerate(pbar):
params.subindex = 0
filename = os.path.join(src, imagefile)
try:
@@ -143,6 +144,10 @@ def preprocess_work(process_src, process_dst, process_width, process_height, pre
except Exception:
continue
+ description = f"Preprocessing [Image {index}/{len(files)}]"
+ pbar.set_description(description)
+ shared.state.textinfo = description
+
params.src = filename
existing_caption = None