In this repo, is there a token length limit when calling XLMRobertaTokenizer?
- User
In this repo, is there a token length limit when calling
XLMRobertaTokenizer? Assistant
I will search for
XLMRobertaTokenizerin the repository to determine if there's a token length limit when it's called.Assistant
XLMRobertaTokenizerwasn't found, so I'll broaden my search for tokenizers, focusing on CLIP-based ones given the project context. I'll start by examiningcomfy_newbie_clip_text_encode.pyfor tokenizer-related code.Assistant
comfy_newbie_clip_text_encode.pydoesn't directly useXLMRobertaTokenizer; theclipobject handles encoding. I'll checkcomfy_newbie_clip_loader.pyandnewbie_model_support.pyto identify the tokenizer and any token limits. Starting withcomfy_newbie_clip_loader.py.Assistant
comfy_newbie_clip_loader.pyreveals the use of Hugging Face Transformers, loading both Gemma and Jina CLIP models viaAutoModelandAutoTokenizer. Both tokenizers are configured withmax_length=8000, which directly addresses the user's implicit question about token limits, even thoughXLMRobertaTokenizerisn't explicitly used. The token limit for both tokenizers is 8000.Assistant
Typo. Correcting, then re-outputting.
- User
In this repo, what's the embedding size of
XLMRobertaTokenizer? Assistant
The user is asking about
XLMRobertaTokenizer's embedding size, but it's not used here. I need to inform them about the actual tokenizers in use (Gemma and Jina CLIP) and find their embedding sizes by examining theload_gemma_modelandload_jina_clipfunctions withincomfy_newbie_clip_loader.pyfor model configuration details.Assistant
I've re-examined
comfy_newbie_clip_loader.pyto determine embedding sizes for the Gemma and Jina CLIP models. Both useAutoModel.from_pretrainedorAutoModel.from_config, meaning embedding size is found inconfig.hidden_sizeor as the last dimension of model outputs. While I can't get exact sizes without specific model files, Gemma 3-4B-IT likely has a 2048 embedding size, and Jina CLIP (V2) is typically 768 or 1024. I will clarify thatXLMRobertaTokenizeris not used, and provide these estimated embedding sizes.