"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "bfdeffc375f27b04a4ae7eeb22af24643582fcea"
Unverified Commit 6a479588 authored by Lucain's avatar Lucain Committed by GitHub
Browse files

Respect `resume_download` deprecation (#7843)



* Deprecate resume_download

* align docstring with transformers

* style

---------
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent fa489eae
...@@ -310,9 +310,9 @@ class ConfigMixin: ...@@ -310,9 +310,9 @@ class ConfigMixin:
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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -341,7 +341,7 @@ class ConfigMixin: ...@@ -341,7 +341,7 @@ class ConfigMixin:
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
local_files_only = kwargs.pop("local_files_only", False) local_files_only = kwargs.pop("local_files_only", False)
......
...@@ -50,9 +50,9 @@ class FromOriginalVAEMixin: ...@@ -50,9 +50,9 @@ class FromOriginalVAEMixin:
cache_dir (`Union[str, os.PathLike]`, *optional*): cache_dir (`Union[str, os.PathLike]`, *optional*):
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used. is not used.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -99,7 +99,7 @@ class FromOriginalVAEMixin: ...@@ -99,7 +99,7 @@ class FromOriginalVAEMixin:
original_config_file = kwargs.pop("original_config_file", None) original_config_file = kwargs.pop("original_config_file", None)
config_file = kwargs.pop("config_file", None) config_file = kwargs.pop("config_file", None)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -50,9 +50,9 @@ class FromOriginalControlNetMixin: ...@@ -50,9 +50,9 @@ class FromOriginalControlNetMixin:
cache_dir (`Union[str, os.PathLike]`, *optional*): cache_dir (`Union[str, os.PathLike]`, *optional*):
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used. is not used.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -89,7 +89,7 @@ class FromOriginalControlNetMixin: ...@@ -89,7 +89,7 @@ class FromOriginalControlNetMixin:
""" """
original_config_file = kwargs.pop("original_config_file", None) original_config_file = kwargs.pop("original_config_file", None)
config_file = kwargs.pop("config_file", None) config_file = kwargs.pop("config_file", None)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -90,9 +90,9 @@ class IPAdapterMixin: ...@@ -90,9 +90,9 @@ class IPAdapterMixin:
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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -135,7 +135,7 @@ class IPAdapterMixin: ...@@ -135,7 +135,7 @@ class IPAdapterMixin:
# Load the main state dict first. # Load the main state dict first.
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
local_files_only = kwargs.pop("local_files_only", None) local_files_only = kwargs.pop("local_files_only", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -176,9 +176,9 @@ class LoraLoaderMixin: ...@@ -176,9 +176,9 @@ class LoraLoaderMixin:
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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -208,7 +208,7 @@ class LoraLoaderMixin: ...@@ -208,7 +208,7 @@ class LoraLoaderMixin:
# UNet and text encoder or both. # UNet and text encoder or both.
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
local_files_only = kwargs.pop("local_files_only", None) local_files_only = kwargs.pop("local_files_only", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -177,9 +177,9 @@ class FromSingleFileMixin: ...@@ -177,9 +177,9 @@ class FromSingleFileMixin:
cache_dir (`Union[str, os.PathLike]`, *optional*): cache_dir (`Union[str, os.PathLike]`, *optional*):
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used. is not used.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -244,7 +244,7 @@ class FromSingleFileMixin: ...@@ -244,7 +244,7 @@ class FromSingleFileMixin:
``` ```
""" """
original_config_file = kwargs.pop("original_config_file", None) original_config_file = kwargs.pop("original_config_file", None)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -305,7 +305,7 @@ def fetch_ldm_config_and_checkpoint( ...@@ -305,7 +305,7 @@ def fetch_ldm_config_and_checkpoint(
pretrained_model_link_or_path, pretrained_model_link_or_path,
class_name, class_name,
original_config_file=None, original_config_file=None,
resume_download=False, resume_download=None,
force_download=False, force_download=False,
proxies=None, proxies=None,
token=None, token=None,
......
...@@ -38,7 +38,7 @@ TEXT_INVERSION_NAME_SAFE = "learned_embeds.safetensors" ...@@ -38,7 +38,7 @@ TEXT_INVERSION_NAME_SAFE = "learned_embeds.safetensors"
def load_textual_inversion_state_dicts(pretrained_model_name_or_paths, **kwargs): def load_textual_inversion_state_dicts(pretrained_model_name_or_paths, **kwargs):
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
local_files_only = kwargs.pop("local_files_only", None) local_files_only = kwargs.pop("local_files_only", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
...@@ -308,9 +308,9 @@ class TextualInversionLoaderMixin: ...@@ -308,9 +308,9 @@ class TextualInversionLoaderMixin:
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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
......
...@@ -103,9 +103,9 @@ class UNet2DConditionLoadersMixin: ...@@ -103,9 +103,9 @@ class UNet2DConditionLoadersMixin:
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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -149,7 +149,7 @@ class UNet2DConditionLoadersMixin: ...@@ -149,7 +149,7 @@ class UNet2DConditionLoadersMixin:
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
local_files_only = kwargs.pop("local_files_only", None) local_files_only = kwargs.pop("local_files_only", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
...@@ -1090,9 +1090,9 @@ class FromOriginalUNetMixin: ...@@ -1090,9 +1090,9 @@ class FromOriginalUNetMixin:
cache_dir (`Union[str, os.PathLike]`, *optional*): cache_dir (`Union[str, os.PathLike]`, *optional*):
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used. is not used.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -1114,7 +1114,7 @@ class FromOriginalUNetMixin: ...@@ -1114,7 +1114,7 @@ class FromOriginalUNetMixin:
raise ValueError("FromOriginalUNetMixin is currently only compatible with StableCascadeUNet") raise ValueError("FromOriginalUNetMixin is currently only compatible with StableCascadeUNet")
config = kwargs.pop("config", None) config = kwargs.pop("config", None)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -245,9 +245,9 @@ class FlaxModelMixin(PushToHubMixin): ...@@ -245,9 +245,9 @@ class FlaxModelMixin(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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -296,7 +296,7 @@ class FlaxModelMixin(PushToHubMixin): ...@@ -296,7 +296,7 @@ class FlaxModelMixin(PushToHubMixin):
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
from_pt = kwargs.pop("from_pt", False) from_pt = kwargs.pop("from_pt", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
local_files_only = kwargs.pop("local_files_only", False) local_files_only = kwargs.pop("local_files_only", False)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -446,9 +446,9 @@ class ModelMixin(torch.nn.Module, PushToHubMixin): ...@@ -446,9 +446,9 @@ class ModelMixin(torch.nn.Module, 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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -530,7 +530,7 @@ class ModelMixin(torch.nn.Module, PushToHubMixin): ...@@ -530,7 +530,7 @@ class ModelMixin(torch.nn.Module, PushToHubMixin):
ignore_mismatched_sizes = kwargs.pop("ignore_mismatched_sizes", False) ignore_mismatched_sizes = kwargs.pop("ignore_mismatched_sizes", False)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
from_flax = kwargs.pop("from_flax", False) from_flax = kwargs.pop("from_flax", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
output_loading_info = kwargs.pop("output_loading_info", False) output_loading_info = kwargs.pop("output_loading_info", False)
local_files_only = kwargs.pop("local_files_only", None) local_files_only = kwargs.pop("local_files_only", None)
......
...@@ -234,9 +234,9 @@ class AutoPipelineForText2Image(ConfigMixin): ...@@ -234,9 +234,9 @@ class AutoPipelineForText2Image(ConfigMixin):
cache_dir (`Union[str, os.PathLike]`, *optional*): cache_dir (`Union[str, os.PathLike]`, *optional*):
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used. is not used.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -311,7 +311,7 @@ class AutoPipelineForText2Image(ConfigMixin): ...@@ -311,7 +311,7 @@ class AutoPipelineForText2Image(ConfigMixin):
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
local_files_only = kwargs.pop("local_files_only", False) local_files_only = kwargs.pop("local_files_only", False)
...@@ -507,9 +507,9 @@ class AutoPipelineForImage2Image(ConfigMixin): ...@@ -507,9 +507,9 @@ class AutoPipelineForImage2Image(ConfigMixin):
cache_dir (`Union[str, os.PathLike]`, *optional*): cache_dir (`Union[str, os.PathLike]`, *optional*):
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used. is not used.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -584,7 +584,7 @@ class AutoPipelineForImage2Image(ConfigMixin): ...@@ -584,7 +584,7 @@ class AutoPipelineForImage2Image(ConfigMixin):
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
local_files_only = kwargs.pop("local_files_only", False) local_files_only = kwargs.pop("local_files_only", False)
...@@ -783,9 +783,9 @@ class AutoPipelineForInpainting(ConfigMixin): ...@@ -783,9 +783,9 @@ class AutoPipelineForInpainting(ConfigMixin):
cache_dir (`Union[str, os.PathLike]`, *optional*): cache_dir (`Union[str, os.PathLike]`, *optional*):
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used. is not used.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -860,7 +860,7 @@ class AutoPipelineForInpainting(ConfigMixin): ...@@ -860,7 +860,7 @@ class AutoPipelineForInpainting(ConfigMixin):
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
local_files_only = kwargs.pop("local_files_only", False) local_files_only = kwargs.pop("local_files_only", False)
......
...@@ -254,9 +254,9 @@ class FlaxDiffusionPipeline(ConfigMixin, PushToHubMixin): ...@@ -254,9 +254,9 @@ class FlaxDiffusionPipeline(ConfigMixin, 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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -316,7 +316,7 @@ class FlaxDiffusionPipeline(ConfigMixin, PushToHubMixin): ...@@ -316,7 +316,7 @@ class FlaxDiffusionPipeline(ConfigMixin, PushToHubMixin):
``` ```
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
local_files_only = kwargs.pop("local_files_only", False) local_files_only = kwargs.pop("local_files_only", False)
token = kwargs.pop("token", None) token = kwargs.pop("token", None)
......
...@@ -435,7 +435,7 @@ def _load_empty_model( ...@@ -435,7 +435,7 @@ def _load_empty_model(
return_unused_kwargs=True, return_unused_kwargs=True,
return_commit_hash=True, return_commit_hash=True,
force_download=kwargs.pop("force_download", False), force_download=kwargs.pop("force_download", False),
resume_download=kwargs.pop("resume_download", False), resume_download=kwargs.pop("resume_download", None),
proxies=kwargs.pop("proxies", None), proxies=kwargs.pop("proxies", None),
local_files_only=kwargs.pop("local_files_only", False), local_files_only=kwargs.pop("local_files_only", False),
token=kwargs.pop("token", None), token=kwargs.pop("token", None),
...@@ -454,7 +454,7 @@ def _load_empty_model( ...@@ -454,7 +454,7 @@ def _load_empty_model(
cached_folder, cached_folder,
subfolder=name, subfolder=name,
force_download=kwargs.pop("force_download", False), force_download=kwargs.pop("force_download", False),
resume_download=kwargs.pop("resume_download", False), resume_download=kwargs.pop("resume_download", None),
proxies=kwargs.pop("proxies", None), proxies=kwargs.pop("proxies", None),
local_files_only=kwargs.pop("local_files_only", False), local_files_only=kwargs.pop("local_files_only", False),
token=kwargs.pop("token", None), token=kwargs.pop("token", None),
......
...@@ -533,9 +533,9 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin): ...@@ -533,9 +533,9 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
cache_dir (`Union[str, os.PathLike]`, *optional*): cache_dir (`Union[str, os.PathLike]`, *optional*):
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used. is not used.
resume_download (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -625,7 +625,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin): ...@@ -625,7 +625,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
``` ```
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
local_files_only = kwargs.pop("local_files_only", None) local_files_only = kwargs.pop("local_files_only", None)
...@@ -1216,9 +1216,9 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin): ...@@ -1216,9 +1216,9 @@ class DiffusionPipeline(ConfigMixin, 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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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.
...@@ -1271,7 +1271,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin): ...@@ -1271,7 +1271,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
""" """
cache_dir = kwargs.pop("cache_dir", None) cache_dir = kwargs.pop("cache_dir", None)
resume_download = kwargs.pop("resume_download", False) resume_download = kwargs.pop("resume_download", None)
force_download = kwargs.pop("force_download", False) force_download = kwargs.pop("force_download", False)
proxies = kwargs.pop("proxies", None) proxies = kwargs.pop("proxies", None)
local_files_only = kwargs.pop("local_files_only", None) local_files_only = kwargs.pop("local_files_only", None)
......
...@@ -112,9 +112,9 @@ class SchedulerMixin(PushToHubMixin): ...@@ -112,9 +112,9 @@ 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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to resume downloading the model weights and configuration files. If set to `False`, any Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
incompletely downloaded files are deleted. 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,9 @@ class FlaxSchedulerMixin(PushToHubMixin): ...@@ -102,9 +102,9 @@ 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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received files. Will attempt to resume the download if such a Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
file exists. 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.
......
...@@ -201,7 +201,7 @@ def get_cached_module_file( ...@@ -201,7 +201,7 @@ 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: 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,
...@@ -228,9 +228,9 @@ def get_cached_module_file( ...@@ -228,9 +228,9 @@ 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. exist. resume_download:
resume_download (`bool`, *optional*, defaults to `False`): Deprecated and ignored. All downloads are now resumed by default when possible. Will be removed in v1
Whether or not to delete incompletely received file. Attempts to resume the download if such a file exists. 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.
...@@ -380,7 +380,7 @@ def get_class_from_dynamic_module( ...@@ -380,7 +380,7 @@ 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: 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,
...@@ -417,8 +417,9 @@ def get_class_from_dynamic_module( ...@@ -417,8 +417,9 @@ 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 (`bool`, *optional*, defaults to `False`): resume_download:
Whether or not to delete incompletely received file. Attempts to resume the download if such a file exists. 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.
......
...@@ -283,7 +283,7 @@ def _get_model_file( ...@@ -283,7 +283,7 @@ 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: bool = False, 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,
......
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