The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Remove potentially problematic process_tokens method. (#15507)
comfyanonymous024cbc5fc1c7
diff --git a/comfy/text_encoders/gemma4.py b/comfy/text_encoders/gemma4.pyindex fc62bc7cc..5b0b968c9 100644--- a/comfy/text_encoders/gemma4.py+++ b/comfy/text_encoders/gemma4.py@@ -1451,10 +1451,6 @@ class Gemma4Model(sd1_clip.SDClipModel):self.dtypes.add(dtype)super().__init__(device=device, layer=layer, layer_idx=layer_idx, textmodel_json_config={}, dtype=dtype, special_tokens={"start": 2, "pad": 0}, layer_norm_hidden_state=False, model_class=self.model_class, enable_attention_masks=attention_mask, return_attention_masks=attention_mask, model_options=model_options)- def process_tokens(self, tokens, device):- embeds, _, _, _ = super().process_tokens(tokens, device)- return embeds-def generate(self, tokens, do_sample, max_length, temperature, top_k, top_p, min_p, repetition_penalty, seed, presence_penalty=0.0):if isinstance(tokens, dict):tokens = next(iter(tokens.values()))diff --git a/comfy/text_encoders/lumina2.py b/comfy/text_encoders/lumina2.pyindex b1f1dbb9f..e44920203 100644--- a/comfy/text_encoders/lumina2.py+++ b/comfy/text_encoders/lumina2.py@@ -49,10 +49,6 @@ class Gemma3_4B_Vision_Model(sd1_clip.SDClipModel):super().__init__(device=device, layer=layer, layer_idx=layer_idx, textmodel_json_config={}, dtype=dtype, special_tokens={"start": 2, "pad": 0}, layer_norm_hidden_state=False, model_class=comfy.text_encoders.llama.Gemma3_4B_Vision, enable_attention_masks=attention_mask, return_attention_masks=attention_mask, model_options=model_options)- def process_tokens(self, tokens, device):- embeds, _, _, _ = super().process_tokens(tokens, device)- return embeds-class LuminaModel(sd1_clip.SD1ClipModel):def __init__(self, device="cpu", dtype=None, model_options={}, name="gemma2_2b", clip_model=Gemma2_2BModel):super().__init__(device=device, dtype=dtype, name=name, clip_model=clip_model, model_options=model_options)