1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

[tests] chore: rename lora model-level tests. (#11481)

chore: rename lora model-level tests.
This commit is contained in:
Sayak Paul
2025-06-02 09:21:40 -07:00
committed by GitHub
parent d4dc4d7654
commit 20273e5503

View File

@@ -1060,7 +1060,7 @@ class ModelTesterMixin:
@parameterized.expand([True, False])
@torch.no_grad()
@unittest.skipIf(not is_peft_available(), "Only with PEFT")
def test_save_load_lora_adapter(self, use_dora=False):
def test_lora_save_load_adapter(self, use_dora=False):
import safetensors
from peft import LoraConfig
from peft.utils import get_peft_model_state_dict
@@ -1117,7 +1117,7 @@ class ModelTesterMixin:
self.assertTrue(torch.allclose(outputs_with_lora, outputs_with_lora_2, atol=1e-4, rtol=1e-4))
@unittest.skipIf(not is_peft_available(), "Only with PEFT")
def test_wrong_adapter_name_raises_error(self):
def test_lora_wrong_adapter_name_raises_error(self):
from peft import LoraConfig
from diffusers.loaders.peft import PeftAdapterMixin