Skip to content

Fix KeyError: 'default_num_special_tokens' when recreating Tekken tok… - #479

Open
bigdatamark wants to merge 1 commit into
city96:mainfrom
bigdatamark:bigdatamark-tekken-token
Open

Fix KeyError: 'default_num_special_tokens' when recreating Tekken tok…#479
bigdatamark wants to merge 1 commit into
city96:mainfrom
bigdatamark:bigdatamark-tekken-token

Conversation

@bigdatamark

Copy link
Copy Markdown

…enizer

Problem

When loading Mistral-based GGUF text encoders via CLIPLoaderGGUF (specifically tested with Mistral-Small-3.2-24B-Instruct-2506-UD-Q8_K_XL.gguf for FLUX.2 workflows), ComfyUI core crashes during tokenizer initialization:

File "ComfyUI/comfy/text_encoders/bpe_tokenizer.py", line 271, in from_tekken_json
    special_token_offset = config["default_num_special_tokens"]
KeyError: 'default_num_special_tokens'

…enizer

### Problem
When loading Mistral-based GGUF text encoders via `CLIPLoaderGGUF` (specifically tested with `Mistral-Small-3.2-24B-Instruct-2506-UD-Q8_K_XL.gguf` for FLUX.2 workflows), ComfyUI core crashes during tokenizer initialization:

```text
File "ComfyUI/comfy/text_encoders/bpe_tokenizer.py", line 271, in from_tekken_json
    special_token_offset = config["default_num_special_tokens"]
KeyError: 'default_num_special_tokens'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant