Skip to content

Commit ab388d6

Browse files
authored
Remove compat option check for prompt parser
1 parent 035f2af commit ab388d6

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎modules/prompt_parser.py‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
from typing import List
44
import lark
55

6-
try:
7-
from modules.shared import opts
8-
except:
9-
pass
10-
116
# a prompt like this: "fantasy landscape with a [mountain:lake:0.25] and [an oak:a christmas tree:0.75][ in foreground::0.6][ in background:0.25] [shoddy:masterful:0.5]"
127
# will be represented with prompt_schedule like this (assuming steps=100):
138
# [25, 'fantasy landscape with a mountain and an oak in foreground shoddy']
@@ -91,13 +86,7 @@ def plain(self, args):
9186
yield args[0].value
9287
def __default__(self, data, children, meta):
9388
for child in children:
94-
try:
95-
if opts.use_old_prompt_parser_default_step_transformer:
96-
yield from child
97-
else:
98-
yield child
99-
except:
100-
yield child
89+
yield child
10190
return AtStep().transform(tree)
10291

10392
def get_schedule(prompt):

0 commit comments

Comments
 (0)