Unverified Commit e02ec27e authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

[Core] remove `resume_download` from Hub related stuff (#8648)

* remove resume_download

* fix: _fetch_index_file call.

* remove resume_download from docs.
parent a41e4c50
...@@ -121,9 +121,7 @@ class SchedulerMixin(PushToHubMixin): ...@@ -121,9 +121,7 @@ class SchedulerMixin(PushToHubMixin):
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist. cached versions if they exist.
resume_download:
Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
of Diffusers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, for example, `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, for example, `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
......
...@@ -102,9 +102,7 @@ class FlaxSchedulerMixin(PushToHubMixin): ...@@ -102,9 +102,7 @@ class FlaxSchedulerMixin(PushToHubMixin):
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist. cached versions if they exist.
resume_download:
Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
of Diffusers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}`. The proxies are used on each request.
......
...@@ -199,7 +199,6 @@ def get_cached_module_file( ...@@ -199,7 +199,6 @@ def get_cached_module_file(
module_file: str, module_file: str,
cache_dir: Optional[Union[str, os.PathLike]] = None, cache_dir: Optional[Union[str, os.PathLike]] = None,
force_download: bool = False, force_download: bool = False,
resume_download: Optional[bool] = None,
proxies: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None,
token: Optional[Union[bool, str]] = None, token: Optional[Union[bool, str]] = None,
revision: Optional[str] = None, revision: Optional[str] = None,
...@@ -226,9 +225,7 @@ def get_cached_module_file( ...@@ -226,9 +225,7 @@ def get_cached_module_file(
cache should not be used. cache should not be used.
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if they Whether or not to force to (re-)download the configuration files and override the cached versions if they
exist. resume_download: exist.
Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
of Diffusers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -309,7 +306,6 @@ def get_cached_module_file( ...@@ -309,7 +306,6 @@ def get_cached_module_file(
cache_dir=cache_dir, cache_dir=cache_dir,
force_download=force_download, force_download=force_download,
proxies=proxies, proxies=proxies,
resume_download=resume_download,
local_files_only=local_files_only, local_files_only=local_files_only,
token=token, token=token,
) )
...@@ -366,7 +362,6 @@ def get_cached_module_file( ...@@ -366,7 +362,6 @@ def get_cached_module_file(
f"{module_needed}.py", f"{module_needed}.py",
cache_dir=cache_dir, cache_dir=cache_dir,
force_download=force_download, force_download=force_download,
resume_download=resume_download,
proxies=proxies, proxies=proxies,
token=token, token=token,
revision=revision, revision=revision,
...@@ -382,7 +377,6 @@ def get_class_from_dynamic_module( ...@@ -382,7 +377,6 @@ def get_class_from_dynamic_module(
class_name: Optional[str] = None, class_name: Optional[str] = None,
cache_dir: Optional[Union[str, os.PathLike]] = None, cache_dir: Optional[Union[str, os.PathLike]] = None,
force_download: bool = False, force_download: bool = False,
resume_download: Optional[bool] = None,
proxies: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None,
token: Optional[Union[bool, str]] = None, token: Optional[Union[bool, str]] = None,
revision: Optional[str] = None, revision: Optional[str] = None,
...@@ -419,9 +413,6 @@ def get_class_from_dynamic_module( ...@@ -419,9 +413,6 @@ def get_class_from_dynamic_module(
force_download (`bool`, *optional*, defaults to `False`): force_download (`bool`, *optional*, defaults to `False`):
Whether or not to force to (re-)download the configuration files and override the cached versions if they Whether or not to force to (re-)download the configuration files and override the cached versions if they
exist. exist.
resume_download:
Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1 of
Diffusers.
proxies (`Dict[str, str]`, *optional*): proxies (`Dict[str, str]`, *optional*):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128', A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request. 'http://hostname': 'foo.bar:4012'}.` The proxies are used on each request.
...@@ -458,7 +449,6 @@ def get_class_from_dynamic_module( ...@@ -458,7 +449,6 @@ def get_class_from_dynamic_module(
module_file, module_file,
cache_dir=cache_dir, cache_dir=cache_dir,
force_download=force_download, force_download=force_download,
resume_download=resume_download,
proxies=proxies, proxies=proxies,
token=token, token=token,
revision=revision, revision=revision,
......
...@@ -287,7 +287,6 @@ def _get_model_file( ...@@ -287,7 +287,6 @@ def _get_model_file(
cache_dir: Optional[str] = None, cache_dir: Optional[str] = None,
force_download: bool = False, force_download: bool = False,
proxies: Optional[Dict] = None, proxies: Optional[Dict] = None,
resume_download: Optional[bool] = None,
local_files_only: bool = False, local_files_only: bool = False,
token: Optional[str] = None, token: Optional[str] = None,
user_agent: Optional[Union[Dict, str]] = None, user_agent: Optional[Union[Dict, str]] = None,
...@@ -325,7 +324,6 @@ def _get_model_file( ...@@ -325,7 +324,6 @@ def _get_model_file(
cache_dir=cache_dir, cache_dir=cache_dir,
force_download=force_download, force_download=force_download,
proxies=proxies, proxies=proxies,
resume_download=resume_download,
local_files_only=local_files_only, local_files_only=local_files_only,
token=token, token=token,
user_agent=user_agent, user_agent=user_agent,
...@@ -350,7 +348,6 @@ def _get_model_file( ...@@ -350,7 +348,6 @@ def _get_model_file(
cache_dir=cache_dir, cache_dir=cache_dir,
force_download=force_download, force_download=force_download,
proxies=proxies, proxies=proxies,
resume_download=resume_download,
local_files_only=local_files_only, local_files_only=local_files_only,
token=token, token=token,
user_agent=user_agent, user_agent=user_agent,
...@@ -418,7 +415,6 @@ def _get_checkpoint_shard_files( ...@@ -418,7 +415,6 @@ def _get_checkpoint_shard_files(
index_filename, index_filename,
cache_dir=None, cache_dir=None,
proxies=None, proxies=None,
resume_download=False,
local_files_only=False, local_files_only=False,
token=None, token=None,
user_agent=None, user_agent=None,
...@@ -476,7 +472,6 @@ def _get_checkpoint_shard_files( ...@@ -476,7 +472,6 @@ def _get_checkpoint_shard_files(
cached_folder = snapshot_download( cached_folder = snapshot_download(
pretrained_model_name_or_path, pretrained_model_name_or_path,
cache_dir=cache_dir, cache_dir=cache_dir,
resume_download=resume_download,
proxies=proxies, proxies=proxies,
local_files_only=local_files_only, local_files_only=local_files_only,
token=token, token=token,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment