@@ -452,7 +452,11 @@ def fuse_lora(
452
452
```
453
453
"""
454
454
super ().fuse_lora (
455
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
455
+ components = components ,
456
+ lora_scale = lora_scale ,
457
+ safe_fusing = safe_fusing ,
458
+ adapter_names = adapter_names ,
459
+ ** kwargs ,
456
460
)
457
461
458
462
def unfuse_lora (self , components : List [str ] = ["unet" , "text_encoder" ], ** kwargs ):
@@ -473,7 +477,7 @@ def unfuse_lora(self, components: List[str] = ["unet", "text_encoder"], **kwargs
473
477
Whether to unfuse the text encoder LoRA parameters. If the text encoder wasn't monkey-patched with the
474
478
LoRA parameters then it won't have any effect.
475
479
"""
476
- super ().unfuse_lora (components = components )
480
+ super ().unfuse_lora (components = components , ** kwargs )
477
481
478
482
479
483
class StableDiffusionXLLoraLoaderMixin (LoraBaseMixin ):
@@ -892,7 +896,11 @@ def fuse_lora(
892
896
```
893
897
"""
894
898
super ().fuse_lora (
895
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
899
+ components = components ,
900
+ lora_scale = lora_scale ,
901
+ safe_fusing = safe_fusing ,
902
+ adapter_names = adapter_names ,
903
+ ** kwargs ,
896
904
)
897
905
898
906
def unfuse_lora (self , components : List [str ] = ["unet" , "text_encoder" , "text_encoder_2" ], ** kwargs ):
@@ -913,7 +921,7 @@ def unfuse_lora(self, components: List[str] = ["unet", "text_encoder", "text_enc
913
921
Whether to unfuse the text encoder LoRA parameters. If the text encoder wasn't monkey-patched with the
914
922
LoRA parameters then it won't have any effect.
915
923
"""
916
- super ().unfuse_lora (components = components )
924
+ super ().unfuse_lora (components = components , ** kwargs )
917
925
918
926
919
927
class SD3LoraLoaderMixin (LoraBaseMixin ):
@@ -1291,7 +1299,11 @@ def fuse_lora(
1291
1299
```
1292
1300
"""
1293
1301
super ().fuse_lora (
1294
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
1302
+ components = components ,
1303
+ lora_scale = lora_scale ,
1304
+ safe_fusing = safe_fusing ,
1305
+ adapter_names = adapter_names ,
1306
+ ** kwargs ,
1295
1307
)
1296
1308
1297
1309
# Copied from diffusers.loaders.lora_pipeline.StableDiffusionXLLoraLoaderMixin.unfuse_lora with unet->transformer
@@ -1313,7 +1325,7 @@ def unfuse_lora(self, components: List[str] = ["transformer", "text_encoder", "t
1313
1325
Whether to unfuse the text encoder LoRA parameters. If the text encoder wasn't monkey-patched with the
1314
1326
LoRA parameters then it won't have any effect.
1315
1327
"""
1316
- super ().unfuse_lora (components = components )
1328
+ super ().unfuse_lora (components = components , ** kwargs )
1317
1329
1318
1330
1319
1331
class FluxLoraLoaderMixin (LoraBaseMixin ):
@@ -1829,7 +1841,11 @@ def fuse_lora(
1829
1841
)
1830
1842
1831
1843
super ().fuse_lora (
1832
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
1844
+ components = components ,
1845
+ lora_scale = lora_scale ,
1846
+ safe_fusing = safe_fusing ,
1847
+ adapter_names = adapter_names ,
1848
+ ** kwargs ,
1833
1849
)
1834
1850
1835
1851
def unfuse_lora (self , components : List [str ] = ["transformer" , "text_encoder" ], ** kwargs ):
@@ -1850,7 +1866,7 @@ def unfuse_lora(self, components: List[str] = ["transformer", "text_encoder"], *
1850
1866
if hasattr (transformer , "_transformer_norm_layers" ) and transformer ._transformer_norm_layers :
1851
1867
transformer .load_state_dict (transformer ._transformer_norm_layers , strict = False )
1852
1868
1853
- super ().unfuse_lora (components = components )
1869
+ super ().unfuse_lora (components = components , ** kwargs )
1854
1870
1855
1871
# We override this here account for `_transformer_norm_layers` and `_overwritten_params`.
1856
1872
def unload_lora_weights (self , reset_to_overwritten_params = False ):
@@ -2549,7 +2565,11 @@ def fuse_lora(
2549
2565
```
2550
2566
"""
2551
2567
super ().fuse_lora (
2552
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
2568
+ components = components ,
2569
+ lora_scale = lora_scale ,
2570
+ safe_fusing = safe_fusing ,
2571
+ adapter_names = adapter_names ,
2572
+ ** kwargs ,
2553
2573
)
2554
2574
2555
2575
def unfuse_lora (self , components : List [str ] = ["transformer" ], ** kwargs ):
@@ -2567,7 +2587,7 @@ def unfuse_lora(self, components: List[str] = ["transformer"], **kwargs):
2567
2587
components (`List[str]`): List of LoRA-injectable components to unfuse LoRA from.
2568
2588
unfuse_transformer (`bool`, defaults to `True`): Whether to unfuse the UNet LoRA parameters.
2569
2589
"""
2570
- super ().unfuse_lora (components = components )
2590
+ super ().unfuse_lora (components = components , ** kwargs )
2571
2591
2572
2592
2573
2593
class Mochi1LoraLoaderMixin (LoraBaseMixin ):
@@ -2853,7 +2873,11 @@ def fuse_lora(
2853
2873
```
2854
2874
"""
2855
2875
super ().fuse_lora (
2856
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
2876
+ components = components ,
2877
+ lora_scale = lora_scale ,
2878
+ safe_fusing = safe_fusing ,
2879
+ adapter_names = adapter_names ,
2880
+ ** kwargs ,
2857
2881
)
2858
2882
2859
2883
# Copied from diffusers.loaders.lora_pipeline.CogVideoXLoraLoaderMixin.unfuse_lora
@@ -2872,7 +2896,7 @@ def unfuse_lora(self, components: List[str] = ["transformer"], **kwargs):
2872
2896
components (`List[str]`): List of LoRA-injectable components to unfuse LoRA from.
2873
2897
unfuse_transformer (`bool`, defaults to `True`): Whether to unfuse the UNet LoRA parameters.
2874
2898
"""
2875
- super ().unfuse_lora (components = components )
2899
+ super ().unfuse_lora (components = components , ** kwargs )
2876
2900
2877
2901
2878
2902
class LTXVideoLoraLoaderMixin (LoraBaseMixin ):
@@ -3158,7 +3182,11 @@ def fuse_lora(
3158
3182
```
3159
3183
"""
3160
3184
super ().fuse_lora (
3161
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
3185
+ components = components ,
3186
+ lora_scale = lora_scale ,
3187
+ safe_fusing = safe_fusing ,
3188
+ adapter_names = adapter_names ,
3189
+ ** kwargs ,
3162
3190
)
3163
3191
3164
3192
# Copied from diffusers.loaders.lora_pipeline.CogVideoXLoraLoaderMixin.unfuse_lora
@@ -3177,7 +3205,7 @@ def unfuse_lora(self, components: List[str] = ["transformer"], **kwargs):
3177
3205
components (`List[str]`): List of LoRA-injectable components to unfuse LoRA from.
3178
3206
unfuse_transformer (`bool`, defaults to `True`): Whether to unfuse the UNet LoRA parameters.
3179
3207
"""
3180
- super ().unfuse_lora (components = components )
3208
+ super ().unfuse_lora (components = components , ** kwargs )
3181
3209
3182
3210
3183
3211
class SanaLoraLoaderMixin (LoraBaseMixin ):
@@ -3463,7 +3491,11 @@ def fuse_lora(
3463
3491
```
3464
3492
"""
3465
3493
super ().fuse_lora (
3466
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
3494
+ components = components ,
3495
+ lora_scale = lora_scale ,
3496
+ safe_fusing = safe_fusing ,
3497
+ adapter_names = adapter_names ,
3498
+ ** kwargs ,
3467
3499
)
3468
3500
3469
3501
# Copied from diffusers.loaders.lora_pipeline.CogVideoXLoraLoaderMixin.unfuse_lora
@@ -3482,7 +3514,7 @@ def unfuse_lora(self, components: List[str] = ["transformer"], **kwargs):
3482
3514
components (`List[str]`): List of LoRA-injectable components to unfuse LoRA from.
3483
3515
unfuse_transformer (`bool`, defaults to `True`): Whether to unfuse the UNet LoRA parameters.
3484
3516
"""
3485
- super ().unfuse_lora (components = components )
3517
+ super ().unfuse_lora (components = components , ** kwargs )
3486
3518
3487
3519
3488
3520
class HunyuanVideoLoraLoaderMixin (LoraBaseMixin ):
@@ -3771,7 +3803,11 @@ def fuse_lora(
3771
3803
```
3772
3804
"""
3773
3805
super ().fuse_lora (
3774
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
3806
+ components = components ,
3807
+ lora_scale = lora_scale ,
3808
+ safe_fusing = safe_fusing ,
3809
+ adapter_names = adapter_names ,
3810
+ ** kwargs ,
3775
3811
)
3776
3812
3777
3813
# Copied from diffusers.loaders.lora_pipeline.CogVideoXLoraLoaderMixin.unfuse_lora
@@ -3790,7 +3826,7 @@ def unfuse_lora(self, components: List[str] = ["transformer"], **kwargs):
3790
3826
components (`List[str]`): List of LoRA-injectable components to unfuse LoRA from.
3791
3827
unfuse_transformer (`bool`, defaults to `True`): Whether to unfuse the UNet LoRA parameters.
3792
3828
"""
3793
- super ().unfuse_lora (components = components )
3829
+ super ().unfuse_lora (components = components , ** kwargs )
3794
3830
3795
3831
3796
3832
class Lumina2LoraLoaderMixin (LoraBaseMixin ):
@@ -4080,7 +4116,11 @@ def fuse_lora(
4080
4116
```
4081
4117
"""
4082
4118
super ().fuse_lora (
4083
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
4119
+ components = components ,
4120
+ lora_scale = lora_scale ,
4121
+ safe_fusing = safe_fusing ,
4122
+ adapter_names = adapter_names ,
4123
+ ** kwargs ,
4084
4124
)
4085
4125
4086
4126
# Copied from diffusers.loaders.lora_pipeline.SanaLoraLoaderMixin.unfuse_lora
@@ -4099,7 +4139,7 @@ def unfuse_lora(self, components: List[str] = ["transformer"], **kwargs):
4099
4139
components (`List[str]`): List of LoRA-injectable components to unfuse LoRA from.
4100
4140
unfuse_transformer (`bool`, defaults to `True`): Whether to unfuse the UNet LoRA parameters.
4101
4141
"""
4102
- super ().unfuse_lora (components = components )
4142
+ super ().unfuse_lora (components = components , ** kwargs )
4103
4143
4104
4144
4105
4145
class WanLoraLoaderMixin (LoraBaseMixin ):
@@ -4386,7 +4426,11 @@ def fuse_lora(
4386
4426
```
4387
4427
"""
4388
4428
super ().fuse_lora (
4389
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
4429
+ components = components ,
4430
+ lora_scale = lora_scale ,
4431
+ safe_fusing = safe_fusing ,
4432
+ adapter_names = adapter_names ,
4433
+ ** kwargs ,
4390
4434
)
4391
4435
4392
4436
# Copied from diffusers.loaders.lora_pipeline.CogVideoXLoraLoaderMixin.unfuse_lora
@@ -4405,7 +4449,7 @@ def unfuse_lora(self, components: List[str] = ["transformer"], **kwargs):
4405
4449
components (`List[str]`): List of LoRA-injectable components to unfuse LoRA from.
4406
4450
unfuse_transformer (`bool`, defaults to `True`): Whether to unfuse the UNet LoRA parameters.
4407
4451
"""
4408
- super ().unfuse_lora (components = components )
4452
+ super ().unfuse_lora (components = components , ** kwargs )
4409
4453
4410
4454
4411
4455
class CogView4LoraLoaderMixin (LoraBaseMixin ):
@@ -4691,7 +4735,11 @@ def fuse_lora(
4691
4735
```
4692
4736
"""
4693
4737
super ().fuse_lora (
4694
- components = components , lora_scale = lora_scale , safe_fusing = safe_fusing , adapter_names = adapter_names
4738
+ components = components ,
4739
+ lora_scale = lora_scale ,
4740
+ safe_fusing = safe_fusing ,
4741
+ adapter_names = adapter_names ,
4742
+ ** kwargs ,
4695
4743
)
4696
4744
4697
4745
# Copied from diffusers.loaders.lora_pipeline.CogVideoXLoraLoaderMixin.unfuse_lora
@@ -4710,7 +4758,7 @@ def unfuse_lora(self, components: List[str] = ["transformer"], **kwargs):
4710
4758
components (`List[str]`): List of LoRA-injectable components to unfuse LoRA from.
4711
4759
unfuse_transformer (`bool`, defaults to `True`): Whether to unfuse the UNet LoRA parameters.
4712
4760
"""
4713
- super ().unfuse_lora (components = components )
4761
+ super ().unfuse_lora (components = components , ** kwargs )
4714
4762
4715
4763
4716
4764
class LoraLoaderMixin (StableDiffusionLoraLoaderMixin ):
0 commit comments