Skip to content

Commit 651b807

Browse files
committed
describe the test
1 parent eb8d78a commit 651b807

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/lora/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,6 +2325,14 @@ def test_lora_adapter_metadata_save_load_inference(self, lora_alpha):
23252325

23262326
@require_peft_version_greater("0.13.2")
23272327
def test_lora_exclude_modules(self):
2328+
"""
2329+
Test to check if `exclude_modules` works or not. It works in the following way:
2330+
we first create a pipeline and insert LoRA config into it. We then derive a `set`
2331+
of modules to exclude by investigating its denoiser state dict and denoiser LoRA
2332+
state dict.
2333+
2334+
We then create a new LoRA config to include the `exclude_modules` and perform tests.
2335+
"""
23282336
scheduler_cls = self.scheduler_classes[0]
23292337
components, text_lora_config, denoiser_lora_config = self.get_dummy_components(scheduler_cls)
23302338
pipe = self.pipeline_class(**components).to(torch_device)

0 commit comments

Comments
 (0)