Skip to content
Open
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
2 changes: 1 addition & 1 deletion examples/community/pipeline_demofusion_sdxl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ def save_lora_weights(
is_main_process: bool = True,
weight_name: str = None,
save_function: Callable = None,
safe_serialization: bool = True,
safe_serialization: bool = False,
):
state_dict = {}

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"filelock",
"flax>=0.4.1",
"hf-doc-builder>=0.3.0",
"huggingface-hub>=0.20.2",
"huggingface-hub==0.24.7",
"requests-mock==1.10.0",
"importlib_metadata",
"invisible-watermark>=0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/diffusers/loaders/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ def save_lora_weights(
is_main_process: bool = True,
weight_name: str = None,
save_function: Callable = None,
safe_serialization: bool = True,
safe_serialization: bool = False,
):
r"""
Save the LoRA parameters corresponding to the UNet and text encoder.
Expand Down Expand Up @@ -1485,7 +1485,7 @@ def save_lora_weights(
is_main_process: bool = True,
weight_name: str = None,
save_function: Callable = None,
safe_serialization: bool = True,
safe_serialization: bool = False,
):
r"""
Save the LoRA parameters corresponding to the UNet and text encoder.
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/loaders/unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def save_attn_procs(
is_main_process: bool = True,
weight_name: str = None,
save_function: Callable = None,
safe_serialization: bool = True,
safe_serialization: bool = False,
**kwargs,
):
r"""
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/models/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def save_pretrained(
save_directory: Union[str, os.PathLike],
is_main_process: bool = True,
save_function: Callable = None,
safe_serialization: bool = True,
safe_serialization: bool = False,
variant: Optional[str] = None,
):
"""
Expand Down
3 changes: 2 additions & 1 deletion src/diffusers/models/modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def save_pretrained(
save_directory: Union[str, os.PathLike],
is_main_process: bool = True,
save_function: Optional[Callable] = None,
safe_serialization: bool = True,
safe_serialization: bool = False,
variant: Optional[str] = None,
push_to_hub: bool = False,
**kwargs,
Expand Down Expand Up @@ -342,6 +342,7 @@ def save_pretrained(
kwargs (`Dict[str, Any]`, *optional*):
Additional keyword arguments passed along to the [`~utils.PushToHubMixin.push_to_hub`] method.
"""
assert safe_serialization == False, "Safe serialization is not supported now."
if os.path.isfile(save_directory):
logger.error(f"Provided path ({save_directory}) should be a directory, not a file")
return
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/models/unet_motion_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def save_motion_modules(
self,
save_directory: str,
is_main_process: bool = True,
safe_serialization: bool = True,
safe_serialization: bool = False,
variant: Optional[str] = None,
push_to_hub: bool = False,
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/pipelines/controlnet/multicontrolnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def save_pretrained(
save_directory: Union[str, os.PathLike],
is_main_process: bool = True,
save_function: Callable = None,
safe_serialization: bool = True,
safe_serialization: bool = False,
variant: Optional[str] = None,
):
"""
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/pipelines/pipeline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ def __setattr__(self, name: str, value: Any):
def save_pretrained(
self,
save_directory: Union[str, os.PathLike],
safe_serialization: bool = True,
safe_serialization: bool = False,
variant: Optional[str] = None,
push_to_hub: bool = False,
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion src/diffusers/utils/hub_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def push_to_hub(
private: Optional[bool] = None,
token: Optional[str] = None,
create_pr: bool = False,
safe_serialization: bool = True,
safe_serialization: bool = False,
variant: Optional[str] = None,
) -> str:
"""
Expand Down