aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-11-19 09:52:55 +0000
committerGitHub <noreply@github.com>2022-11-19 09:52:55 +0000
commite35d8b493ffc52459e38d45eb9c4e74fc4453841 (patch)
tree3c55d27f4031de37c71893702167c41d09930e14
parent0d702930b068ca8da8eb0117613053a480d9439e (diff)
parent9bbe1e3c2e54f64283bb333ebb648d8f40f5d4ee (diff)
downloadstable-diffusion-webui-gfx803-e35d8b493ffc52459e38d45eb9c4e74fc4453841.tar.gz
stable-diffusion-webui-gfx803-e35d8b493ffc52459e38d45eb9c4e74fc4453841.tar.bz2
stable-diffusion-webui-gfx803-e35d8b493ffc52459e38d45eb9c4e74fc4453841.zip
Merge pull request #4778 from leppie/fix_unbounded_prompt_growth
Fix unbounded prompt growth/determinism in scripts that loop
-rw-r--r--modules/processing.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/processing.py b/modules/processing.py
index def95846..604d822a 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -453,6 +453,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
modules.sd_hijack.model_hijack.clear_comments()
comments = {}
+ prompt_tmp = p.prompt
+ negative_prompt_tmp = p.negative_prompt
shared.prompt_styles.apply_styles(p)
@@ -599,6 +601,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
if p.scripts is not None:
p.scripts.postprocess(p, res)
+ p.prompt = prompt_tmp
+ p.negative_prompt = negative_prompt_tmp
+
return res