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.

add support for loading embeddings models onto Qwen3.5 (#17159)

Silver872eb6a3a549
diff --git a/comfy/text_encoders/qwen35.py b/comfy/text_encoders/qwen35.py
index c1e7d08e6..0a2368824 100644
--- a/comfy/text_encoders/qwen35.py
+++ b/comfy/text_encoders/qwen35.py
@@ -1071,7 +1071,7 @@ class Qwen35ImageTokenizer(sd1_clip.SD1Tokenizer):
qwen_tokens = tokens[key_name]
for r in qwen_tokens:
for i in range(len(r)):
- if r[i][0] == 248056: # <|image_pad|>
+ if isinstance(r[i][0], (int, float)) and r[i][0] == 248056: # <|image_pad|>
if len(images) > embed_count:
r[i] = ({"type": "image", "data": images[embed_count], "original_type": "image"},) + r[i][1:]
embed_count += 1