aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-17 12:39:30 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-17 12:39:30 +0000
commit77dcb21688a121e4b9f93cd614546daad90f5a6c (patch)
tree272dd43fc3c71e7281d1879035caab60331a709f /modules
parent2f18823e69ec1dd7622f652561e197a576dc3b80 (diff)
parentd94b41472e0e799ab0059fd711f52f1fba954be6 (diff)
downloadstable-diffusion-webui-gfx803-77dcb21688a121e4b9f93cd614546daad90f5a6c.tar.gz
stable-diffusion-webui-gfx803-77dcb21688a121e4b9f93cd614546daad90f5a6c.tar.bz2
stable-diffusion-webui-gfx803-77dcb21688a121e4b9f93cd614546daad90f5a6c.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'modules')
-rw-r--r--modules/extras.py5
-rw-r--r--modules/processing.py9
2 files changed, 11 insertions, 3 deletions
diff --git a/modules/extras.py b/modules/extras.py
index 38d6ec48..3d9d9f7a 100644
--- a/modules/extras.py
+++ b/modules/extras.py
@@ -111,8 +111,9 @@ def run_pnginfo(image):
items['exif comment'] = exif_comment
- for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif']:
- del items[field]
+ for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif',
+ 'loop', 'background', 'timestamp', 'duration']:
+ items.pop(field, None)
info = ''
diff --git a/modules/processing.py b/modules/processing.py
index 3a4ff224..6a99d383 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -188,7 +188,11 @@ def fix_seed(p):
def process_images(p: StableDiffusionProcessing) -> Processed:
"""this is the main loop that both txt2img and img2img use; it calls func_init once inside all the scopes and func_sample once per batch"""
- assert p.prompt is not None
+ if type(p.prompt) == list:
+ assert(len(p.prompt) > 0)
+ else:
+ assert p.prompt is not None
+
devices.torch_gc()
fix_seed(p)
@@ -265,6 +269,9 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
seeds = all_seeds[n * p.batch_size:(n + 1) * p.batch_size]
subseeds = all_subseeds[n * p.batch_size:(n + 1) * p.batch_size]
+ if (len(prompts) == 0):
+ break
+
#uc = p.sd_model.get_learned_conditioning(len(prompts) * [p.negative_prompt])
#c = p.sd_model.get_learned_conditioning(prompts)
uc = prompt_parser.get_learned_conditioning(len(prompts) * [p.negative_prompt], p.steps)