Skip to content

Conversation

@pcuenca
Copy link
Member

@pcuenca pcuenca commented Oct 4, 2022

No description provided.

Comment on lines 39 to 41
from .testing_utils import floats_tensor, load_image, parse_flag_from_env, slow, torch_device

if is_torch_available():
from .testing_utils import floats_tensor, load_image, parse_flag_from_env, slow, torch_device
Copy link
Member Author

Choose a reason for hiding this comment

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

The alternative is to remove this import and have tests use:

from diffusers.utils.testing_utils import torch_device

instead of

from diffusers.utils import torch_device

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 4, 2022

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

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Thanks!

@pcuenca pcuenca merged commit 215bb40 into main Oct 4, 2022
@pcuenca pcuenca deleted the fix-no-torch branch October 4, 2022 14:59
prathikr pushed a commit to prathikr/diffusers that referenced this pull request Oct 26, 2022
* Fix import if PyTorch is not installed.

* Style (blank line)
PhaneeshB pushed a commit to nod-ai/diffusers that referenced this pull request Mar 1, 2023
…ingface#715)

Windows perform can boost from 2.67s/image to 2.4523s/image.
While Linux stays the same.
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* Fix import if PyTorch is not installed.

* Style (blank line)
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.

4 participants