Skip to content

Commit 97ff69e

Browse files
Merge pull request #6628 from catboxanon/fix/alternating-words-emphasis
Fix prompt parser default step transformer
2 parents 4bd4907 + 0b38b72 commit 97ff69e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/prompt_parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def get_learned_conditioning_prompt_schedules(prompts, steps):
4949
[[5, 'a c'], [10, 'a {b|d{ c']]
5050
>>> g("((a][:b:c [d:3]")
5151
[[3, '((a][:b:c '], [10, '((a][:b:c d']]
52+
>>> g("[a|(b:1.1)]")
53+
[[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)']]
5254
"""
5355

5456
def collect_steps(steps, tree):
@@ -84,7 +86,7 @@ def plain(self, args):
8486
yield args[0].value
8587
def __default__(self, data, children, meta):
8688
for child in children:
87-
yield from child
89+
yield child
8890
return AtStep().transform(tree)
8991

9092
def get_schedule(prompt):

0 commit comments

Comments
 (0)