Skip to content

Commit 798e0ca

Browse files
committed
update
1 parent 6f912ab commit 798e0ca

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

tests/modular_pipelines/stable_diffusion_xl/test_modular_pipeline_stable_diffusion_xl.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# limitations under the License.
1515

1616
import random
17-
import tempfile
1817
import unittest
1918
from typing import Any, Dict
2019

@@ -24,7 +23,6 @@
2423

2524
from diffusers import (
2625
ClassifierFreeGuidance,
27-
ModularPipeline,
2826
StableDiffusionXLAutoBlocks,
2927
StableDiffusionXLModularPipeline,
3028
)
@@ -381,27 +379,6 @@ def test_stable_diffusion_xl_euler(self):
381379
def test_inference_batch_single_identical(self):
382380
super().test_inference_batch_single_identical(expected_max_diff=3e-3)
383381

384-
def test_stable_diffusion_xl_save_from_pretrained(self):
385-
pipes = []
386-
sd_pipe = self.get_pipeline().to(torch_device)
387-
pipes.append(sd_pipe)
388-
389-
with tempfile.TemporaryDirectory() as tmpdirname:
390-
sd_pipe.save_pretrained(tmpdirname)
391-
sd_pipe = ModularPipeline.from_pretrained(tmpdirname).to(torch_device)
392-
sd_pipe.load_default_components(torch_dtype=torch.float32)
393-
sd_pipe.to(torch_device)
394-
pipes.append(sd_pipe)
395-
396-
image_slices = []
397-
for pipe in pipes:
398-
inputs = self.get_dummy_inputs(torch_device)
399-
image = pipe(**inputs, output="images")
400-
401-
image_slices.append(image[0, -3:, -3:, -1].flatten())
402-
403-
assert np.abs(image_slices[0] - image_slices[1]).max() < 1e-3
404-
405382

406383
class SDXLImg2ImgModularPipelineFastTests(
407384
SDXLModularTests,

tests/modular_pipelines/test_modular_pipelines_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def test_save_from_pretrained(self):
345345
with tempfile.TemporaryDirectory() as tmpdirname:
346346
base_pipe.save_pretrained(tmpdirname)
347347
pipe = ModularPipeline.from_pretrained(tmpdirname).to(torch_device)
348-
pipe.load_default_components(torch_dtype=torch.float16)
348+
pipe.load_default_components(torch_dtype=torch.float32)
349349
pipe.to(torch_device)
350350

351351
pipes.append(pipe)

0 commit comments

Comments
 (0)