Skip to content

Commit 00a4788

Browse files
committed
add
1 parent 04f9d2b commit 00a4788

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/diffusers/modular_pipelines/modular_pipeline.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,10 @@ def __init__(self):
861861
else:
862862
sub_blocks[block_name] = block
863863
self.sub_blocks = sub_blocks
864+
if not len(self.block_names) == len(self.block_classes):
865+
raise ValueError(
866+
f"In {self.__class__.__name__}, the number of block_names and block_classes must be the same."
867+
)
864868

865869
def _get_inputs(self):
866870
inputs = []

0 commit comments

Comments
 (0)