Add before_process_batch script callback

This commit is contained in:
space-nuko
2023-02-22 01:52:53 -08:00
parent 0cc0ee1bcb
commit a2d635ad13
2 changed files with 26 additions and 0 deletions

View File

@@ -597,6 +597,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
seeds = p.all_seeds[n * p.batch_size:(n + 1) * p.batch_size]
subseeds = p.all_subseeds[n * p.batch_size:(n + 1) * p.batch_size]
if p.scripts is not None:
p.scripts.before_process_batch(p, batch_number=n, prompts=prompts, seeds=seeds, subseeds=subseeds)
if len(prompts) == 0:
break