test_concepts: silent static type checker error

This commit is contained in:
Cédric Deltheil 2023-09-24 22:26:31 +02:00 committed by Cédric Deltheil
parent f37f25a2e4
commit 63f5723449

View file

@ -44,8 +44,9 @@ def our_encoder_with_new_concepts(
@pytest.fixture(scope="module") @pytest.fixture(scope="module")
def ref_sd15_with_new_concepts( def ref_sd15_with_new_concepts(
runwayml_weights_path: Path, test_textual_inversion_path: Path, test_device: torch.device runwayml_weights_path: Path, test_textual_inversion_path: Path, test_device: torch.device
): ) -> StableDiffusionPipeline:
pipe = StableDiffusionPipeline.from_pretrained(runwayml_weights_path).to(test_device) # type: ignore pipe = StableDiffusionPipeline.from_pretrained(runwayml_weights_path).to(test_device) # type: ignore
assert isinstance(pipe, StableDiffusionPipeline)
pipe.load_textual_inversion(test_textual_inversion_path / "cat-toy") # type: ignore pipe.load_textual_inversion(test_textual_inversion_path / "cat-toy") # type: ignore
pipe.load_textual_inversion(test_textual_inversion_path / "gta5-artwork") # type: ignore pipe.load_textual_inversion(test_textual_inversion_path / "gta5-artwork") # type: ignore
return pipe return pipe