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 return_word_ids=True with Anima tokenizer (#12328)
asagi4a831c19b7036
diff --git a/comfy/text_encoders/anima.py b/comfy/text_encoders/anima.pyindex b6f58cb25..fcba097cb 100644--- a/comfy/text_encoders/anima.py+++ b/comfy/text_encoders/anima.py@@ -23,7 +23,7 @@ class AnimaTokenizer:def tokenize_with_weights(self, text:str, return_word_ids=False, **kwargs):out = {}qwen_ids = self.qwen3_06b.tokenize_with_weights(text, return_word_ids, **kwargs)- out["qwen3_06b"] = [[(token, 1.0) for token, _ in inner_list] for inner_list in qwen_ids] # Set weights to 1.0+ out["qwen3_06b"] = [[(token, 1.0, id) if return_word_ids else (token, 1.0) for token, _, id in inner_list] for inner_list in qwen_ids] # Set weights to 1.0out["t5xxl"] = self.t5xxl.tokenize_with_weights(text, return_word_ids, **kwargs)return out