From 024cbc5fc1c779ea7905356d3f3239b90dd0dae3 Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Tue, 11 Aug 2026 13:45:52 -0700 Subject: [PATCH] Remove potentially problematic process_tokens method. (#15507) --- comfy/text_encoders/gemma4.py | 4 ---- comfy/text_encoders/lumina2.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/comfy/text_encoders/gemma4.py b/comfy/text_encoders/gemma4.py index 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.py index 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)