diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-13 06:41:38 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-13 06:41:38 +0000 |
commit | afbb3504daf2f956bc532b5fd40c7e0066b2fa8a (patch) | |
tree | 60457ba376ae03e221b56944ecda9e7b767a2656 | |
parent | 9ea44c7ce71260e0ab9f81c7382f1be85a2fe6c5 (diff) | |
download | stable-diffusion-webui-gfx803-afbb3504daf2f956bc532b5fd40c7e0066b2fa8a.tar.gz stable-diffusion-webui-gfx803-afbb3504daf2f956bc532b5fd40c7e0066b2fa8a.tar.bz2 stable-diffusion-webui-gfx803-afbb3504daf2f956bc532b5fd40c7e0066b2fa8a.zip |
Prompts from file not working #379
-rw-r--r-- | scripts/prompts_from_file.py | 7 |
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
|