Unverified Commit ab388d6f authored by catboxanon's avatar catboxanon Committed by GitHub
Browse files

Remove compat option check for prompt parser

parent 035f2af0
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -3,11 +3,6 @@ from collections import namedtuple
from typing import List
import lark

try:
    from modules.shared import opts
except:
    pass

# 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]"
# will be represented with prompt_schedule like this (assuming steps=100):
# [25, 'fantasy landscape with a mountain and an oak in foreground shoddy']
@@ -91,12 +86,6 @@ def get_learned_conditioning_prompt_schedules(prompts, steps):
                yield args[0].value
            def __default__(self, data, children, meta):
                for child in children:
                    try:
                        if opts.use_old_prompt_parser_default_step_transformer:
                            yield from child
                        else:
                            yield child
                    except:
                    yield child
        return AtStep().transform(tree)