Skip to content
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

Fix Compatibility with Nvidia NGC Containers #919

Merged
merged 1 commit into from
Oct 20, 2022
Merged

Fix Compatibility with Nvidia NGC Containers #919

merged 1 commit into from
Oct 20, 2022

Conversation

tasercake
Copy link
Contributor

Fixes #892

diffusers 0.4.0+ currently assumes that torch >= 1.12.0 has MPS registered as a backend, but this does not seem to be the case in nvidia's NGC pytorch containers.

This PR makes the MPS availability check a little more robust.

P.S. Wasn't sure how/if to add a test for this. If a maintainer could point me in the right direction I'd be happy to update the PR.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 20, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@anton-l anton-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@patrickvonplaten patrickvonplaten merged commit 6f6eef7 into huggingface:main Oct 20, 2022
@tasercake tasercake deleted the check-has-mps branch October 26, 2022 03:49
prathikr pushed a commit to prathikr/diffusers that referenced this pull request Oct 26, 2022
Check if MPS backend is registered before calling is_available()
PhaneeshB pushed a commit to nod-ai/diffusers that referenced this pull request Mar 1, 2023
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
Check if MPS backend is registered before calling is_available()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v0.4.0+ breaks compatibility with Nvidia Deep Learning Containers
5 participants