[UltraVox] Fix output type (#37224)
Signed-off-by: vasqu <antonprogamer@gmail.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
co-authored by
Harry Mellor
parent
a836524d20
commit
2ff0ad9694
@@ -404,12 +404,14 @@ class UltravoxTransformerProjector(nn.Module, ModuleUtilsMixin):
|
||||
kwargs["layer_head_mask"] = None
|
||||
|
||||
for layer in self.layers:
|
||||
layer_outputs = layer(
|
||||
hidden_states = layer(
|
||||
hidden_states,
|
||||
attention_mask=extended_attention_mask,
|
||||
**kwargs,
|
||||
)
|
||||
hidden_states = layer_outputs[0]
|
||||
# BC version that allows for the old tupled output
|
||||
if isinstance(hidden_states, tuple):
|
||||
hidden_states = hidden_states[0]
|
||||
|
||||
hidden_states = self.ln_post(hidden_states)
|
||||
hidden_states = self.linear_out(hidden_states)
|
||||
@@ -509,13 +511,14 @@ class ModifiedWhisperEncoder(WhisperEncoder):
|
||||
kwargs["layer_head_mask"] = None
|
||||
|
||||
for encoder_layer in self.layers:
|
||||
layer_outputs = encoder_layer(
|
||||
hidden_states = encoder_layer(
|
||||
hidden_states,
|
||||
attention_mask,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
hidden_states = layer_outputs[0]
|
||||
# BC version that allows for the old tupled output
|
||||
if isinstance(hidden_states, tuple):
|
||||
hidden_states = hidden_states[0]
|
||||
|
||||
hidden_states = self.layer_norm(hidden_states)
|
||||
return hidden_states
|
||||
|
||||
Reference in New Issue
Block a user