Commit bed8acec authored by Patrick von Platen's avatar Patrick von Platen
Browse files

make style

parent 41509333
...@@ -1033,10 +1033,11 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin): ...@@ -1033,10 +1033,11 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
# 1. Download the checkpoints and configs # 1. Download the checkpoints and configs
# use snapshot download here to get it working from from_pretrained # use snapshot download here to get it working from from_pretrained
if not os.path.isdir(pretrained_model_name_or_path): if not os.path.isdir(pretrained_model_name_or_path):
if pretrained_model_name_or_path.count("/") > 1: if pretrained_model_name_or_path.count("/") > 1:
raise ValueError( raise ValueError(
f"The provided pretrained_model_name_or_path \"{pretrained_model_name_or_path}\"" 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.") " is neither a valid local path nor a valid repo id. Please check the parameter."
)
cached_folder = cls.download( cached_folder = cls.download(
pretrained_model_name_or_path, pretrained_model_name_or_path,
cache_dir=cache_dir, cache_dir=cache_dir,
......
...@@ -184,7 +184,6 @@ class StableDiffusionXLAdapterPipelineFastTests(PipelineTesterMixin, unittest.Te ...@@ -184,7 +184,6 @@ class StableDiffusionXLAdapterPipelineFastTests(PipelineTesterMixin, unittest.Te
) )
assert np.abs(image_slice.flatten() - expected_slice).max() < 5e-3 assert np.abs(image_slice.flatten() - expected_slice).max() < 5e-3
@parameterized.expand(["full_adapter", "full_adapter_xl", "light_adapter"]) @parameterized.expand(["full_adapter", "full_adapter_xl", "light_adapter"])
def test_total_downscale_factor(self, adapter_type): def test_total_downscale_factor(self, adapter_type):
"""Test that the T2IAdapter correctly reports its total_downscale_factor.""" """Test that the T2IAdapter correctly reports its total_downscale_factor."""
...@@ -216,6 +215,7 @@ class StableDiffusionXLAdapterPipelineFastTests(PipelineTesterMixin, unittest.Te ...@@ -216,6 +215,7 @@ class StableDiffusionXLAdapterPipelineFastTests(PipelineTesterMixin, unittest.Te
expected_out_image_size, expected_out_image_size,
) )
class StableDiffusionXLMultiAdapterPipelineFastTests( class StableDiffusionXLMultiAdapterPipelineFastTests(
StableDiffusionXLAdapterPipelineFastTests, PipelineTesterMixin, unittest.TestCase StableDiffusionXLAdapterPipelineFastTests, PipelineTesterMixin, unittest.TestCase
): ):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment