Skip to content

Conversation

@mh-dm
Copy link
Contributor

@mh-dm mh-dm commented Sep 12, 2022

When running on just cpu (intel), a call to torch.layer_norm would error with "RuntimeError: expected scalar type BFloat16 but found Float"
Fix buggy device handling in model.py.
Tested with scripts/dream.py --full_precision on just cpu on intel laptop. Works but slow at ~10s/it.

@tildebyte
Copy link
Contributor

This is tangential to this PR, but does this and other work in this repo mean that generation works on Intel CPUs (obviously very slowly), or is more work needed?

@mh-dm
Copy link
Contributor Author

mh-dm commented Sep 12, 2022 via email

When running on just cpu (intel), a call to torch.layer_norm would error with RuntimeError: expected scalar type BFloat16 but found Float
Fix buggy device handling in model.py.
Tested with scripts/dream.py --full_precision on just cpu on intel laptop. Works but slow at ~10s/it.
@lstein
Copy link
Collaborator

lstein commented Sep 12, 2022

Also probably tangential, but at least one 1660 Ti user is getting green images (#526), which was an earlier problem attributed to use of mixed precision (#61). Are there still places where we are using autocast inconsistently?

Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

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

Looks good to me. Tested and didn't find any problems on CUDA.

@lstein lstein merged commit 0bc6779 into invoke-ai:development Sep 12, 2022
@mh-dm mh-dm deleted the autocast branch September 12, 2022 21:17
@mh-dm
Copy link
Contributor Author

mh-dm commented Sep 12, 2022

Only orig_scripts/ may have questionable uses of autocast left. I do have an idea for #526 that I'll comment there.

afiaka87 pushed a commit to afiaka87/lstein-stable-diffusion that referenced this pull request Sep 19, 2022
…nvoke-ai#518)

When running on just cpu (intel), a call to torch.layer_norm would error with RuntimeError: expected scalar type BFloat16 but found Float
Fix buggy device handling in model.py.
Tested with scripts/dream.py --full_precision on just cpu on intel laptop. Works but slow at ~10s/it.
afiaka87 pushed a commit to afiaka87/lstein-stable-diffusion that referenced this pull request Sep 19, 2022
…nvoke-ai#518)

When running on just cpu (intel), a call to torch.layer_norm would error with RuntimeError: expected scalar type BFloat16 but found Float
Fix buggy device handling in model.py.
Tested with scripts/dream.py --full_precision on just cpu on intel laptop. Works but slow at ~10s/it.
afiaka87 pushed a commit to afiaka87/lstein-stable-diffusion that referenced this pull request Sep 21, 2022
…nvoke-ai#518)

When running on just cpu (intel), a call to torch.layer_norm would error with RuntimeError: expected scalar type BFloat16 but found Float
Fix buggy device handling in model.py.
Tested with scripts/dream.py --full_precision on just cpu on intel laptop. Works but slow at ~10s/it.
brycedrennan added a commit to brycedrennan/imaginAIry that referenced this pull request Nov 13, 2022
brycedrennan added a commit to brycedrennan/imaginAIry that referenced this pull request Nov 13, 2022
brycedrennan added a commit to brycedrennan/imaginAIry that referenced this pull request Nov 13, 2022
austinbrown34 pushed a commit to cognidesign/InvokeAI that referenced this pull request Dec 30, 2022
…nvoke-ai#518)

When running on just cpu (intel), a call to torch.layer_norm would error with RuntimeError: expected scalar type BFloat16 but found Float
Fix buggy device handling in model.py.
Tested with scripts/dream.py --full_precision on just cpu on intel laptop. Works but slow at ~10s/it.
mattstern31 added a commit to mattstern31/imagin-AIry-Python that referenced this pull request Nov 11, 2023
superlucky19971023 added a commit to superlucky19971023/imaginAIry that referenced this pull request Aug 18, 2024
PyPilot-ai pushed a commit to PyPilot-ai/PyPilot-ai that referenced this pull request Apr 9, 2025
PyPilot-ai added a commit to PyPilot-ai/PyPilot-ai that referenced this pull request Apr 13, 2025
tune-project1 added a commit to tune-project1/Viziax that referenced this pull request Apr 13, 2025
PyPilot-ai added a commit to PyPilot-ai/surveylogic that referenced this pull request Apr 14, 2025
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