mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-29 07:22:12 +03:00
update input for loop blocks, do not need to include intermediate
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user