Feature Extraction
Transformers
Safetensors
diva
custom_code
WillHeld commited on
Commit
a7ff5b3
1 Parent(s): f79cc7c

Update modeling_diva.py

Browse files
Files changed (1) hide show
  1. modeling_diva.py +1 -1
modeling_diva.py CHANGED
@@ -252,7 +252,7 @@ class DiVAModel(PreTrainedModel):
252
  self, audio, text_prompt, do_sample=False, logits_processor=None, max_new_tokens=128
253
  ):
254
  inputs = self.processor(audio, return_tensors="pt", sampling_rate=16_000)
255
- input_features = inputs.input_features
256
  hidden_states = self.whisper_encoder(input_features=input_features)[
257
  "last_hidden_state"
258
  ]
 
252
  self, audio, text_prompt, do_sample=False, logits_processor=None, max_new_tokens=128
253
  ):
254
  inputs = self.processor(audio, return_tensors="pt", sampling_rate=16_000)
255
+ input_features = inputs.input_features.to(self.whisper_encoder.device)
256
  hidden_states = self.whisper_encoder(input_features=input_features)[
257
  "last_hidden_state"
258
  ]