From dd0cca585593082aaf7fcf7f711c7c37ef4404af Mon Sep 17 00:00:00 2001 From: Pierre Chapuis Date: Mon, 11 Sep 2023 14:13:40 +0200 Subject: [PATCH] use float32 reference for textual inversion (fixes tests on CPU) --- tests/foundationals/clip/test_concepts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/foundationals/clip/test_concepts.py b/tests/foundationals/clip/test_concepts.py index 0ed4f06..d25c04e 100644 --- a/tests/foundationals/clip/test_concepts.py +++ b/tests/foundationals/clip/test_concepts.py @@ -45,7 +45,7 @@ def our_encoder_with_new_concepts( def ref_sd15_with_new_concepts( runwayml_weights_path: Path, test_textual_inversion_path: Path, test_device: torch.device ): - pipe = StableDiffusionPipeline.from_pretrained(runwayml_weights_path, torch_dtype=torch.float16).to(test_device) # type: ignore + pipe = StableDiffusionPipeline.from_pretrained(runwayml_weights_path).to(test_device) # 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 return pipe