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
14 changes: 6 additions & 8 deletions sam_audio/model/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved\n
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved

import json
import os
Expand All @@ -21,10 +21,10 @@ def _from_pretrained(
model_id: str,
cache_dir: str,
force_download: bool,
proxies: Optional[Dict],
resume_download: bool,
local_files_only: bool,
token: Union[str, bool, None],
proxies: Optional[Dict] = None,
resume_download: Optional[bool] = None,
local_files_only: bool = False,
token: Union[str, bool, None] = None,
map_location: str = "cpu",
strict: bool = True,
revision: Optional[str] = None,
Expand All @@ -38,8 +38,6 @@ def _from_pretrained(
revision=cls.revision,
cache_dir=cache_dir,
force_download=force_download,
proxies=proxies,
resume_download=resume_download,
token=token,
local_files_only=local_files_only,
)
Expand All @@ -59,4 +57,4 @@ def _from_pretrained(
map_location=map_location,
)
model.load_state_dict(state_dict, strict=strict)
return model
return model