Skip to content

Commit be0b7f5

Browse files
authored
fix: for checking mandatory and optional pipeline components (#11189)
fix: optional componentes verification on load
1 parent 4d5a96e commit be0b7f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/pipelines/pipeline_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ def load_module(name, value):
998998
for module in missing_modules:
999999
init_kwargs[module] = passed_class_obj.get(module, None)
10001000
elif len(missing_modules) > 0:
1001-
passed_modules = set(list(init_kwargs.keys()) + list(passed_class_obj.keys())) - optional_kwargs
1001+
passed_modules = set(list(init_kwargs.keys()) + list(passed_class_obj.keys())) - set(optional_kwargs)
10021002
raise ValueError(
10031003
f"Pipeline {pipeline_class} expected {expected_modules}, but only {passed_modules} were passed."
10041004
)

0 commit comments

Comments
 (0)