fix runtime error (#47)

This commit is contained in:
Lee Felarca
2026-01-23 11:49:18 -08:00
committed by GitHub
parent fcdbfecd7d
commit 493b186f5b
@@ -466,11 +466,13 @@ class VibeVoiceForConditionalGenerationInference(VibeVoicePreTrainedModel, Gener
model_inputs = self.prepare_inputs_for_generation(input_ids, **model_kwargs) model_inputs = self.prepare_inputs_for_generation(input_ids, **model_kwargs)
if is_prefill: if is_prefill:
# we process the speech inputs only during the first generation step # we process the speech inputs only during the first generation step
prefill_inputs = { prefill_inputs = {}
"speech_tensors": speech_tensors.to(device=device), if speech_tensors is not None:
"speech_masks": speech_masks.to(device), prefill_inputs["speech_tensors"] = speech_tensors.to(device=device)
"speech_input_mask": speech_input_mask.to(device), if speech_masks is not None:
} prefill_inputs["speech_masks"] = speech_masks.to(device)
if speech_input_mask is not None:
prefill_inputs["speech_input_mask"] = speech_input_mask.to(device)
is_prefill = False is_prefill = False
else: else:
_ = model_inputs.pop('inputs_embeds', None) _ = model_inputs.pop('inputs_embeds', None)