Skip to content

Remove code snippets containing is_safetensors_available() - #4521

Merged
DN6 merged 5 commits into
huggingface:mainfrom
chiral-carbon:fix_safetensors
Aug 11, 2023
Merged

Remove code snippets containing is_safetensors_available()#4521
DN6 merged 5 commits into
huggingface:mainfrom
chiral-carbon:fix_safetensors

Conversation

@chiral-carbon

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

Copy link
Copy Markdown
Contributor

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

HuggingFaceDocBuilderDev commented Aug 7, 2023

Copy link
Copy Markdown

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

@chiral-carbon

Copy link
Copy Markdown
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

DN6 commented Aug 8, 2023

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

DN6 commented Aug 9, 2023

Copy link
Copy Markdown
Collaborator

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

@chiral-carbon

chiral-carbon commented Aug 9, 2023

Copy link
Copy Markdown
Contributor Author

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

@DN6

DN6 commented Aug 9, 2023

Copy link
Copy Markdown
Collaborator

@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

chiral-carbon commented Aug 9, 2023

Copy link
Copy Markdown
Contributor Author

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

DN6 commented Aug 10, 2023

Copy link
Copy Markdown
Collaborator

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

DN6 commented Aug 11, 2023

Copy link
Copy Markdown
Collaborator

Great job @chiral-carbon 🙌🏽

@chiral-carbon

Copy link
Copy Markdown
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 <dhruv.nair@gmail.com>
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 <dhruv.nair@gmail.com>
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