mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-21 21:58:47 +00:00
ruff fix
This commit is contained in:
parent
ad143b0867
commit
65f19d192f
|
@ -1,7 +1,7 @@
|
||||||
from refiners.foundationals.latent_diffusion.schedulers.ddim import DDIM
|
from refiners.foundationals.latent_diffusion.schedulers.ddim import DDIM
|
||||||
from refiners.foundationals.latent_diffusion.schedulers.ddpm import DDPM
|
from refiners.foundationals.latent_diffusion.schedulers.ddpm import DDPM
|
||||||
from refiners.foundationals.latent_diffusion.schedulers.dpm_solver import DPMSolver
|
from refiners.foundationals.latent_diffusion.schedulers.dpm_solver import DPMSolver
|
||||||
from refiners.foundationals.latent_diffusion.schedulers.scheduler import Scheduler
|
|
||||||
from refiners.foundationals.latent_diffusion.schedulers.euler import EulerScheduler
|
from refiners.foundationals.latent_diffusion.schedulers.euler import EulerScheduler
|
||||||
|
from refiners.foundationals.latent_diffusion.schedulers.scheduler import Scheduler
|
||||||
|
|
||||||
__all__ = ["Scheduler", "DPMSolver", "DDPM", "DDIM", "EulerScheduler"]
|
__all__ = ["Scheduler", "DPMSolver", "DDPM", "DDIM", "EulerScheduler"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from torch import Tensor, arange, device as Device, dtype as Dtype, float32, sqrt, tensor, Generator
|
from torch import Generator, Tensor, arange, device as Device, dtype as Dtype, float32, sqrt, tensor
|
||||||
|
|
||||||
from refiners.foundationals.latent_diffusion.schedulers.scheduler import NoiseSchedule, Scheduler
|
from refiners.foundationals.latent_diffusion.schedulers.scheduler import NoiseSchedule, Scheduler
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
from refiners.foundationals.latent_diffusion.schedulers.scheduler import NoiseSchedule, Scheduler
|
|
||||||
import numpy as np
|
|
||||||
from torch import Tensor, device as Device, tensor, exp, float32, dtype as Dtype, Generator
|
|
||||||
from collections import deque
|
from collections import deque
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
from torch import Generator, Tensor, device as Device, dtype as Dtype, exp, float32, tensor
|
||||||
|
|
||||||
|
from refiners.foundationals.latent_diffusion.schedulers.scheduler import NoiseSchedule, Scheduler
|
||||||
|
|
||||||
|
|
||||||
class DPMSolver(Scheduler):
|
class DPMSolver(Scheduler):
|
||||||
"""Implements DPM-Solver++ from https://arxiv.org/abs/2211.01095
|
"""Implements DPM-Solver++ from https://arxiv.org/abs/2211.01095
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from refiners.foundationals.latent_diffusion.schedulers.scheduler import NoiseSchedule, Scheduler
|
|
||||||
from torch import Tensor, device as Device, dtype as Dtype, float32, tensor, Generator
|
|
||||||
import torch
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import torch
|
||||||
|
from torch import Generator, Tensor, device as Device, dtype as Dtype, float32, tensor
|
||||||
|
|
||||||
|
from refiners.foundationals.latent_diffusion.schedulers.scheduler import NoiseSchedule, Scheduler
|
||||||
|
|
||||||
|
|
||||||
class EulerScheduler(Scheduler):
|
class EulerScheduler(Scheduler):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from torch import Tensor, device as Device, dtype as DType, linspace, float32, sqrt, log, Generator
|
|
||||||
from typing import TypeVar
|
from typing import TypeVar
|
||||||
|
|
||||||
|
from torch import Generator, Tensor, device as Device, dtype as DType, float32, linspace, log, sqrt
|
||||||
|
|
||||||
T = TypeVar("T", bound="Scheduler")
|
T = TypeVar("T", bound="Scheduler")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ from typing import cast
|
||||||
from warnings import warn
|
from warnings import warn
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from torch import Tensor, allclose, device as Device, equal, randn, isclose
|
from torch import Tensor, allclose, device as Device, equal, isclose, randn
|
||||||
|
|
||||||
from refiners.fluxion import manual_seed
|
from refiners.fluxion import manual_seed
|
||||||
from refiners.foundationals.latent_diffusion.schedulers import DDIM, DDPM, DPMSolver, EulerScheduler
|
from refiners.foundationals.latent_diffusion.schedulers import DDIM, DDPM, DPMSolver, EulerScheduler
|
||||||
|
|
Loading…
Reference in a new issue