From 91c0fd24d8e6a4498527f2b22dacb908370bdea0 Mon Sep 17 00:00:00 2001 From: Pierre Chapuis Date: Mon, 24 Jun 2024 16:22:11 +0200 Subject: [PATCH] ruff: reorder test imports --- tests/e2e/test_diffusion.py | 2 +- tests/e2e/test_doc_examples.py | 2 +- tests/e2e/test_lcm.py | 2 +- tests/e2e/test_lightning.py | 2 +- tests/e2e/test_preprocessors.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/e2e/test_diffusion.py b/tests/e2e/test_diffusion.py index c570bf1..d97b5a5 100644 --- a/tests/e2e/test_diffusion.py +++ b/tests/e2e/test_diffusion.py @@ -7,6 +7,7 @@ from warnings import warn import pytest import torch from PIL import Image +from tests.utils import ensure_similar_images from refiners.fluxion.layers.attentions import ScaledDotProductAttention from refiners.fluxion.utils import image_to_tensor, load_from_safetensors, load_tensors, manual_seed, no_grad @@ -31,7 +32,6 @@ from refiners.foundationals.latent_diffusion.solvers import DDIM, Euler, NoiseSc from refiners.foundationals.latent_diffusion.stable_diffusion_1.multi_diffusion import SD1MultiDiffusion from refiners.foundationals.latent_diffusion.stable_diffusion_xl.model import StableDiffusion_XL from refiners.foundationals.latent_diffusion.style_aligned import StyleAlignedAdapter -from tests.utils import ensure_similar_images def _img_open(path: Path) -> Image.Image: diff --git a/tests/e2e/test_doc_examples.py b/tests/e2e/test_doc_examples.py index 4991848..7514c25 100644 --- a/tests/e2e/test_doc_examples.py +++ b/tests/e2e/test_doc_examples.py @@ -5,12 +5,12 @@ from warnings import warn import pytest import torch from PIL import Image +from tests.utils import ensure_similar_images from refiners.fluxion.utils import load_from_safetensors, manual_seed, no_grad from refiners.foundationals.latent_diffusion import SDXLIPAdapter from refiners.foundationals.latent_diffusion.lora import SDLoraManager from refiners.foundationals.latent_diffusion.stable_diffusion_xl.model import StableDiffusion_XL -from tests.utils import ensure_similar_images def _img_open(path: Path) -> Image.Image: diff --git a/tests/e2e/test_lcm.py b/tests/e2e/test_lcm.py index af9b2a9..5b9e50d 100644 --- a/tests/e2e/test_lcm.py +++ b/tests/e2e/test_lcm.py @@ -5,6 +5,7 @@ from warnings import warn import pytest import torch from PIL import Image +from tests.utils import ensure_similar_images from refiners.fluxion.utils import load_from_safetensors, manual_seed, no_grad from refiners.foundationals.latent_diffusion.lora import SDLoraManager @@ -12,7 +13,6 @@ from refiners.foundationals.latent_diffusion.solvers import LCMSolver from refiners.foundationals.latent_diffusion.stable_diffusion_xl.lcm import SDXLLcmAdapter from refiners.foundationals.latent_diffusion.stable_diffusion_xl.lcm_lora import add_lcm_lora from refiners.foundationals.latent_diffusion.stable_diffusion_xl.model import StableDiffusion_XL -from tests.utils import ensure_similar_images def _img_open(path: Path) -> Image.Image: diff --git a/tests/e2e/test_lightning.py b/tests/e2e/test_lightning.py index 80ea900..bf8eb8a 100644 --- a/tests/e2e/test_lightning.py +++ b/tests/e2e/test_lightning.py @@ -5,13 +5,13 @@ from warnings import warn import pytest import torch from PIL import Image +from tests.utils import ensure_similar_images from refiners.fluxion.utils import load_from_safetensors, manual_seed, no_grad from refiners.foundationals.latent_diffusion.lora import SDLoraManager from refiners.foundationals.latent_diffusion.solvers import Euler, ModelPredictionType, SolverParams, TimestepSpacing from refiners.foundationals.latent_diffusion.stable_diffusion_xl.lcm_lora import add_lcm_lora from refiners.foundationals.latent_diffusion.stable_diffusion_xl.model import StableDiffusion_XL -from tests.utils import ensure_similar_images def _img_open(path: Path) -> Image.Image: diff --git a/tests/e2e/test_preprocessors.py b/tests/e2e/test_preprocessors.py index 068b4fe..6eedf42 100644 --- a/tests/e2e/test_preprocessors.py +++ b/tests/e2e/test_preprocessors.py @@ -4,10 +4,10 @@ from warnings import warn import pytest import torch from PIL import Image +from tests.utils import ensure_similar_images from refiners.fluxion.utils import image_to_tensor, no_grad, tensor_to_image from refiners.foundationals.latent_diffusion.preprocessors.informative_drawings import InformativeDrawings -from tests.utils import ensure_similar_images def _img_open(path: Path) -> Image.Image: