Skip to content

Commit 47ef802

Browse files
committed
sort
1 parent 2714043 commit 47ef802

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/diffusers/loaders/lora_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def set_adapters(
522522
components_passed = set(adapter_weights.keys())
523523
lora_components = set(self._lora_loadable_modules)
524524

525-
invalid_components = components_passed - lora_components
525+
invalid_components = sorted(components_passed - lora_components)
526526
if invalid_components:
527527
raise ValueError(
528528
f"The following components in `adapter_weights` are not part of the pipeline: {invalid_components}. "

tests/lora/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ def test_multiple_wrong_adapter_name_raises_error(self):
11361136
with self.assertRaises(ValueError) as err_context:
11371137
pipe.set_adapters("adapter-1", adapter_weights=scale_with_wrong_components)
11381138

1139-
wrong_components = set(scale_with_wrong_components.keys())
1139+
wrong_components = sorted(set(scale_with_wrong_components.keys()))
11401140
msg = f"The following components in `adapter_weights` are not part of the pipeline: {wrong_components}"
11411141
self.assertTrue(msg in str(err_context.exception))
11421142

0 commit comments

Comments
 (0)