aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-13 09:41:38 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-09-13 09:41:38 +0300
commitafbb3504daf2f956bc532b5fd40c7e0066b2fa8a (patch)
tree60457ba376ae03e221b56944ecda9e7b767a2656
parent9ea44c7ce71260e0ab9f81c7382f1be85a2fe6c5 (diff)
Prompts from file not working #379
-rw-r--r--scripts/prompts_from_file.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/prompts_from_file.py b/scripts/prompts_from_file.py
index da2ddd54..e0c7f1d2 100644
--- a/scripts/prompts_from_file.py
+++ b/scripts/prompts_from_file.py
@@ -25,17 +25,16 @@ class Script(scripts.Script):
lines = [x for x in lines if len(x) > 0]
batch_count = math.ceil(len(lines) / p.batch_size)
- print(f"Will process {len(lines)} images in {batch_count} batches.")
+ print(f"Will process {len(lines) * p.n_iter} images in {batch_count * p.n_iter} batches.")
- p.batch_count = 1
p.do_not_save_grid = True
state.job_count = batch_count
images = []
for batch_no in range(batch_count):
- state.job = f"{batch_no} out of {batch_count}"
- p.prompt = lines[batch_no*p.batch_size:(batch_no+1)*p.batch_size]
+ state.job = f"{batch_no} out of {batch_count * p.n_iter}"
+ p.prompt = lines[batch_no*p.batch_size:(batch_no+1)*p.batch_size] * p.n_iter
proc = process_images(p)
images += proc.images