Skip to content

Commit

Permalink
remove unnecessary test
Browse files Browse the repository at this point in the history
  • Loading branch information
limiteinductive committed Dec 4, 2023
1 parent 85a9331 commit 5f93773
Showing 1 changed file with 3 additions and 31 deletions.
34 changes: 3 additions & 31 deletions tests/foundationals/latent_diffusion/test_schedulers.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,9 @@
import pytest
from typing import cast
from warnings import warn
from refiners.foundationals.latent_diffusion.schedulers import Scheduler, DPMSolver, DDIM
from refiners.fluxion import norm, manual_seed
from torch import linspace, float32, randn, Tensor, allclose, device as Device


def test_scheduler_utils():
class DummyScheduler(Scheduler):
def __call__(self, x: Tensor, noise: Tensor, step: int) -> Tensor:
return Tensor()

def _generate_timesteps(self) -> Tensor:
return Tensor()

scheduler = DummyScheduler(
num_inference_steps=10,
num_train_timesteps=20,
initial_diffusion_rate=0.1,
final_diffusion_rate=0.2,
device="cpu",
)
scale_factors = (
1.0
- linspace(
start=0.1**0.5,
end=0.2**0.5,
steps=20,
dtype=float32,
)
** 2
)
assert norm(scheduler.scale_factors - scale_factors) == 0
from refiners.foundationals.latent_diffusion.schedulers import DPMSolver, DDIM
from refiners.fluxion import manual_seed
from torch import randn, Tensor, allclose, device as Device


def test_dpm_solver_diffusers():
Expand Down

0 comments on commit 5f93773

Please sign in to comment.