diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-01-11 15:56:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-11 15:56:24 +0000 |
commit | 97ff69eff338c6641f4abf430bf5ac112c1775e0 (patch) | |
tree | d67ba4fc986344eb1fa15f0d92122fa9d0d3a3bb | |
parent | 4bd490727e156ff53107d53416d6b89be86f2a62 (diff) | |
parent | 0b38b72d31ead82c7d0998a29e50da90073831f7 (diff) | |
download | stable-diffusion-webui-gfx803-97ff69eff338c6641f4abf430bf5ac112c1775e0.tar.gz stable-diffusion-webui-gfx803-97ff69eff338c6641f4abf430bf5ac112c1775e0.tar.bz2 stable-diffusion-webui-gfx803-97ff69eff338c6641f4abf430bf5ac112c1775e0.zip |
Merge pull request #6628 from catboxanon/fix/alternating-words-emphasis
Fix prompt parser default step transformer
-rw-r--r-- | modules/prompt_parser.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index f70872c4..870218db 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -49,6 +49,8 @@ def get_learned_conditioning_prompt_schedules(prompts, steps): [[5, 'a c'], [10, 'a {b|d{ c']]
>>> g("((a][:b:c [d:3]")
[[3, '((a][:b:c '], [10, '((a][:b:c d']]
+ >>> g("[a|(b:1.1)]")
+ [[1, 'a'], [2, '(b:1.1)'], [3, 'a'], [4, '(b:1.1)'], [5, 'a'], [6, '(b:1.1)'], [7, 'a'], [8, '(b:1.1)'], [9, 'a'], [10, '(b:1.1)']]
"""
def collect_steps(steps, tree):
@@ -84,7 +86,7 @@ def get_learned_conditioning_prompt_schedules(prompts, steps): yield args[0].value
def __default__(self, data, children, meta):
for child in children:
- yield from child
+ yield child
return AtStep().transform(tree)
def get_schedule(prompt):
|