Skip to content

Commit

Permalink
Fix common tests for FP16 (huggingface#1588)
Browse files Browse the repository at this point in the history
* Fix common tests for FP16

* revert
  • Loading branch information
anton-l authored and Thomas Capelle committed Dec 12, 2022
1 parent 625d4e5 commit e27a930
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/pipelines/ddim/test_ddim.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

class DDIMPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
pipeline_class = DDIMPipeline
test_cpu_offload = False

def get_dummy_components(self):
torch.manual_seed(0)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pipelines_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def test_save_load_float16(self):

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)

Expand Down

0 comments on commit e27a930

Please sign in to comment.