From 30745f163d1722c48f00c0db71837c1cbd6817cb Mon Sep 17 00:00:00 2001 From: Damian at mba Date: Thu, 27 Oct 2022 21:17:54 +0200 Subject: [PATCH] add one more test case --- tests/test_prompt_parser.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_prompt_parser.py b/tests/test_prompt_parser.py index f2ac1b9999..839093289a 100644 --- a/tests/test_prompt_parser.py +++ b/tests/test_prompt_parser.py @@ -277,6 +277,13 @@ class PromptParserTestCase(unittest.TestCase): ])]), parse_prompt("a cat.swap(dog) eating a hotdog.swap(\"h\(o\)tdog++++\", shape_freedom=0.5)")) + self.assertEqual(Conjunction([FlattenedPrompt([Fragment('a', 1), + CrossAttentionControlSubstitute([Fragment('cat',1)], [Fragment('dog',1)]), + Fragment('eating a', 1), + CrossAttentionControlSubstitute([Fragment('hotdog',1)], [Fragment('h(o)tdog', pow(0.9,1))]) + ])]), + parse_prompt("a cat.swap(dog) eating a hotdog.swap(h\(o\)tdog-, shape_freedom=0.5)")) + def test_cross_attention_control_options(self): self.assertEqual(Conjunction([ FlattenedPrompt([Fragment('a', 1),