Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ tqdm
more-itertools
tiktoken
triton>=2.0.0;platform_machine=="x86_64" and sys_platform=="linux" or sys_platform=="linux2"
packaging
3 changes: 2 additions & 1 deletion whisper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import urllib
import warnings
from typing import List, Optional, Union
from packaging import version

import torch
from tqdm import tqdm
Expand Down Expand Up @@ -147,7 +148,7 @@ def load_model(
with (
io.BytesIO(checkpoint_file) if in_memory else open(checkpoint_file, "rb")
) as fp:
kwargs = {"weights_only": True} if torch.__version__ >= "1.13" else {}
kwargs = {"weights_only": True} if version.parse(torch.__version__ ) >= version.parse("1.13") else {}
checkpoint = torch.load(fp, map_location=device, **kwargs)
del checkpoint_file

Expand Down