Skip to content
Closed
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
6 changes: 5 additions & 1 deletion python/sglang/srt/models/whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,12 @@ def forward(
features.device, non_blocking=True
)

# Move features to the same device as model weights
device = self.encoder.conv1.weight.device
req_encoder_output = self.encoder(
features.to(dtype), encoder_position_ids, forward_batch
features.to(device=device, dtype=dtype),
encoder_position_ids.to(device),
forward_batch,
)
req_encoder_output = req_encoder_output.squeeze(0)
encoder_list.append(req_encoder_output)
Expand Down
Loading