diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

[tests] enhance attention backend tests

Open sayakpaul opened this issue 4 weeks ago • 0 comments

What does this PR do?

Even though we will have separate unit-level testing for attention backends in https://github.com/huggingface/diffusers/pull/12822/, I think it's still nice to have integration tests.

This PR:

  • Change from torch.allclose() to numpy_cosine_similarity().
  • Change numpy_cosine_similarity to accept torch tensors.

This also helps us relax the environmental constraints.

sayakpaul avatar Dec 12 '25 07:12 sayakpaul