Unverified Commit f8d4a1e2 authored by johannaSommer's avatar johannaSommer Committed by GitHub
Browse files

fix: remove `torch_dtype="auto"` option from docstrings (#11513)


Co-authored-by: default avatarDhruv Nair <dhruv.nair@gmail.com>
parent ddd0cfb4
...@@ -187,9 +187,8 @@ class FromOriginalModelMixin: ...@@ -187,9 +187,8 @@ class FromOriginalModelMixin:
original_config (`str`, *optional*): original_config (`str`, *optional*):
Dict or path to a yaml file containing the configuration for the model in its original format. Dict or path to a yaml file containing the configuration for the model in its original format.
If a dict is provided, it will be used to initialize the model configuration. If a dict is provided, it will be used to initialize the model configuration.
torch_dtype (`str` or `torch.dtype`, *optional*): torch_dtype (`torch.dtype`, *optional*):
Override the default `torch.dtype` and load the model with another dtype. If `"auto"` is passed, the Override the default `torch.dtype` and load the model with another dtype.
dtype is automatically derived from the model's weights.
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.
......
...@@ -161,9 +161,8 @@ class MultiAdapter(ModelMixin): ...@@ -161,9 +161,8 @@ class MultiAdapter(ModelMixin):
pretrained_model_path (`os.PathLike`): pretrained_model_path (`os.PathLike`):
A path to a *directory* containing model weights saved using A path to a *directory* containing model weights saved using
[`~diffusers.models.adapter.MultiAdapter.save_pretrained`], e.g., `./my_model_directory/adapter`. [`~diffusers.models.adapter.MultiAdapter.save_pretrained`], e.g., `./my_model_directory/adapter`.
torch_dtype (`str` or `torch.dtype`, *optional*): torch_dtype (`torch.dtype`, *optional*):
Override the default `torch.dtype` and load the model under this dtype. If `"auto"` is passed the dtype Override the default `torch.dtype` and load the model under this dtype.
will be automatically derived from the model's weights.
output_loading_info(`bool`, *optional*, defaults to `False`): output_loading_info(`bool`, *optional*, defaults to `False`):
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages. Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.
device_map (`str` or `Dict[str, Union[int, str, torch.device]]`, *optional*): device_map (`str` or `Dict[str, Union[int, str, torch.device]]`, *optional*):
......
...@@ -52,9 +52,8 @@ class AutoModel(ConfigMixin): ...@@ -52,9 +52,8 @@ class AutoModel(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.
torch_dtype (`str` or `torch.dtype`, *optional*): torch_dtype (`torch.dtype`, *optional*):
Override the default `torch.dtype` and load the model with another dtype. If `"auto"` is passed, the Override the default `torch.dtype` and load the model with another dtype.
dtype is automatically derived from the model's weights.
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.
......
...@@ -130,9 +130,8 @@ class MultiControlNetModel(ModelMixin): ...@@ -130,9 +130,8 @@ class MultiControlNetModel(ModelMixin):
A path to a *directory* containing model weights saved using A path to a *directory* containing model weights saved using
[`~models.controlnets.multicontrolnet.MultiControlNetModel.save_pretrained`], e.g., [`~models.controlnets.multicontrolnet.MultiControlNetModel.save_pretrained`], e.g.,
`./my_model_directory/controlnet`. `./my_model_directory/controlnet`.
torch_dtype (`str` or `torch.dtype`, *optional*): torch_dtype (`torch.dtype`, *optional*):
Override the default `torch.dtype` and load the model under this dtype. If `"auto"` is passed the dtype Override the default `torch.dtype` and load the model under this dtype.
will be automatically derived from the model's weights.
output_loading_info(`bool`, *optional*, defaults to `False`): output_loading_info(`bool`, *optional*, defaults to `False`):
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages. Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.
device_map (`str` or `Dict[str, Union[int, str, torch.device]]`, *optional*): device_map (`str` or `Dict[str, Union[int, str, torch.device]]`, *optional*):
......
...@@ -143,9 +143,8 @@ class MultiControlNetUnionModel(ModelMixin): ...@@ -143,9 +143,8 @@ class MultiControlNetUnionModel(ModelMixin):
A path to a *directory* containing model weights saved using A path to a *directory* containing model weights saved using
[`~models.controlnets.multicontrolnet.MultiControlNetUnionModel.save_pretrained`], e.g., [`~models.controlnets.multicontrolnet.MultiControlNetUnionModel.save_pretrained`], e.g.,
`./my_model_directory/controlnet`. `./my_model_directory/controlnet`.
torch_dtype (`str` or `torch.dtype`, *optional*): torch_dtype (`torch.dtype`, *optional*):
Override the default `torch.dtype` and load the model under this dtype. If `"auto"` is passed the dtype Override the default `torch.dtype` and load the model under this dtype.
will be automatically derived from the model's weights.
output_loading_info(`bool`, *optional*, defaults to `False`): output_loading_info(`bool`, *optional*, defaults to `False`):
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages. Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.
device_map (`str` or `Dict[str, Union[int, str, torch.device]]`, *optional*): device_map (`str` or `Dict[str, Union[int, str, torch.device]]`, *optional*):
......
...@@ -787,9 +787,8 @@ class ModelMixin(torch.nn.Module, PushToHubMixin): ...@@ -787,9 +787,8 @@ class ModelMixin(torch.nn.Module, 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.
torch_dtype (`str` or `torch.dtype`, *optional*): torch_dtype (`torch.dtype`, *optional*):
Override the default `torch.dtype` and load the model with another dtype. If `"auto"` is passed, the Override the default `torch.dtype` and load the model with another dtype.
dtype is automatically derived from the model's weights.
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.
......
...@@ -322,9 +322,8 @@ class AutoPipelineForText2Image(ConfigMixin): ...@@ -322,9 +322,8 @@ class AutoPipelineForText2Image(ConfigMixin):
- A path to a *directory* (for example `./my_pipeline_directory/`) containing pipeline weights - A path to a *directory* (for example `./my_pipeline_directory/`) containing pipeline weights
saved using saved using
[`~DiffusionPipeline.save_pretrained`]. [`~DiffusionPipeline.save_pretrained`].
torch_dtype (`str` or `torch.dtype`, *optional*): torch_dtype (`torch.dtype`, *optional*):
Override the default `torch.dtype` and load the model with another dtype. If "auto" is passed, the Override the default `torch.dtype` and load the model with another dtype.
dtype is automatically derived from the model's weights.
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.
...@@ -619,8 +618,7 @@ class AutoPipelineForImage2Image(ConfigMixin): ...@@ -619,8 +618,7 @@ class AutoPipelineForImage2Image(ConfigMixin):
saved using saved using
[`~DiffusionPipeline.save_pretrained`]. [`~DiffusionPipeline.save_pretrained`].
torch_dtype (`str` or `torch.dtype`, *optional*): torch_dtype (`str` or `torch.dtype`, *optional*):
Override the default `torch.dtype` and load the model with another dtype. If "auto" is passed, the Override the default `torch.dtype` and load the model with another dtype.
dtype is automatically derived from the model's weights.
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.
...@@ -930,8 +928,7 @@ class AutoPipelineForInpainting(ConfigMixin): ...@@ -930,8 +928,7 @@ class AutoPipelineForInpainting(ConfigMixin):
saved using saved using
[`~DiffusionPipeline.save_pretrained`]. [`~DiffusionPipeline.save_pretrained`].
torch_dtype (`str` or `torch.dtype`, *optional*): torch_dtype (`str` or `torch.dtype`, *optional*):
Override the default `torch.dtype` and load the model with another dtype. If "auto" is passed, the Override the default `torch.dtype` and load the model with another dtype.
dtype is automatically derived from the model's weights.
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.
......
...@@ -248,9 +248,8 @@ class FlaxDiffusionPipeline(ConfigMixin, PushToHubMixin): ...@@ -248,9 +248,8 @@ class FlaxDiffusionPipeline(ConfigMixin, PushToHubMixin):
pretrained pipeline hosted on the Hub. pretrained pipeline hosted on the Hub.
- A path to a *directory* (for example `./my_model_directory`) containing the model weights saved - A path to a *directory* (for example `./my_model_directory`) containing the model weights saved
using [`~FlaxDiffusionPipeline.save_pretrained`]. using [`~FlaxDiffusionPipeline.save_pretrained`].
dtype (`str` or `jnp.dtype`, *optional*): dtype (`jnp.dtype`, *optional*):
Override the default `jnp.dtype` and load the model under this dtype. If `"auto"`, the dtype is Override the default `jnp.dtype` and load the model under this dtype.
automatically derived from the model's weights.
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.
......
...@@ -573,12 +573,12 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin): ...@@ -573,12 +573,12 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
saved using saved using
[`~DiffusionPipeline.save_pretrained`]. [`~DiffusionPipeline.save_pretrained`].
- A path to a *directory* (for example `./my_pipeline_directory/`) containing a dduf file - A path to a *directory* (for example `./my_pipeline_directory/`) containing a dduf file
torch_dtype (`str` or `torch.dtype` or `dict[str, Union[str, torch.dtype]]`, *optional*): torch_dtype (`torch.dtype` or `dict[str, Union[str, torch.dtype]]`, *optional*):
Override the default `torch.dtype` and load the model with another dtype. If "auto" is passed, the Override the default `torch.dtype` and load the model with another dtype. To load submodels with
dtype is automatically derived from the model's weights. To load submodels with different dtype pass a different dtype pass a `dict` (for example `{'transformer': torch.bfloat16, 'vae': torch.float16}`).
`dict` (for example `{'transformer': torch.bfloat16, 'vae': torch.float16}`). Set the default dtype for Set the default dtype for unspecified components with `default` (for example `{'transformer':
unspecified components with `default` (for example `{'transformer': torch.bfloat16, 'default': torch.bfloat16, 'default': torch.float16}`). If a component is not specified and no default is set,
torch.float16}`). If a component is not specified and no default is set, `torch.float32` is used. `torch.float32` is used.
custom_pipeline (`str`, *optional*): custom_pipeline (`str`, *optional*):
<Tip warning={true}> <Tip warning={true}>
......
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