From 3aef717ef454babefed60e4804809a9d48d75734 Mon Sep 17 00:00:00 2001 From: Ryan Dick Date: Wed, 12 Jun 2024 15:11:24 -0400 Subject: [PATCH] Fix typing of timesteps and init_timestep. --- invokeai/app/invocations/denoise_latents.py | 2 +- invokeai/backend/stable_diffusion/diffusers_pipeline.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/app/invocations/denoise_latents.py b/invokeai/app/invocations/denoise_latents.py index 31b2e9f379..31a186f1a6 100644 --- a/invokeai/app/invocations/denoise_latents.py +++ b/invokeai/app/invocations/denoise_latents.py @@ -601,7 +601,7 @@ class DenoiseLatentsInvocation(BaseInvocation): denoising_start: float, denoising_end: float, seed: int, - ) -> Tuple[List[int], int, Dict[str, Any]]: + ) -> Tuple[torch.Tensor, torch.Tensor, Dict[str, Any]]: assert isinstance(scheduler, ConfigMixin) if scheduler.config.get("cpu_only", False): scheduler.set_timesteps(steps, device="cpu") diff --git a/invokeai/backend/stable_diffusion/diffusers_pipeline.py b/invokeai/backend/stable_diffusion/diffusers_pipeline.py index b65aaffb8c..2fa7323950 100644 --- a/invokeai/backend/stable_diffusion/diffusers_pipeline.py +++ b/invokeai/backend/stable_diffusion/diffusers_pipeline.py @@ -360,7 +360,7 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline): def generate_latents_from_embeddings( self, latents: torch.Tensor, - timesteps, + timesteps: torch.Tensor, conditioning_data: TextConditioningData, scheduler_step_kwargs: dict[str, Any], callback: Callable[[PipelineIntermediateState], None],