diff --git a/tests/lora/test_lora_layers_cogvideox.py b/tests/lora/test_lora_layers_cogvideox.py index ed3d0f0d8d..f5d8564834 100644 --- a/tests/lora/test_lora_layers_cogvideox.py +++ b/tests/lora/test_lora_layers_cogvideox.py @@ -118,15 +118,15 @@ class TestCogVideoXLoRA(PeftLoraLoaderMixinTests): return noise, input_ids, pipeline_inputs - def test_simple_inference_with_text_lora_denoiser_fused_multi(self): - super().test_simple_inference_with_text_lora_denoiser_fused_multi(expected_atol=9e-3) + def test_simple_inference_with_text_lora_denoiser_fused_multi(self, pipe): + super().test_simple_inference_with_text_lora_denoiser_fused_multi(expected_atol=9e-3, pipe=pipe) - def test_simple_inference_with_text_denoiser_lora_unfused(self): - super().test_simple_inference_with_text_denoiser_lora_unfused(expected_atol=9e-3) + def test_simple_inference_with_text_denoiser_lora_unfused(self, pipe): + super().test_simple_inference_with_text_denoiser_lora_unfused(pipe=pipe, expected_atol=9e-3) - def test_lora_scale_kwargs_match_fusion(self, base_pipe_output): + def test_lora_scale_kwargs_match_fusion(self, pipe, base_pipe_output): super().test_lora_scale_kwargs_match_fusion( - base_pipe_output=base_pipe_output, expected_atol=9e-3, expected_rtol=9e-3 + pipe=pipe, base_pipe_output=base_pipe_output, expected_atol=9e-3, expected_rtol=9e-3 ) @pytest.mark.parametrize( diff --git a/tests/lora/test_lora_layers_cogview4.py b/tests/lora/test_lora_layers_cogview4.py index 8b7daf9c01..d390273067 100644 --- a/tests/lora/test_lora_layers_cogview4.py +++ b/tests/lora/test_lora_layers_cogview4.py @@ -109,11 +109,11 @@ class TestCogView4LoRA(PeftLoraLoaderMixinTests): return noise, input_ids, pipeline_inputs - def test_simple_inference_with_text_lora_denoiser_fused_multi(self): - super().test_simple_inference_with_text_lora_denoiser_fused_multi(expected_atol=9e-3) + def test_simple_inference_with_text_lora_denoiser_fused_multi(self, pipe): + super().test_simple_inference_with_text_lora_denoiser_fused_multi(pipe=pipe, expected_atol=9e-3) - def test_simple_inference_with_text_denoiser_lora_unfused(self): - super().test_simple_inference_with_text_denoiser_lora_unfused(expected_atol=9e-3) + def test_simple_inference_with_text_denoiser_lora_unfused(self, pipe): + super().test_simple_inference_with_text_denoiser_lora_unfused(pipe=pipe, expected_atol=9e-3) @pytest.mark.parametrize( "offload_type, use_stream", diff --git a/tests/lora/test_lora_layers_hunyuanvideo.py b/tests/lora/test_lora_layers_hunyuanvideo.py index 37d6a61e81..1d3e3dbf6a 100644 --- a/tests/lora/test_lora_layers_hunyuanvideo.py +++ b/tests/lora/test_lora_layers_hunyuanvideo.py @@ -149,11 +149,11 @@ class TestHunyuanVideoLoRA(PeftLoraLoaderMixinTests): return noise, input_ids, pipeline_inputs - def test_simple_inference_with_text_lora_denoiser_fused_multi(self): - super().test_simple_inference_with_text_lora_denoiser_fused_multi(expected_atol=9e-3) + def test_simple_inference_with_text_lora_denoiser_fused_multi(self, pipe): + super().test_simple_inference_with_text_lora_denoiser_fused_multi(pipe=pipe, expected_atol=9e-3) - def test_simple_inference_with_text_denoiser_lora_unfused(self): - super().test_simple_inference_with_text_denoiser_lora_unfused(expected_atol=9e-3) + def test_simple_inference_with_text_denoiser_lora_unfused(self, pipe): + super().test_simple_inference_with_text_denoiser_lora_unfused(pipe=pipe, expected_atol=9e-3) @pytest.mark.skip("Not supported in HunyuanVideo.") def test_simple_inference_with_text_denoiser_block_scale(self): diff --git a/tests/lora/test_lora_layers_ltx_video.py b/tests/lora/test_lora_layers_ltx_video.py index 37bad941bf..2ffc39ef2b 100644 --- a/tests/lora/test_lora_layers_ltx_video.py +++ b/tests/lora/test_lora_layers_ltx_video.py @@ -108,11 +108,11 @@ class TestLTXVideoLoRA(PeftLoraLoaderMixinTests): return noise, input_ids, pipeline_inputs - def test_simple_inference_with_text_lora_denoiser_fused_multi(self): - super().test_simple_inference_with_text_lora_denoiser_fused_multi(expected_atol=9e-3) + def test_simple_inference_with_text_lora_denoiser_fused_multi(self, pipe): + super().test_simple_inference_with_text_lora_denoiser_fused_multi(pipe=pipe, expected_atol=9e-3) - def test_simple_inference_with_text_denoiser_lora_unfused(self): - super().test_simple_inference_with_text_denoiser_lora_unfused(expected_atol=9e-3) + def test_simple_inference_with_text_denoiser_lora_unfused(self, pipe): + super().test_simple_inference_with_text_denoiser_lora_unfused(pipe=pipe, expected_atol=9e-3) @pytest.mark.skip("Not supported in LTXVideo.") def test_simple_inference_with_text_denoiser_block_scale(self): diff --git a/tests/lora/test_lora_layers_mochi.py b/tests/lora/test_lora_layers_mochi.py index f9da672732..9b81e220b2 100644 --- a/tests/lora/test_lora_layers_mochi.py +++ b/tests/lora/test_lora_layers_mochi.py @@ -99,11 +99,11 @@ class TestMochiLoRA(PeftLoraLoaderMixinTests): return noise, input_ids, pipeline_inputs - def test_simple_inference_with_text_lora_denoiser_fused_multi(self): - super().test_simple_inference_with_text_lora_denoiser_fused_multi(expected_atol=9e-3) + def test_simple_inference_with_text_lora_denoiser_fused_multi(self, pipe): + super().test_simple_inference_with_text_lora_denoiser_fused_multi(pipe=pipe, expected_atol=9e-3) - def test_simple_inference_with_text_denoiser_lora_unfused(self): - super().test_simple_inference_with_text_denoiser_lora_unfused(expected_atol=9e-3) + def test_simple_inference_with_text_denoiser_lora_unfused(self, pipe): + super().test_simple_inference_with_text_denoiser_lora_unfused(pipe=pipe, expected_atol=9e-3) @pytest.mark.skip("Not supported in Mochi.") def test_simple_inference_with_text_denoiser_block_scale(self): diff --git a/tests/lora/test_lora_layers_sdxl.py b/tests/lora/test_lora_layers_sdxl.py index 7b53464c88..fd10d4eeda 100644 --- a/tests/lora/test_lora_layers_sdxl.py +++ b/tests/lora/test_lora_layers_sdxl.py @@ -108,7 +108,7 @@ class TestStableDiffusionXLLoRA(PeftLoraLoaderMixinTests): def test_multiple_wrong_adapter_name_raises_error(self): super().test_multiple_wrong_adapter_name_raises_error() - def test_simple_inference_with_text_denoiser_lora_unfused(self): + def test_simple_inference_with_text_denoiser_lora_unfused(self, pipe): if torch.cuda.is_available(): expected_atol = 9e-2 expected_rtol = 9e-2 @@ -117,10 +117,10 @@ class TestStableDiffusionXLLoRA(PeftLoraLoaderMixinTests): expected_rtol = 1e-3 super().test_simple_inference_with_text_denoiser_lora_unfused( - expected_atol=expected_atol, expected_rtol=expected_rtol + pipe=pipe, expected_atol=expected_atol, expected_rtol=expected_rtol ) - def test_simple_inference_with_text_lora_denoiser_fused_multi(self): + def test_simple_inference_with_text_lora_denoiser_fused_multi(self, pipe): if torch.cuda.is_available(): expected_atol = 9e-2 expected_rtol = 9e-2 @@ -129,10 +129,10 @@ class TestStableDiffusionXLLoRA(PeftLoraLoaderMixinTests): expected_rtol = 1e-3 super().test_simple_inference_with_text_lora_denoiser_fused_multi( - expected_atol=expected_atol, expected_rtol=expected_rtol + pipe=pipe, expected_atol=expected_atol, expected_rtol=expected_rtol ) - def test_lora_scale_kwargs_match_fusion(self, base_pipe_output): + def test_lora_scale_kwargs_match_fusion(self, base_pipe_output, pipe): if torch.cuda.is_available(): expected_atol = 9e-2 expected_rtol = 9e-2 @@ -141,7 +141,7 @@ class TestStableDiffusionXLLoRA(PeftLoraLoaderMixinTests): expected_rtol = 1e-3 super().test_lora_scale_kwargs_match_fusion( - base_pipe_output=base_pipe_output, expected_atol=expected_atol, expected_rtol=expected_rtol + pipe=pipe, base_pipe_output=base_pipe_output, expected_atol=expected_atol, expected_rtol=expected_rtol ) diff --git a/tests/lora/test_lora_layers_wan.py b/tests/lora/test_lora_layers_wan.py index 3393521471..2dfe91d6d5 100644 --- a/tests/lora/test_lora_layers_wan.py +++ b/tests/lora/test_lora_layers_wan.py @@ -104,11 +104,11 @@ class TestWanLoRA(PeftLoraLoaderMixinTests): return noise, input_ids, pipeline_inputs - def test_simple_inference_with_text_lora_denoiser_fused_multi(self): - super().test_simple_inference_with_text_lora_denoiser_fused_multi(expected_atol=9e-3) + def test_simple_inference_with_text_lora_denoiser_fused_multi(self, pipe): + super().test_simple_inference_with_text_lora_denoiser_fused_multi(pipe=pipe, expected_atol=9e-3) - def test_simple_inference_with_text_denoiser_lora_unfused(self): - super().test_simple_inference_with_text_denoiser_lora_unfused(expected_atol=9e-3) + def test_simple_inference_with_text_denoiser_lora_unfused(self, pipe): + super().test_simple_inference_with_text_denoiser_lora_unfused(pipe=pipe, expected_atol=9e-3) @pytest.mark.skip("Not supported in Wan.") def test_simple_inference_with_text_denoiser_block_scale(self): diff --git a/tests/lora/test_lora_layers_wanvace.py b/tests/lora/test_lora_layers_wanvace.py index ecc5c16365..48017120ed 100644 --- a/tests/lora/test_lora_layers_wanvace.py +++ b/tests/lora/test_lora_layers_wanvace.py @@ -119,11 +119,11 @@ class TestWanVACELoRA(PeftLoraLoaderMixinTests): return noise, input_ids, pipeline_inputs - def test_simple_inference_with_text_lora_denoiser_fused_multi(self): - super().test_simple_inference_with_text_lora_denoiser_fused_multi(expected_atol=9e-3) + def test_simple_inference_with_text_lora_denoiser_fused_multi(self, pipe): + super().test_simple_inference_with_text_lora_denoiser_fused_multi(pipe=pipe, expected_atol=9e-3) - def test_simple_inference_with_text_denoiser_lora_unfused(self): - super().test_simple_inference_with_text_denoiser_lora_unfused(expected_atol=9e-3) + def test_simple_inference_with_text_denoiser_lora_unfused(self, pipe): + super().test_simple_inference_with_text_denoiser_lora_unfused(pipe=pipe, expected_atol=9e-3) @pytest.mark.skip("Not supported in Wan VACE.") def test_simple_inference_with_text_denoiser_block_scale(self):