Skip to content
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

torch 2.4.0 does not work with fp8 training #1859

Open
ddpasa opened this issue Dec 27, 2024 · 1 comment
Open

torch 2.4.0 does not work with fp8 training #1859

ddpasa opened this issue Dec 27, 2024 · 1 comment

Comments

@ddpasa
Copy link

ddpasa commented Dec 27, 2024

The readme on the sd3 branch recommends installing torch==2.4.0 and torchvision==0.19.0. However, torch 2.4.0 gives the following error with flux fp8 training:

AttributeError: module 'torch' has no attribute 'float8_e4m3fnuz'

Upgrading to torch 2.4.1 fixes this issue. However, torchvision 0.19.0 is not compatible with 2.4.1 if you try to pip install, because torchvision 0.19.0 wants torch 2.4.0.

I have a hacky workaround where I install torch 2.4.0 to make torchvision 0.19.0 happy, and then I upgrade torch to 2.4.1. It seems to work fine, but there is probably a better solution :)

@ddpasa
Copy link
Author

ddpasa commented Dec 29, 2024

update, this fixed my issue, seems like a clean solution:

pip install torch==2.4.1 torchvision xformers --index-url https://download.pytorch.org/whl/cu124

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

No branches or pull requests

1 participant