Skip to content

Remove torch_dtype in to() to end deprecation#6886

Merged
sayakpaul merged 4 commits into
mainfrom
remove-torch-dtype
Feb 8, 2024
Merged

Remove torch_dtype in to() to end deprecation#6886
sayakpaul merged 4 commits into
mainfrom
remove-torch-dtype

Conversation

@sayakpaul

Copy link
Copy Markdown
Member

What does this PR do?

So that part of #6885 is fixed.

@sayakpaul sayakpaul requested review from DN6 and yiyixuxu February 7, 2024 07:22
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@DN6 DN6 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 👍🏽

@DN6

DN6 commented Feb 7, 2024

Copy link
Copy Markdown
Collaborator

Additionally we should probably update all the docs where we pass in torch_dtype

@sayakpaul

Copy link
Copy Markdown
Member Author

Additionally we should probably update all the docs where we pass in torch_dtype

We cannot do that yet, because there's no deprecation behaviour in from_pretrained() for torch_dtype (both pipeline_utils.py and modeling_utils.py). So, that needs to be done first (should reside in a separate PR).

Let me know if that makes sense.

@sayakpaul sayakpaul mentioned this pull request Feb 7, 2024
@DN6

DN6 commented Feb 7, 2024

Copy link
Copy Markdown
Collaborator

So this PR is just changing all references to torch_dtype then?

@sayakpaul

Copy link
Copy Markdown
Member Author

Please review changes more carefully.

It’s deprecating torch_dtype inside to() along with torch_device.

@sayakpaul sayakpaul changed the title Remove torch_dtype to end deprecation Remove torch_dtype in to() to end deprecation Feb 7, 2024
@DN6

DN6 commented Feb 7, 2024

Copy link
Copy Markdown
Collaborator

Correct. But it would mean we should change all references to using to(torch_dtype= so that the slow tests will correctly set their dtypes right?

@sayakpaul

Copy link
Copy Markdown
Member Author

That is taken care of :-)

@yiyixuxu yiyixuxu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thank you:)

@sayakpaul sayakpaul merged commit 1835510 into main Feb 8, 2024
@sayakpaul sayakpaul deleted the remove-torch-dtype branch February 8, 2024 04:09
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* remove torch_dtype from to()

* remove torch_dtype from usage scripts.

* remove old lora backend

* Revert "remove old lora backend"

This reverts commit adcddf6.
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