From d136ae36c87b66cb6e53c30098d09cd307641588 Mon Sep 17 00:00:00 2001 From: yiyixuxu Date: Tue, 20 May 2025 18:11:05 +0200 Subject: [PATCH] update input for loop blocks, do not need to include intermediate --- .../stable_diffusion_xl/denoise.py | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/src/diffusers/modular_pipelines/stable_diffusion_xl/denoise.py b/src/diffusers/modular_pipelines/stable_diffusion_xl/denoise.py index b29920764a..bc567a6b03 100644 --- a/src/diffusers/modular_pipelines/stable_diffusion_xl/denoise.py +++ b/src/diffusers/modular_pipelines/stable_diffusion_xl/denoise.py @@ -68,18 +68,11 @@ class StableDiffusionXLDenoiseLoopBeforeDenoiser(PipelineBlock): ), ] - @property - def intermediates_outputs(self) -> List[OutputParam]: - return [OutputParam("scaled_latents", type_hint=torch.Tensor, description="The scaled latents input for denoiser")] - - - @torch.no_grad() def __call__(self, components: StableDiffusionXLModularLoader, block_state: BlockState, i: int, t: int): block_state.scaled_latents = components.scheduler.scale_model_input(block_state.latents, t) - return components, block_state # loop step (1): prepare latent input for denoiser (with inpainting) @@ -120,9 +113,6 @@ class StableDiffusionXLInpaintDenoiseLoopBeforeDenoiser(PipelineBlock): ), ] - @property - def intermediates_outputs(self) -> List[OutputParam]: - return [OutputParam("scaled_latents", type_hint=torch.Tensor, description="The scaled latents input for denoiser")] @staticmethod def check_inputs(components, block_state): @@ -187,12 +177,6 @@ class StableDiffusionXLDenoiseLoopDenoiser(PipelineBlock): @property def intermediates_inputs(self) -> List[str]: return [ - InputParam( - "scaled_latents", - required=True, - type_hint=torch.Tensor, - description="The prepared latents input to use for the denoiser. Can be generated in latent step within the denoise loop." - ), InputParam( "num_inference_steps", required=True, @@ -319,12 +303,6 @@ class StableDiffusionXLControlNetDenoiseLoopDenoiser(PipelineBlock): type_hint=List[float], description="The controlnet keep values to use for the denoising process. Can be generated in prepare_controlnet_inputs step." ), - InputParam( - "scaled_latents", - required=True, - type_hint=torch.Tensor, - description="The prepared latents input to use for the denoiser. Can be generated in latent step within the denoise loop." - ), InputParam( "timestep_cond", type_hint=Optional[torch.Tensor], @@ -492,12 +470,6 @@ class StableDiffusionXLDenoiseLoopAfterDenoiser(PipelineBlock): def intermediates_inputs(self) -> List[str]: return [ InputParam("generator"), - InputParam( - "latents", - required=True, - type_hint=torch.Tensor, - description="The initial latents to use for the denoising process. Can be generated in prepare_latent step." - ), ] @property