"docs/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "5498cf051e9cf450dcb798ca09920bbde008a661"
Unverified Commit 9727cda6 authored by Anton Lozhkov's avatar Anton Lozhkov Committed by GitHub
Browse files

[Tests] Mark the ncsnpp model tests as slow (#575)

* [Tests] Mark the ncsnpp model tests as slow

* style
parent 0a2c42f3
...@@ -19,7 +19,7 @@ import unittest ...@@ -19,7 +19,7 @@ import unittest
import torch import torch
from diffusers import UNet2DModel from diffusers import UNet2DModel
from diffusers.testing_utils import floats_tensor, torch_device from diffusers.testing_utils import floats_tensor, slow, torch_device
from .test_modeling_common import ModelTesterMixin from .test_modeling_common import ModelTesterMixin
...@@ -231,6 +231,7 @@ class NCSNppModelTests(ModelTesterMixin, unittest.TestCase): ...@@ -231,6 +231,7 @@ class NCSNppModelTests(ModelTesterMixin, unittest.TestCase):
inputs_dict = self.dummy_input inputs_dict = self.dummy_input
return init_dict, inputs_dict return init_dict, inputs_dict
@slow
def test_from_pretrained_hub(self): def test_from_pretrained_hub(self):
model, loading_info = UNet2DModel.from_pretrained("google/ncsnpp-celebahq-256", output_loading_info=True) model, loading_info = UNet2DModel.from_pretrained("google/ncsnpp-celebahq-256", output_loading_info=True)
self.assertIsNotNone(model) self.assertIsNotNone(model)
...@@ -244,6 +245,7 @@ class NCSNppModelTests(ModelTesterMixin, unittest.TestCase): ...@@ -244,6 +245,7 @@ class NCSNppModelTests(ModelTesterMixin, unittest.TestCase):
assert image is not None, "Make sure output is not None" assert image is not None, "Make sure output is not None"
@slow
def test_output_pretrained_ve_mid(self): def test_output_pretrained_ve_mid(self):
model = UNet2DModel.from_pretrained("google/ncsnpp-celebahq-256") model = UNet2DModel.from_pretrained("google/ncsnpp-celebahq-256")
model.to(torch_device) model.to(torch_device)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment