File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
1516import sys
1617import unittest
1718
2829from .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
3236class 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 ()
Original file line number Diff line number Diff line change 1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515
16+ import os
1617import unittest
1718
1819from 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
2522from ..test_modeling_common import ModelTesterMixin
2623from .testing_utils import AutoencoderTesterMixin
2724
2825
2926enable_full_determinism ()
3027
28+ IS_GITHUB_ACTIONS = os .getenv ("GITHUB_ACTIONS" ) == "true" and os .getenv ("DIFFUSERS_IS_CI" ) == "yes"
29+
3130
3231class 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 ()
You can’t perform that action at this time.
0 commit comments