From 2ce9852cff401bd9d9569e619dbd6fa136481bef Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 20 May 2023 13:14:04 -0400 Subject: [PATCH] update --- modules/prompt_parser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/prompt_parser.py b/modules/prompt_parser.py index 2f3c8e01b..c0d4d3d91 100644 --- a/modules/prompt_parser.py +++ b/modules/prompt_parser.py @@ -1,9 +1,11 @@ # pylint: disable=anomalous-backslash-in-string +""" import os import sys from rich import print sys.path.append(os.path.join(os.path.dirname(__file__), '..')) +""" import re from collections import namedtuple @@ -367,9 +369,9 @@ def parse_prompt_attention(text): if __name__ == "__main__": input_text = '[black] [[grey]] (white) ((gray)) ((orange:1.1) yellow) ((purple) and [dark] red:1.1) [mouse:0.2] [(cat:1.1):0.5]' print(f'Prompt: {input_text}') - schedules = get_learned_conditioning_prompt_schedules([input_text], 100)[0] - print('Schedules', schedules) - for schedule in schedules: + all_schedules = get_learned_conditioning_prompt_schedules([input_text], 100)[0] + print('Schedules', all_schedules) + for schedule in all_schedules: print('Schedule', schedule[0]) opts.data['prompt_attention'] = 'Fixed attention' output_list = parse_prompt_attention(schedule[1])