Skip to content

Commit

Permalink
i REQUIRE caffeine
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe56f committed Oct 10, 2023
1 parent fa7752f commit 3df273d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/inference/ait/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def do_denoise(x, t, call: Callable) -> torch.Tensor:
latent_model_input = (
torch.cat([x] * 2) if do_classifier_free_guidance else x
)
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t).half() # type: ignore
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t) # type: ignore

# predict the noise residual
if self.controlnet is not None and ctrl_image is not None:
Expand Down Expand Up @@ -406,7 +406,7 @@ def do_denoise(x, t, call: Callable) -> torch.Tensor:
noise_pred_text - noise_pred_uncond
)

if isinstance(self.scheduler, KdiffusionSchedulerAdapter):
if not isinstance(self.scheduler, KdiffusionSchedulerAdapter):
x = self.scheduler.step(
noise_pred, t, x, **extra_step_kwargs, return_dict=False # type: ignore
)[0]
Expand All @@ -415,7 +415,7 @@ def do_denoise(x, t, call: Callable) -> torch.Tensor:
return x

if isinstance(self.scheduler, KdiffusionSchedulerAdapter):
self.scheduler.do_inference(
latents = self.scheduler.do_inference(
latents, # type: ignore
generator=generator,
call=self.unet_inference,
Expand Down

0 comments on commit 3df273d

Please sign in to comment.