File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,17 @@ def _process_lora(
343
343
else :
344
344
if is_peft_version ("<" , "0.9.0" ):
345
345
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
+
346
357
lora_config = LoraConfig (** lora_config_kwargs )
347
358
348
359
# adapter_name
Original file line number Diff line number Diff line change 29
29
from diffusers .utils import load_image
30
30
from diffusers .utils .import_utils import is_accelerate_available
31
31
from diffusers .utils .testing_utils import (
32
+ nightly ,
32
33
numpy_cosine_similarity_distance ,
33
34
require_peft_backend ,
34
35
require_torch_gpu ,
36
+ slow ,
35
37
torch_device ,
36
38
)
37
39
@@ -126,6 +128,8 @@ def test_modify_padding_mode(self):
126
128
pass
127
129
128
130
131
+ @slow
132
+ @nightly
129
133
@require_torch_gpu
130
134
@require_peft_backend
131
135
class LoraSD3IntegrationTests (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments