Skip to content

Remove code snippets containing is_safetensors_available() #4521

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

Merged
merged 5 commits into from
Aug 11, 2023

Conversation

chiral-carbon
Copy link
Contributor

@chiral-carbon chiral-carbon commented Aug 7, 2023

What does this PR do?

Fixes #4243

Some tests failing on running make test, since I did not add my own tests.
make test summary:

================================================== 116 failed, 1941 passed, 1145 skipped, 1098 warnings in 1420.89s (0:23:40) ===================================================

Before submitting

Who can review?

@patrickvonplaten @DN6

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 7, 2023

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

@chiral-carbon
Copy link
Contributor Author

The summary in the PR description above is the summary from make test that I run on my local machine.
I use a MacBook Pro 2019 and many of the above errors are MPS device errors, so I assume it is because I don't have GPU on my local machine that I see so many errors.

Need some help understanding the current AssertionErrors that you can see in the summary.

@DN6
Copy link
Collaborator

DN6 commented Aug 8, 2023

Hi @chiral-carbon PR looks good. I'd like to update/add some tests to this PR. Can add me as a collaborator to your fork so that I can commit them? Alternatively, I can create another with the test changes that you can merge into your branch. LMK what works for you 👍🏽

@chiral-carbon
Copy link
Contributor Author

Thanks @DN6! I think I would like to merge your test commits from your own fork. If that is a longer process though I will directly add you as collaborator.

@DN6
Copy link
Collaborator

DN6 commented Aug 9, 2023

@chiral-carbon Could you merge the commits from safetensors-default into your branch.

@chiral-carbon
Copy link
Contributor Author

chiral-carbon commented Aug 9, 2023

@DN6 let me know if I merged the commits correctly. I'll look into why one test still fails

@DN6
Copy link
Collaborator

DN6 commented Aug 9, 2023

@chiral-carbon Pushed up a fix for that test. If you could merge it from the same branch I think we should be good

@chiral-carbon
Copy link
Contributor Author

chiral-carbon commented Aug 9, 2023

it works @DN6, thanks! I was stuck on the logic in the last tests so this helps me understand too

@chiral-carbon chiral-carbon changed the title [WIP] Remove code snippets containing is_safetensors_available() Remove code snippets containing is_safetensors_available() Aug 9, 2023
@DN6
Copy link
Collaborator

DN6 commented Aug 10, 2023

Hi @chiral-carbon requesting one last small change. I think we can get rid of these lines in the test. We don't need them anymore.

import diffusers
diffusers.utils.import_utils._safetensors_available = True

@DN6 DN6 merged commit c8d86e9 into huggingface:main Aug 11, 2023
@DN6
Copy link
Collaborator

DN6 commented Aug 11, 2023

Great job @chiral-carbon 🙌🏽

@chiral-carbon
Copy link
Contributor Author

@DN6 thanks for all your help!

@chiral-carbon chiral-carbon deleted the fix_safetensors branch August 11, 2023 13:51
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
…face#4521)

* [WIP] Remove code snippets containing `is_safetensors_available()`

* Modifying `import_utils.py`

* update pipeline tests for safetensor default

* fix test related to cached requests

* address import nits

---------

Co-authored-by: Dhruv Nair <[email protected]>
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
…face#4521)

* [WIP] Remove code snippets containing `is_safetensors_available()`

* Modifying `import_utils.py`

* update pipeline tests for safetensor default

* fix test related to cached requests

* address import nits

---------

Co-authored-by: Dhruv Nair <[email protected]>
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.

Remove use_safetensors from diffusers codebase
3 participants