mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-29 07:22:12 +03:00
make style
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user