Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/diffusers/modular_pipelines/modular_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,10 @@ def __init__(self):
else:
sub_blocks[block_name] = block
self.sub_blocks = sub_blocks
if not len(self.block_names) == len(self.block_classes):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a check here, we had a similar check to autopipeline blocks, which I got this error message a couple times already so it's helpful

raise ValueError(
f"In {self.__class__.__name__}, the number of block_names and block_classes must be the same."
)

def _get_inputs(self):
inputs = []
Expand Down
3 changes: 1 addition & 2 deletions src/diffusers/modular_pipelines/qwenimage/modular_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ class QwenImageCoreDenoiseStep(SequentialPipelineBlocks):
QwenImageOptionalControlNetBeforeDenoiseStep,
QwenImageAutoDenoiseStep,
]
block_names = ["input", "controlnet_input", "before_denoise", "controlnet_before_denoise", "denoise", "decode"]
block_names = ["input", "controlnet_input", "before_denoise", "controlnet_before_denoise", "denoise"]

@property
def description(self):
Expand All @@ -534,7 +534,6 @@ def description(self):
+ " - `QwenImageAutoBeforeDenoiseStep` (before_denoise) prepares the inputs for the denoising step.\n"
+ " - `QwenImageOptionalControlNetBeforeDenoiseStep` (controlnet_before_denoise) prepares the controlnet input for the denoising step.\n"
+ " - `QwenImageAutoDenoiseStep` (denoise) iteratively denoises the latents.\n"
+ " - `QwenImageAutoDecodeStep` (decode) decodes the latents into images.\n\n"
+ "This step support text-to-image, image-to-image, inpainting, and controlnet tasks for QwenImage:\n"
+ " - for image-to-image generation, you need to provide `image_latents`\n"
+ " - for inpainting, you need to provide `processed_mask_image` and `image_latents`\n"
Expand Down
Loading