Skip to content

Remove all safetensors import mocking from tests #4244

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

Closed
patrickvonplaten opened this issue Jul 24, 2023 · 2 comments
Closed

Remove all safetensors import mocking from tests #4244

patrickvonplaten opened this issue Jul 24, 2023 · 2 comments
Assignees

Comments

@patrickvonplaten
Copy link
Contributor

We have a use_safetensors argument in from_pretrained which can fully control whether we load in safetensors or not. We can clean up this dummy import mess a bit here:

diffusers.utils.import_utils._safetensors_available = safe_avail
and just work with use_safetensors instead which was added a while back: https://huggingface.co/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained.use_safetensors

@patrickvonplaten patrickvonplaten changed the title Remove all Remove all safetensors import mocking from tests Jul 24, 2023
@patrickvonplaten
Copy link
Contributor Author

@DN6 this could be interesting for you

@DN6
Copy link
Collaborator

DN6 commented Aug 18, 2023

Handled in PRs:
#4243
#4235

@DN6 DN6 closed this as completed Aug 18, 2023
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

No branches or pull requests

2 participants