Closed SAC020 closed 2 weeks ago
if you're using bf16, do not use no-half vae. keeping issue open since it does need auto-handling in the code.
update: fixed in latest dev. still, don't use no-half with bf16. no-half is intended only to fix fp16. if you can use bf16, do so - its always preferred and do it natively without any upcasting.
no-half is intended only to fix fp16. if you can use bf16, do so - its always preferred and do it natively without any upcasting.
Thank you.
What do you mean by "do it natively without any upcasting"? Which settings to use / not use?
Is bf16 preferrable for SDXL as well, or just Flux? And why is it preferable? (speed, quality, VRAM...?)
Flux doesn't seem to work with fp16 at all, it throws errors similar to the above.
bf16 is preferable over fp16 nearly always, not just flux, only reason why it's not default for everyone is that it's only supported on rtx3000 and newer GPUs. it doesn't exist in older GPUs or GPUs from other vendors.
why, it's a longer story. fp16 has a chance to overflow on math operations, thus upcast (and no-half) options exist, so those operations where chance of overflow are higher, they are executed in fp32 instead - at the cost of double the memory and half the speed.
bf16 pretty much eliminates risk of overflows at the price of tiny bit smaller precision.
none of this is flux specific.
Thank you for the explanation
So these settings should be ok / preferable (provided rtx3000+):
Issue Description
Basic setup:
Precision type is BF16, but I get the same error using FP16
Version Platform Description
PS C:\ai\automatic> .\webui.bat --debug Using VENV: C:\ai\automatic\venv 17:06:05-115166 INFO Starting SD.Next 17:06:05-118143 INFO Logger: file="C:\ai\automatic\sdnext.log" level=DEBUG size=65 mode=create 17:06:05-119631 INFO Python: version=3.11.9 platform=Windows bin="C:\ai\automatic\venv\Scripts\python.exe" venv="C:\ai\automatic\venv" 17:06:05-269889 INFO Version: app=sd.next updated=2024-09-24 hash=c00bcde3 branch=dev url=https://github.com/vladmandic/automatic/tree/dev ui=dev 17:06:05-928611 INFO Repository latest available e7ec07f9783701629ca1411ad82aec87232501b9 2024-09-13T16:51:56Z 17:06:05-937044 INFO Platform: arch=AMD64 cpu=Intel64 Family 6 Model 165 Stepping 5, GenuineIntel system=Windows release=Windows-10-10.0.22631-SP0 python=3.11.9
Relevant log output
Backend
Diffusers
UI
Standard
Branch
Dev
Model
Other
Acknowledgements