diff options
author | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-01-11 13:59:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-11 13:59:47 +0000 |
commit | ab388d6f8bf51338de1950b3907c324b0ff6a872 (patch) | |
tree | b7cec8b8deeffac4316b690e5acefc5658711802 | |
parent | 035f2af050da98a8b3f847624ef3b5bc3395e87e (diff) | |
download | stable-diffusion-webui-gfx803-ab388d6f8bf51338de1950b3907c324b0ff6a872.tar.gz stable-diffusion-webui-gfx803-ab388d6f8bf51338de1950b3907c324b0ff6a872.tar.bz2 stable-diffusion-webui-gfx803-ab388d6f8bf51338de1950b3907c324b0ff6a872.zip |
Remove compat option check for prompt parser
-rw-r--r-- | modules/prompt_parser.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index b69f1425..870218db 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -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,13 +86,7 @@ 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
+ yield child
return AtStep().transform(tree)
def get_schedule(prompt):
|