From 244c28859dbe5a33000422a66476f16dfdd4ff66 Mon Sep 17 00:00:00 2001 From: Ryan Dick Date: Wed, 12 Jun 2024 15:13:31 -0400 Subject: [PATCH] Fix typing of control_data to reflect that it can be None. --- invokeai/backend/stable_diffusion/diffusers_pipeline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invokeai/backend/stable_diffusion/diffusers_pipeline.py b/invokeai/backend/stable_diffusion/diffusers_pipeline.py index 2fa7323950..79b66bcd3f 100644 --- a/invokeai/backend/stable_diffusion/diffusers_pipeline.py +++ b/invokeai/backend/stable_diffusion/diffusers_pipeline.py @@ -290,7 +290,7 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline): timesteps: torch.Tensor, init_timestep: torch.Tensor, callback: Callable[[PipelineIntermediateState], None], - control_data: List[ControlNetData] = None, + control_data: list[ControlNetData] | None = None, ip_adapter_data: Optional[list[IPAdapterData]] = None, t2i_adapter_data: Optional[list[T2IAdapterData]] = None, mask: Optional[torch.Tensor] = None, @@ -365,7 +365,7 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline): scheduler_step_kwargs: dict[str, Any], callback: Callable[[PipelineIntermediateState], None], mask_guidance: AddsMaskGuidance | None = None, - control_data: List[ControlNetData] = None, + control_data: list[ControlNetData] | None = None, ip_adapter_data: Optional[list[IPAdapterData]] = None, t2i_adapter_data: Optional[list[T2IAdapterData]] = None, ) -> torch.Tensor: @@ -444,7 +444,7 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline): total_step_count: int, scheduler_step_kwargs: dict[str, Any], mask_guidance: AddsMaskGuidance | None = None, - control_data: List[ControlNetData] = None, + control_data: list[ControlNetData] | None = None, ip_adapter_data: Optional[list[IPAdapterData]] = None, t2i_adapter_data: Optional[list[T2IAdapterData]] = None, ):