- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.5k
[Tests] skip nan lora tests on PyTorch 2.5.1 CPU. #9975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @unittest.skipIf( | ||
| torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"), | ||
| "Test not supported on PyTorch 2.5 and CPU.", | ||
| ) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@a-r-r-o-w not important for this PR but any reason this had to be rewritten for Cog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM. My only concern is that if it gets fixed in a future PyTorch version, it can easily go unnoticed and tests continue to be skipped. That's why I usually prefer pytest.mark.xfail(..., strict=True) for such cases.
| I agree with @BenjaminBossan marking with xfail is better. | 
| @BenjaminBossan @DN6 how about now? | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM.
| @DN6 okay to merge, pinging because of the CI failures across the board. | 
* skip nan lora tests on PyTorch 2.5.1 CPU. * cog * use xfail * correct xfail * add condition * tests
* skip nan lora tests on PyTorch 2.5.1 CPU. * cog * use xfail * correct xfail * add condition * tests
What does this PR do?
See: https://github.com/huggingface/diffusers/actions/runs/11925826067/job/33238594250?pr=9943#step:7:261. This PR skips the NaN
fuse_lora()tests when detected PyTorch version is 2.5 or above and the device is CPU.It's likely a PyTorch bug as the following passes on PyTorch 2.4.1 CPU but not on PyTorch 2.5.1 CPU. Thanks to Ben for helping to verifying.
See relevant PyTorch thread: pytorch/pytorch#141128.