Spaces:
Running
Running
fix pipeline load error.
Browse files- pipeline.py +2 -2
pipeline.py
CHANGED
@@ -893,6 +893,8 @@ class StableDiffusionControlLoraV3Pipeline(
|
|
893 |
num_condition_names = len(unet.extra_condition_names)
|
894 |
in_channels = unet.config.in_channels
|
895 |
|
|
|
|
|
896 |
if adapter_name is not None and adapter_name not in unet.extra_condition_names:
|
897 |
return super().load_lora_weights(pretrained_model_name_or_path_or_dict, adapter_name, **kwargs)
|
898 |
|
@@ -911,13 +913,11 @@ class StableDiffusionControlLoraV3Pipeline(
|
|
911 |
subfolder = _kwargs.pop("subfolder", None)
|
912 |
if isinstance(subfolder, list):
|
913 |
subfolder = subfolder[i]
|
914 |
-
weight_name = _kwargs.pop("weight_name", "pytorch_lora_weights.safetensors")
|
915 |
|
916 |
if not isinstance(pretrained_model_name_or_path_or_dict, dict):
|
917 |
pretrained_model_name_or_path_or_dict, _ = self.lora_state_dict(
|
918 |
pretrained_model_name_or_path_or_dict,
|
919 |
subfolder=subfolder,
|
920 |
-
weight_name=weight_name,
|
921 |
**_kwargs
|
922 |
)
|
923 |
|
|
|
893 |
num_condition_names = len(unet.extra_condition_names)
|
894 |
in_channels = unet.config.in_channels
|
895 |
|
896 |
+
kwargs["weight_name"] = kwargs.pop("weight_name", "pytorch_lora_weights.safetensors")
|
897 |
+
|
898 |
if adapter_name is not None and adapter_name not in unet.extra_condition_names:
|
899 |
return super().load_lora_weights(pretrained_model_name_or_path_or_dict, adapter_name, **kwargs)
|
900 |
|
|
|
913 |
subfolder = _kwargs.pop("subfolder", None)
|
914 |
if isinstance(subfolder, list):
|
915 |
subfolder = subfolder[i]
|
|
|
916 |
|
917 |
if not isinstance(pretrained_model_name_or_path_or_dict, dict):
|
918 |
pretrained_model_name_or_path_or_dict, _ = self.lora_state_dict(
|
919 |
pretrained_model_name_or_path_or_dict,
|
920 |
subfolder=subfolder,
|
|
|
921 |
**_kwargs
|
922 |
)
|
923 |
|