Skip to content

Commit b8c34d9

Browse files
authored
Fix whisper compile (#35413)
Fix compile error Signed-off-by: jiqing-feng <[email protected]>
1 parent cd44bdb commit b8c34d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/models/whisper/generation_whisper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ def detect_language(
15711571
)
15721572

15731573
with torch.no_grad():
1574-
logits = self(**inputs, decoder_input_ids=decoder_input_ids).logits[:, -1]
1574+
logits = self(**inputs, decoder_input_ids=decoder_input_ids, use_cache=False).logits[:, -1]
15751575

15761576
non_lang_mask = torch.ones_like(logits[0], dtype=torch.bool)
15771577
non_lang_mask[list(generation_config.lang_to_id.values())] = False

0 commit comments

Comments
 (0)