Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tests/models/test_attention_processor.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import importlib.metadata
import tempfile
import unittest

import numpy as np
import pytest
import torch
from packaging import version

from diffusers import DiffusionPipeline
from diffusers.models.attention_processor import Attention, AttnAddedKVProcessor
Expand Down Expand Up @@ -87,9 +89,10 @@ def is_dist_enabled(pytestconfig):
return pytestconfig.getoption("dist") == "loadfile"

@pytest.mark.xfail(
condition=torch.device(torch_device).type == "cuda" and is_dist_enabled,
reason="Test currently fails on our GPU CI because of `loadfile`. Note that it only fails when the tests are distributed from `pytest ... tests/models`. If the tests are run individually, even with `loadfile` it won't fail.",
strict=True,
condition=(torch.device(torch_device).type == "cuda" and is_dist_enabled)
or version.parse(importlib.metadata.version("transformers")).is_devrelease,
reason="Test currently fails on our GPU CI because of `loadfile` or with source installation of transformers due to CLIPTextModel key prefix changes.",
strict=False,
)
def test_conversion_when_using_device_map(self):
pipe = DiffusionPipeline.from_pretrained(
Expand Down
Loading