1
0
Fork 0

fix(api): restrict CLIP skip token to integers, allow negative LoRA and Inversion weights

This commit is contained in:
Sean Sube 2023-03-19 09:13:40 -05:00
parent e6d7d30225
commit 27bd10d2f7
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 3 additions and 3 deletions

View File

@ -10,9 +10,9 @@ from diffusers import OnnxStableDiffusionPipeline
logger = getLogger(__name__)
CLIP_TOKEN = compile(r"\<clip:([-\w]+):([\.|\d]+)\>")
INVERSION_TOKEN = compile(r"\<inversion:([-\w]+):([\.|\d]+)\>")
LORA_TOKEN = compile(r"\<lora:([-\w]+):([\.|\d]+)\>")
CLIP_TOKEN = compile(r"\<clip:([-\w]+):(\d+)\>")
INVERSION_TOKEN = compile(r"\<inversion:([-\w]+):(-?[\.|\d]+)\>")
LORA_TOKEN = compile(r"\<lora:([-\w]+):(-?[\.|\d]+)\>")
MAX_TOKENS_PER_GROUP = 77
PATTERN_RANGE = compile(r"(\w+)-{(\d+),(\d+)(?:,(\d+))?}")