Skip to content

Set _torch_version to N/A if torch is disabled. #11645

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rasmi
Copy link

@rasmi rasmi commented Jun 2, 2025

What does this PR do?

Set a default value for _torch_version if torch is disabled. This fixes an ImportError in hub_utils.py when it tries to import _torch_version. This is not riased for Jax and Flax because they already set _jax_version = "N/A" as a default.

ImportError: cannot import name '_torch_version' from 'diffusers.utils.import_utils'

Who can review?

Core library:

@sayakpaul sayakpaul requested a review from DN6 June 2, 2025 15:41
@rasmi rasmi force-pushed the patch-2 branch 2 times, most recently from 2b13495 to 98c9b30 Compare June 2, 2025 15:47
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

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.

2 participants