"docs/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "38c5b10f4748bd64dbd3b6716196996dd0247596"
Unverified Commit 1fbcc78d authored by Yorai Levi's avatar Yorai Levi Committed by GitHub
Browse files

typo in safetensors (safetenstors) (#3976)

* Update pipeline_utils.py

typo in safetensors (safetenstors)

* Update loaders.py

typo in safetensors (safetenstors)

* Update modeling_utils.py

typo in safetensors (safetenstors)
parent 51593da2
...@@ -177,7 +177,7 @@ class UNet2DConditionLoadersMixin: ...@@ -177,7 +177,7 @@ class UNet2DConditionLoadersMixin:
if use_safetensors and not is_safetensors_available(): if use_safetensors and not is_safetensors_available():
raise ValueError( 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 allow_pickle = False
...@@ -589,7 +589,7 @@ class TextualInversionLoaderMixin: ...@@ -589,7 +589,7 @@ class TextualInversionLoaderMixin:
if use_safetensors and not is_safetensors_available(): if use_safetensors and not is_safetensors_available():
raise ValueError( 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 allow_pickle = False
...@@ -806,7 +806,7 @@ class LoraLoaderMixin: ...@@ -806,7 +806,7 @@ class LoraLoaderMixin:
if use_safetensors and not is_safetensors_available(): if use_safetensors and not is_safetensors_available():
raise ValueError( 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 allow_pickle = False
...@@ -1054,7 +1054,7 @@ class LoraLoaderMixin: ...@@ -1054,7 +1054,7 @@ class LoraLoaderMixin:
if use_safetensors and not is_safetensors_available(): if use_safetensors and not is_safetensors_available():
raise ValueError( 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 allow_pickle = False
......
...@@ -456,7 +456,7 @@ class ModelMixin(torch.nn.Module): ...@@ -456,7 +456,7 @@ class ModelMixin(torch.nn.Module):
if use_safetensors and not is_safetensors_available(): if use_safetensors and not is_safetensors_available():
raise ValueError( 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 allow_pickle = False
......
...@@ -204,7 +204,7 @@ def variant_compatible_siblings(filenames, variant=None) -> Union[List[os.PathLi ...@@ -204,7 +204,7 @@ def variant_compatible_siblings(filenames, variant=None) -> Union[List[os.PathLi
transformers_index_format = r"\d{5}-of-\d{5}" transformers_index_format = r"\d{5}-of-\d{5}"
if variant is not None: 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( variant_file_re = re.compile(
rf"({'|'.join(weight_prefixes)})\.({variant}|{variant}-{transformers_index_format})\.({'|'.join(weight_suffixs)})$" rf"({'|'.join(weight_prefixes)})\.({variant}|{variant}-{transformers_index_format})\.({'|'.join(weight_suffixs)})$"
) )
...@@ -213,7 +213,7 @@ def variant_compatible_siblings(filenames, variant=None) -> Union[List[os.PathLi ...@@ -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$" 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( non_variant_file_re = re.compile(
rf"({'|'.join(weight_prefixes)})(-{transformers_index_format})?\.({'|'.join(weight_suffixs)})$" rf"({'|'.join(weight_prefixes)})(-{transformers_index_format})?\.({'|'.join(weight_suffixs)})$"
) )
...@@ -1168,7 +1168,7 @@ class DiffusionPipeline(ConfigMixin): ...@@ -1168,7 +1168,7 @@ class DiffusionPipeline(ConfigMixin):
if use_safetensors and not is_safetensors_available(): if use_safetensors and not is_safetensors_available():
raise ValueError( 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 allow_pickle = False
......
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