Simplify conditional code (#39781)

* Use !=

Signed-off-by: cyy <cyyever@outlook.com>

* Use get

Signed-off-by: cyy <cyyever@outlook.com>

* Format

* Simplify bool operations

Signed-off-by: cyy <cyyever@outlook.com>

---------

Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
Yuanyuan Chen
2025-07-30 20:32:10 +08:00
committed by GitHub
parent b94929eb49
commit 1e0665a191
172 changed files with 229 additions and 297 deletions

View File

@@ -144,7 +144,7 @@ class VitMatteModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase
test_resize_embeddings = False
test_head_masking = False
test_torch_exportable = True
test_torch_exportable_strictly = not get_torch_major_and_minor_version() == "2.7"
test_torch_exportable_strictly = get_torch_major_and_minor_version() != "2.7"
def setUp(self):
self.model_tester = VitMatteModelTester(self)