From f66eeb811795e12924853accf1838682fdc355c1 Mon Sep 17 00:00:00 2001 From: Michael Poutre Date: Thu, 24 Aug 2023 21:28:42 -0700 Subject: [PATCH] tokenizer: Use SegOrAction --- lib/tokenizer.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/tokenizer.py b/lib/tokenizer.py index bb4eca1..27315de 100644 --- a/lib/tokenizer.py +++ b/lib/tokenizer.py @@ -1,7 +1,5 @@ from comfy.sd1_clip import SD1Tokenizer -from custom_nodes.ClipStuff.lib.action.base import ( - Action, -) +from custom_nodes.ClipStuff.lib.actions.types import SegOrAction from custom_nodes.ClipStuff.lib.parser import PromptParser from custom_nodes.ClipStuff.lib.parser.transformer import PromptTransformer @@ -16,7 +14,7 @@ class PromptLangTokenizer(SD1Tokenizer): Returns batches of segments and actions :return: List of list(batches) of segments and actions """ - def tokenize_with_weights(self, text:str, return_word_ids=False, **kwargs) -> list[list[PromptSegment | Action]]: + def tokenize_with_weights(self, text:str, return_word_ids=False, **kwargs) -> list[list[SegOrAction]]: if self.pad_with_end: pad_token = self.end_token else: