The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Allow setting min_length with tokenizer_data. (#8547)
comfyanonymouse1c6dc720e01
diff --git a/comfy/sd1_clip.py b/comfy/sd1_clip.pyindex ac61babe9..1b69a4103 100644--- a/comfy/sd1_clip.py+++ b/comfy/sd1_clip.py@@ -462,7 +462,7 @@ class SDTokenizer:tokenizer_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "sd1_tokenizer")self.tokenizer = tokenizer_class.from_pretrained(tokenizer_path, **tokenizer_args)self.max_length = tokenizer_data.get("{}_max_length".format(embedding_key), max_length)- self.min_length = min_length+ self.min_length = tokenizer_data.get("{}_min_length".format(embedding_key), min_length)self.end_token = Noneself.min_padding = min_padding