fix or silent pyright issues

This commit is contained in:
Cédric Deltheil 2024-01-10 11:45:19 +01:00 committed by Cédric Deltheil
parent 65f19d192f
commit 2b2b6740b7
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
from torch import Tensor, arange, device as Device
from torch import Generator, Tensor, arange, device as Device
from refiners.foundationals.latent_diffusion.schedulers.scheduler import Scheduler
@ -30,5 +30,5 @@ class DDPM(Scheduler):
timesteps = arange(start=0, end=self.num_inference_steps, step=1, device=self.device) * step_ratio
return timesteps.flip(0)
def __call__(self, x: Tensor, noise: Tensor, step: int) -> Tensor:
def __call__(self, x: Tensor, noise: Tensor, step: int, generator: Generator | None = None) -> Tensor:
raise NotImplementedError

View file

@ -64,7 +64,7 @@ def test_ddim_diffusers():
def test_euler_diffusers():
from diffusers import EulerDiscreteScheduler
from diffusers import EulerDiscreteScheduler # type: ignore
manual_seed(0)
diffusers_scheduler = EulerDiscreteScheduler(