fix prompt parser

This commit is contained in:
Vladimir Mandic
2023-04-01 07:53:23 -04:00
parent 61032b8d9b
commit 02f93037c8
7 changed files with 16 additions and 9 deletions
-3
View File
@@ -2,7 +2,6 @@ import re
from collections import namedtuple
from typing import List
import lark
import shared
# 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):
@@ -94,8 +93,6 @@ def get_learned_conditioning_prompt_schedules(prompts, steps):
try:
tree = schedule_parser.parse(prompt)
except lark.exceptions.LarkError as e:
if 0:
shared.exception()
return [[steps, prompt]]
return [[t, at_step(t, tree)] for t in collect_steps(steps, tree)]
+11 -1
View File
@@ -1550,5 +1550,15 @@
"customscript/seed_travel.py/txt2img/Save extra status information/visible": true,
"customscript/seed_travel.py/txt2img/Save extra status information/value": true,
"customscript/seed_travel.py/img2img/Save extra status information/visible": true,
"customscript/seed_travel.py/img2img/Save extra status information/value": true
"customscript/seed_travel.py/img2img/Save extra status information/value": true,
"customscript/seed_travel.py/txt2img/Curve strength/visible": true,
"customscript/seed_travel.py/txt2img/Curve strength/value": 3,
"customscript/seed_travel.py/txt2img/Curve strength/minimum": 0.0,
"customscript/seed_travel.py/txt2img/Curve strength/maximum": 10.0,
"customscript/seed_travel.py/txt2img/Curve strength/step": 0.1,
"customscript/seed_travel.py/img2img/Curve strength/visible": true,
"customscript/seed_travel.py/img2img/Curve strength/value": 3,
"customscript/seed_travel.py/img2img/Curve strength/minimum": 0.0,
"customscript/seed_travel.py/img2img/Curve strength/maximum": 10.0,
"customscript/seed_travel.py/img2img/Curve strength/step": 0.1
}
+1 -1
Submodule wiki updated: f79f85d11c...61feae068d