fix(models): remove invalid sampling_metadata parameter from logits_processor (#4456)

Signed-off-by: akshatvishu <akshatnayak197@gmail.com>
This commit is contained in:
akshatvishu authored and GitHub committed 2026-06-16 14:41:40 +08:00
1 parent ba4932c364
commit d8a72be206
4 files changed
+46 -3

No files matched your search

@@ -887,7 +887,7 @@ class HiggsAudioV2TalkerForConditionalGeneration(nn.Module):
# single step at a time; cleared in :meth:`sample` after consumption
# so a missed call doesn't leak stale tensors.
self._last_logits_hidden = hidden_states
return self.logits_processor(self.lm_head, hidden_states, sampling_metadata)
return self.logits_processor(self.lm_head, hidden_states)
def audio_codebook_logits(
self,
@@ -531,7 +531,7 @@ class HiggsAudioV3TalkerForConditionalGeneration(nn.Module):
def compute_logits(self, hidden_states: torch.Tensor, sampling_metadata: Any = None) -> torch.Tensor:
self._last_logits_hidden = hidden_states
return self.logits_processor(self.lm_head, hidden_states, sampling_metadata)
return self.logits_processor(self.lm_head, hidden_states)
def embed_input_ids(self, input_ids: torch.Tensor, **_: Any) -> torch.Tensor:
safe_ids = torch.where(input_ids < 0, torch.zeros_like(input_ids), input_ids)
@@ -194,7 +194,7 @@ class MossTTSDelayTalkerForGeneration(nn.Module):
hidden_states = hidden_states.text_hidden_states
if hidden_states is None:
return None
logits = self.logits_processor(self.text_lm_head, hidden_states, sampling_metadata)
logits = self.logits_processor(self.text_lm_head, hidden_states)
if logits is None or self._batch_state is None:
return logits