Skip to content

typo in safetensors (safetenstors) #3976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions src/diffusers/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def load_attn_procs(self, pretrained_model_name_or_path_or_dict: Union[str, Dict

if use_safetensors and not is_safetensors_available():
raise ValueError(
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetenstors"
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetensors"
)

allow_pickle = False
Expand Down Expand Up @@ -589,7 +589,7 @@ def load_textual_inversion(

if use_safetensors and not is_safetensors_available():
raise ValueError(
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetenstors"
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetensors"
)

allow_pickle = False
Expand Down Expand Up @@ -806,7 +806,7 @@ def load_lora_weights(self, pretrained_model_name_or_path_or_dict: Union[str, Di

if use_safetensors and not is_safetensors_available():
raise ValueError(
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetenstors"
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetensors"
)

allow_pickle = False
Expand Down Expand Up @@ -1054,7 +1054,7 @@ def _load_text_encoder_attn_procs(

if use_safetensors and not is_safetensors_available():
raise ValueError(
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetenstors"
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetensors"
)

allow_pickle = False
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/models/modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P

if use_safetensors and not is_safetensors_available():
raise ValueError(
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetenstors"
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetensors"
)

allow_pickle = False
Expand Down
6 changes: 3 additions & 3 deletions src/diffusers/pipelines/pipeline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def variant_compatible_siblings(filenames, variant=None) -> Union[List[os.PathLi
transformers_index_format = r"\d{5}-of-\d{5}"

if variant is not None:
# `diffusion_pytorch_model.fp16.bin` as well as `model.fp16-00001-of-00002.safetenstors`
# `diffusion_pytorch_model.fp16.bin` as well as `model.fp16-00001-of-00002.safetensors`
variant_file_re = re.compile(
rf"({'|'.join(weight_prefixes)})\.({variant}|{variant}-{transformers_index_format})\.({'|'.join(weight_suffixs)})$"
)
Expand All @@ -213,7 +213,7 @@ def variant_compatible_siblings(filenames, variant=None) -> Union[List[os.PathLi
rf"({'|'.join(weight_prefixes)})\.({'|'.join(weight_suffixs)})\.index\.{variant}\.json$"
)

# `diffusion_pytorch_model.bin` as well as `model-00001-of-00002.safetenstors`
# `diffusion_pytorch_model.bin` as well as `model-00001-of-00002.safetensors`
non_variant_file_re = re.compile(
rf"({'|'.join(weight_prefixes)})(-{transformers_index_format})?\.({'|'.join(weight_suffixs)})$"
)
Expand Down Expand Up @@ -1168,7 +1168,7 @@ def download(cls, pretrained_model_name, **kwargs) -> Union[str, os.PathLike]:

if use_safetensors and not is_safetensors_available():
raise ValueError(
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetenstors"
"`use_safetensors`=True but safetensors is not installed. Please install safetensors with `pip install safetensors"
)

allow_pickle = False
Expand Down