Skip to content

Commit 7f582ca

Browse files
committed
more detailed warning message + shift to debug
1 parent 651b807 commit 7f582ca

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/diffusers/utils/peft_utils.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,13 @@ def get_peft_kwargs(
201201
exclude_modules = _derive_exclude_modules(model_state_dict, peft_state_dict, adapter_name)
202202
if exclude_modules:
203203
if not is_peft_version(">=", "0.14.0"):
204-
msg = "It seems like there are certain modules that need to be excluded when initializing `LoraConfig`. Your current `peft` version doesn't support passing an `exclude_modules` to `LoraConfig`. Please update it by running `pip install -U peft`."
205-
logger.warning(msg)
204+
msg = """
205+
It seems like there are certain modules that need to be excluded when initializing `LoraConfig`. Your current `peft`
206+
version doesn't support passing an `exclude_modules` to `LoraConfig`. Please update it by running `pip install -U
207+
peft`. For most cases, this can be completely ignored. But if it seems unexpected, please file an issue -
208+
https://github.com/huggingface/diffusers/issues/new
209+
"""
210+
logger.debug(msg)
206211
else:
207212
lora_config_kwargs.update({"exclude_modules": exclude_modules})
208213

0 commit comments

Comments
 (0)