1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

make style

This commit is contained in:
Patrick von Platen
2023-09-25 20:24:03 +02:00
parent 415093335b
commit bed8aceca1
2 changed files with 6 additions and 5 deletions

View File

@@ -1033,10 +1033,11 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
# 1. Download the checkpoints and configs
# use snapshot download here to get it working from from_pretrained
if not os.path.isdir(pretrained_model_name_or_path):
if pretrained_model_name_or_path.count("/") > 1:
raise ValueError(
f"The provided pretrained_model_name_or_path \"{pretrained_model_name_or_path}\""
" is neither a valid local path nor a valid repo id. Please check the parameter.")
if pretrained_model_name_or_path.count("/") > 1:
raise ValueError(
f'The provided pretrained_model_name_or_path "{pretrained_model_name_or_path}"'
" is neither a valid local path nor a valid repo id. Please check the parameter."
)
cached_folder = cls.download(
pretrained_model_name_or_path,
cache_dir=cache_dir,

View File

@@ -184,7 +184,6 @@ class StableDiffusionXLAdapterPipelineFastTests(PipelineTesterMixin, unittest.Te
)
assert np.abs(image_slice.flatten() - expected_slice).max() < 5e-3
@parameterized.expand(["full_adapter", "full_adapter_xl", "light_adapter"])
def test_total_downscale_factor(self, adapter_type):
"""Test that the T2IAdapter correctly reports its total_downscale_factor."""
@@ -216,6 +215,7 @@ class StableDiffusionXLAdapterPipelineFastTests(PipelineTesterMixin, unittest.Te
expected_out_image_size,
)
class StableDiffusionXLMultiAdapterPipelineFastTests(
StableDiffusionXLAdapterPipelineFastTests, PipelineTesterMixin, unittest.TestCase
):