File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,17 @@ def _process_lora(
343343 else :
344344 if is_peft_version ("<" , "0.9.0" ):
345345 lora_config_kwargs .pop ("use_dora" )
346+
347+ if "lora_bias" in lora_config_kwargs :
348+ if lora_config_kwargs ["lora_bias" ]:
349+ if is_peft_version ("<=" , "0.13.2" ):
350+ raise ValueError (
351+ "You need `peft` 0.14.0 at least to use `bias` in LoRAs. Please upgrade your installation of `peft`."
352+ )
353+ else :
354+ if is_peft_version ("<=" , "0.13.2" ):
355+ lora_config_kwargs .pop ("lora_bias" )
356+
346357 lora_config = LoraConfig (** lora_config_kwargs )
347358
348359 # adapter_name
Original file line number Diff line number Diff line change 2929from diffusers .utils import load_image
3030from diffusers .utils .import_utils import is_accelerate_available
3131from diffusers .utils .testing_utils import (
32+ nightly ,
3233 numpy_cosine_similarity_distance ,
3334 require_peft_backend ,
3435 require_torch_gpu ,
36+ slow ,
3537 torch_device ,
3638)
3739
@@ -126,6 +128,8 @@ def test_modify_padding_mode(self):
126128 pass
127129
128130
131+ @slow
132+ @nightly
129133@require_torch_gpu
130134@require_peft_backend
131135class LoraSD3IntegrationTests (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments