aboutsummaryrefslogtreecommitdiff
path: root/modules/processing.py
diff options
context:
space:
mode:
authorljleb <set>2023-07-24 15:38:52 -0400
committerljleb <set>2023-07-24 15:38:52 -0400
commit6b68b590321fcac2ad6d71c5aee1ac02687328d7 (patch)
treedfa281a85ca0bcf7bba03d389f7e6eb480ab7d86 /modules/processing.py
parentca45ff1ae6fdd5c2dcd754fde95dd29f49bd414b (diff)
use local vars
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/processing.py b/modules/processing.py
index c16404f4..7043477f 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -722,20 +722,20 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
all_subseeds = p.all_subseeds[:]
# apply changes to generation data
- all_prompts[n * p.batch_size:(n + 1) * p.batch_size] = p.prompts
- all_seeds[n * p.batch_size:(n + 1) * p.batch_size] = p.seeds
- all_subseeds[n * p.batch_size:(n + 1) * p.batch_size] = p.subseeds
+ all_prompts[iteration * p.batch_size:(iteration + 1) * p.batch_size] = p.prompts
+ all_seeds[iteration * p.batch_size:(iteration + 1) * p.batch_size] = p.seeds
+ all_subseeds[iteration * p.batch_size:(iteration + 1) * p.batch_size] = p.subseeds
# update p.all_negative_prompts in case extensions changed the size of the batch
# create_infotext below uses it
- old_negative_prompts = p.all_negative_prompts[n * p.batch_size:(n + 1) * p.batch_size]
- p.all_negative_prompts[n * p.batch_size:(n + 1) * p.batch_size] = p.negative_prompts
+ old_negative_prompts = p.all_negative_prompts[iteration * p.batch_size:(iteration + 1) * p.batch_size]
+ p.all_negative_prompts[iteration * p.batch_size:(iteration + 1) * p.batch_size] = p.negative_prompts
try:
return create_infotext(p, all_prompts, all_seeds, all_subseeds, comments, iteration, position_in_batch, use_main_prompt)
finally:
# restore p.all_negative_prompts in case extensions changed the size of the batch
- p.all_negative_prompts[n * p.batch_size:n * p.batch_size + len(p.negative_prompts)] = old_negative_prompts
+ p.all_negative_prompts[iteration * p.batch_size:iteration * p.batch_size + len(p.negative_prompts)] = old_negative_prompts
if os.path.exists(cmd_opts.embeddings_dir) and not p.do_not_reload_embeddings:
model_hijack.embedding_db.load_textual_inversion_embeddings()