Skip to content

Commit 3441f7f

Browse files
committed
don't run sana layerwise casting tests in CI.
1 parent 250f5cb commit 3441f7f

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

tests/lora/test_lora_layers_sana.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15+
import os
1516
import sys
1617
import unittest
1718

@@ -28,6 +29,9 @@
2829
from .utils import PeftLoraLoaderMixinTests # noqa: E402
2930

3031

32+
IS_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" and os.getenv("DIFFUSERS_IS_CI") == "yes"
33+
34+
3135
@require_peft_backend
3236
class SanaLoRATests(unittest.TestCase, PeftLoraLoaderMixinTests):
3337
pipeline_class = SanaPipeline
@@ -136,3 +140,7 @@ def test_simple_inference_with_text_lora_fused(self):
136140
@unittest.skip("Text encoder LoRA is not supported in SANA.")
137141
def test_simple_inference_with_text_lora_save_load(self):
138142
pass
143+
144+
@unittest.skipIf(IS_GITHUB_ACTIONS, reason="Skipping test inside GitHub Actions environment")
145+
def test_layerwise_casting_inference_denoiser(self):
146+
return super().test_layerwise_casting_inference_denoiser()

tests/models/autoencoders/test_models_autoencoder_dc.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,20 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
import os
1617
import unittest
1718

1819
from diffusers import AutoencoderDC
1920

20-
from ...testing_utils import (
21-
enable_full_determinism,
22-
floats_tensor,
23-
torch_device,
24-
)
21+
from ...testing_utils import enable_full_determinism, floats_tensor, torch_device
2522
from ..test_modeling_common import ModelTesterMixin
2623
from .testing_utils import AutoencoderTesterMixin
2724

2825

2926
enable_full_determinism()
3027

28+
IS_GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true" and os.getenv("DIFFUSERS_IS_CI") == "yes"
29+
3130

3231
class AutoencoderDCTests(ModelTesterMixin, AutoencoderTesterMixin, unittest.TestCase):
3332
model_class = AutoencoderDC
@@ -82,3 +81,7 @@ def prepare_init_args_and_inputs_for_common(self):
8281
init_dict = self.get_autoencoder_dc_config()
8382
inputs_dict = self.dummy_input
8483
return init_dict, inputs_dict
84+
85+
@unittest.skipIf(IS_GITHUB_ACTIONS, reason="Skipping test inside GitHub Actions environment")
86+
def test_layerwise_casting_inference(self):
87+
super().test_layerwise_casting_inference()

0 commit comments

Comments
 (0)