Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vibevoice/modular/modeling_vibevoice_asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ def _iter_segments(total_length: int, segment_length: int):

# Combine acoustic and semantic features
if speech_masks is not None:
# Under device_map="auto", acoustic_connector/semantic_connector can be
# dispatched to a different device than speech_masks (e.g. multi-GPU
# pipeline parallelism), and boolean-indexing requires the mask to be
# on the same device as the indexed tensor.
speech_masks = speech_masks.to(acoustic_features.device)
combined_features = acoustic_features[speech_masks] + semantic_features[speech_masks]
else:
combined_features = acoustic_features + semantic_features
Expand Down