kohya-ss / kohya-ss/sd-scripts
torch 2.4.0 does not work with fp8 training
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.2k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
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 :)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the README on the sd3 branch and its torch==2.4.0 and torchvision==0.19.0 installation guidance. Reproduce flux fp8 training with torch 2.4.0, then verify a dependency combination that supports both torchvision and fp8 training; done means the documented installation no longer produces the reported AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100