Skip to content

Commit f6f16a0

Browse files
authored
[CI] More Fast GPU Test Fixes (huggingface#9346)
* update * update * update * update
1 parent 1c1ccaa commit f6f16a0

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

tests/lora/test_lora_layers_sd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,12 @@ def test_integration_move_lora_cpu(self):
157157
if ("adapter-1" in n or "adapter-2" in n) and not isinstance(m, (nn.Dropout, nn.Identity)):
158158
self.assertTrue(m.weight.device != torch.device("cpu"))
159159

160+
@slow
160161
@require_torch_gpu
161162
def test_integration_move_lora_dora_cpu(self):
162163
from peft import LoraConfig
163164

164-
path = "runwayml/stable-diffusion-v1-5"
165+
path = "Lykon/dreamshaper-8"
165166
unet_lora_config = LoraConfig(
166167
init_lora_weights="gaussian",
167168
target_modules=["to_k", "to_q", "to_v", "to_out.0"],

tests/models/autoencoders/test_models_vae.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ def test_forward_signature(self):
528528
def test_forward_with_norm_groups(self):
529529
pass
530530

531+
@unittest.skip("No attention module used in this model")
532+
def test_set_attn_processor_for_determinism(self):
533+
return
534+
531535

532536
@slow
533537
class AutoencoderTinyIntegrationTests(unittest.TestCase):

tests/models/test_modeling_common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ class ModelTesterMixin:
220220
base_precision = 1e-3
221221
forward_requires_fresh_args = False
222222
model_split_percents = [0.5, 0.7, 0.9]
223+
uses_custom_attn_processor = False
223224

224225
def check_device_map_is_respected(self, model, device_map):
225226
for param_name, param in model.named_parameters():

tests/models/transformers/test_models_transformer_cogvideox.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
class CogVideoXTransformerTests(ModelTesterMixin, unittest.TestCase):
3333
model_class = CogVideoXTransformer3DModel
3434
main_input_name = "hidden_states"
35+
uses_custom_attn_processor = True
3536

3637
@property
3738
def dummy_input(self):

tests/models/transformers/test_models_transformer_lumina.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
class LuminaNextDiT2DModelTransformerTests(ModelTesterMixin, unittest.TestCase):
3333
model_class = LuminaNextDiT2DModel
3434
main_input_name = "hidden_states"
35+
uses_custom_attn_processor = True
3536

3637
@property
3738
def dummy_input(self):

0 commit comments

Comments
 (0)