Skip to content

Fix implementation of float64 in torch_utils#16058

Closed
viking1304 wants to merge 2 commits intoAUTOMATIC1111:devfrom
viking1304:fix-torch-utils
Closed

Fix implementation of float64 in torch_utils#16058
viking1304 wants to merge 2 commits intoAUTOMATIC1111:devfrom
viking1304:fix-torch-utils

Conversation

@viking1304
Copy link
Copy Markdown
Contributor

Description

Implementation of float64 in torch_utils added in #15815 does not work as intended.

I was getting errors while testing PLMS, DDIM, DDIM CFG++ on my M3 Pro Mac.

TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

This is fixed implementation of float64, which now works as it was intended.

Screenshots/videos:

Checklist:

@viking1304 viking1304 changed the base branch from master to dev June 20, 2024 21:46
@viking1304 viking1304 mentioned this pull request Jun 20, 2024
4 tasks
@viking1304
Copy link
Copy Markdown
Contributor Author

@w-e-w should I close this PR in favor of #16088?

@w-e-w
Copy link
Copy Markdown
Collaborator

w-e-w commented Jun 25, 2024

TBH, I am not sure

one part of me thinks the new PR is totally reasonable providing 3.9 is nice

but another part of me thinks that we should drop 3.9 compatibility

  • we said on the readme we wrote python 3.10
  • Google Collab also has upgraded 3.10+
  • beginner users should just use the distribution package or use any of those third party installers
  • some extension uses match case syntax
  • also some and forcing anyone that is 3.9 to upgrade might reduce some version 3.9 completely issues so 3.9 compatibility like this in the future
    not only that I kind of hope that we could "officially" move to 3.11 for the improvements
    love the PEP 657: Fine-grained error location in traceback, that would make reading bug report much easier

I believe some devs are already using 3.11 > > I believe torch support is still not ready in 3.12

TLDR, as I am not the one making the decisions I don't need to use my brain to
I'll just leave the PR open and AUTO decide

@viking1304
Copy link
Copy Markdown
Contributor Author

I didn't notice any problem with 3.11 on Mac, but I still use 3.10 for my main installation and when I am testing code before submitting PRs. I also managed to use 3.12 with just a few minor tweaks and issues.

@w-e-w
Copy link
Copy Markdown
Collaborator

w-e-w commented Jun 25, 2024

https://github.com/pytorch/pytorch/releases/tag/v2.3.0

PyTorch support for Python 3.12 in general is considered experimental. Please use Python version between 3.8 and 3.11 instead. This is an existing issue since PyTorch 2.2.

@AUTOMATIC1111
Copy link
Copy Markdown
Owner

Already merged the other one.

@viking1304 viking1304 deleted the fix-torch-utils branch July 6, 2024 17:53
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.

3 participants