Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1805450

Browse files
up
1 parent a3d205c commit 1805450

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎tests/models/autoencoders/testing_utils.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ def test_enable_disable_tiling(self):
5757
torch.manual_seed(0)
5858
model = self.model_class(**init_dict).to(torch_device)
5959

60+
if not hasattr(model, "use_tiling"):
61+
pytest.skip(f"Skipping test as {self.model_class.__name__} doesn't support tiling.")
62+
6063
inputs_dict.update({"return_dict": False})
6164
_ = inputs_dict.pop("generator", None)
6265
accepts_generator = self._accepts_generator(model)
@@ -102,6 +105,8 @@ def test_enable_disable_slicing(self):
102105

103106
torch.manual_seed(0)
104107
model = self.model_class(**init_dict).to(torch_device)
108+
if not hasattr(model, "use_slicing"):
109+
pytest.skip(f"Skipping test as {self.model_class.__name__} doesn't support tiling.")
105110

106111
inputs_dict.update({"return_dict": False})
107112
_ = inputs_dict.pop("generator", None)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /