We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b57bc3a commit c18e2ebCopy full SHA for c18e2eb
src/diffusers/loaders/lora_pipeline.py
@@ -25,6 +25,7 @@
25
deprecate,
26
get_adapter_name,
27
get_peft_kwargs,
28
+ is_peft_available,
29
is_peft_version,
30
is_torch_version,
31
is_transformers_available,
@@ -42,7 +43,12 @@
42
43
44
45
if is_torch_version(">=", "1.9.0"):
- if is_peft_version(">", "0.13.1") and is_transformers_version(">", "4.45.1"):
46
+ if (
47
+ is_peft_available()
48
+ and is_peft_version(">", "0.13.1")
49
+ and is_transformers_available()
50
+ and is_transformers_version(">", "4.45.1")
51
+ ):
52
_LOW_CPU_MEM_USAGE_DEFAULT_LORA = True
53
else:
54
_LOW_CPU_MEM_USAGE_DEFAULT_LORA = False
0 commit comments