Skip to content
Discussion options

You must be logged in to vote

The load_model() function also checks if the name string is a path to an existing file:

whisper/whisper/__init__.py

Lines 130 to 139 in c09a7ae

if name in _MODELS:
checkpoint_file = _download(_MODELS[name], download_root, in_memory)
alignment_heads = _ALIGNMENT_HEADS[name]
elif os.path.isfile(name):
checkpoint_file = open(name, "rb").read() if in_memory else name
alignment_heads = None
else:
raise RuntimeError(
f"Model {name} not found; available models = {available_models()}"
)

So you can simply supply the checkpoint path. It should still have the same format, containing a dictionary with "dims" and "model_state_dict" fields.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@anonymouscnuser
Comment options

@phineas-pta
Comment options

Answer selected by jongwook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants