From 00a4788ce48694ba9ec4a72ae92085e98ced475d Mon Sep 17 00:00:00 2001 From: yiyixuxu Date: Tue, 11 Nov 2025 05:58:54 +0100 Subject: [PATCH 1/2] add --- src/diffusers/modular_pipelines/modular_pipeline.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/diffusers/modular_pipelines/modular_pipeline.py b/src/diffusers/modular_pipelines/modular_pipeline.py index 307698245e5b..2af9424092db 100644 --- a/src/diffusers/modular_pipelines/modular_pipeline.py +++ b/src/diffusers/modular_pipelines/modular_pipeline.py @@ -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): + raise ValueError( + f"In {self.__class__.__name__}, the number of block_names and block_classes must be the same." + ) def _get_inputs(self): inputs = [] From 014be3aa61b19da65fa648788da7ccfb63d6d59f Mon Sep 17 00:00:00 2001 From: yiyixuxu Date: Wed, 12 Nov 2025 06:28:22 +0100 Subject: [PATCH 2/2] fix --- src/diffusers/modular_pipelines/qwenimage/modular_blocks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/diffusers/modular_pipelines/qwenimage/modular_blocks.py b/src/diffusers/modular_pipelines/qwenimage/modular_blocks.py index 83bfcb3da4fd..419894164389 100644 --- a/src/diffusers/modular_pipelines/qwenimage/modular_blocks.py +++ b/src/diffusers/modular_pipelines/qwenimage/modular_blocks.py @@ -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): @@ -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"