1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Fix common tests for FP16 (#1588)

* Fix common tests for FP16

* revert
This commit is contained in:
Anton Lozhkov
2022-12-07 14:09:51 +01:00
committed by GitHub
parent d9b5b43d46
commit dc87f526d4
2 changed files with 2 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ torch.backends.cuda.matmul.allow_tf32 = False
class DDIMPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
pipeline_class = DDIMPipeline
test_cpu_offload = False
def get_dummy_components(self):
torch.manual_seed(0)

View File

@@ -190,7 +190,7 @@ class PipelineTesterMixin:
with tempfile.TemporaryDirectory() as tmpdir:
pipe.save_pretrained(tmpdir)
pipe_loaded = self.pipeline_class.from_pretrained(tmpdir)
pipe_loaded = self.pipeline_class.from_pretrained(tmpdir, torch_dtype=torch.float16)
pipe_loaded.to(torch_device)
pipe_loaded.set_progress_bar_config(disable=None)