Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Fix crash. (#10885)

comfyanonymousdff996ca39d8
diff --git a/comfy/text_encoders/flux.py b/comfy/text_encoders/flux.py
index 8dbbca16e..024504a5b 100644
--- a/comfy/text_encoders/flux.py
+++ b/comfy/text_encoders/flux.py
@@ -87,6 +87,7 @@ def load_mistral_tokenizer(data):
vocab = {}
max_vocab = mistral_vocab["config"]["default_vocab_size"]
+ max_vocab -= len(mistral_vocab["special_tokens"])
for w in mistral_vocab["vocab"]:
r = w["rank"]