From 0bedfb26af436ce2150779cd03dfd69501a0cc74 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 16 Oct 2024 12:36:19 -0400 Subject: [PATCH] Revert "Fix Transformers FutureWarning (#5140)" This reverts commit 95b7cf9bbe0d1c0de34c630cf5209840b273d37c. --- comfy/sd1_clip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/sd1_clip.py b/comfy/sd1_clip.py index 6f574900..bb240526 100644 --- a/comfy/sd1_clip.py +++ b/comfy/sd1_clip.py @@ -405,7 +405,7 @@ class SDTokenizer: def __init__(self, tokenizer_path=None, max_length=77, pad_with_end=True, embedding_directory=None, embedding_size=768, embedding_key='clip_l', tokenizer_class=CLIPTokenizer, has_start_token=True, pad_to_max_length=True, min_length=None, pad_token=None, tokenizer_data={}): if tokenizer_path is None: tokenizer_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "sd1_tokenizer") - self.tokenizer = tokenizer_class.from_pretrained(tokenizer_path, clean_up_tokenization_spaces=True) # Fix Transformers FutureWarning by explicitly setting clean_up_tokenization_spaces to True + self.tokenizer = tokenizer_class.from_pretrained(tokenizer_path) self.max_length = max_length self.min_length = min_length