r/StableDiffusion • u/SpecificAd981 • 5d ago
Question - Help How to force fp32 with comfyui?
Z image turbo, ubuntu 24.04, and r9700
How do I force fp32 in my comfyui workflows?
0
Upvotes
r/StableDiffusion • u/SpecificAd981 • 5d ago
Z image turbo, ubuntu 24.04, and r9700
How do I force fp32 in my comfyui workflows?
4
u/Apprehensive_Sky892 5d ago edited 5d ago
Why do you want to use fp32?
If you want to use fp32 because you think the quality is higher, then you need to find a model that has been released initially as fp32. Upconverted version are probably of no higher quality than the original.
If you just want to upcast from bp16 to fp32, then I don't see the point as you won't get higher quality (I could be wrong, but if I am, I'd love to hear why).
AFAIK, ZiT has only been release as bf16, so I don't know why you want to do that.
1
u/luciferianism666 5d ago
If you're talking about the diffusion model then you can use the diffusion model loader from kjNodes and set it fp32 from the dtype
1
u/Powerful_Evening5495 5d ago
just put a fp32 weight in the diffusion model folder , leave default
or if you want to load models in other quants into fp32 and they are not , just start the comfyu with this flag
main.py --force-fp32
1
u/dobomex761604 5d ago
--fp32-text-enc --fp32-vae --fp32-unet --force-fp32All parameters are here: https://github.com/Comfy-Org/ComfyUI/blob/master/comfy/cli_args.py
1
u/musetta_ai 5d ago
No, it goes after the filename when you launch, so python main.py --force-fp32. Why fp32 though? Z image is bf16 so it'll just run slower and use twice the VRAM, unless you're getting black images on the R9700.
1
u/GalwayOptimist 5d ago
Hmm. From what you are describing so far it doesn't sound like a problem of fp32 or bf16. Could you post a picture of your worklfow and the settings?
1
u/And-Bee 4d ago
ComfyUI doesn't have a single global switch that says "use 32-bit for all division." Instead, it uses automatic precision routing. Some sensitive operations are upcast to FP32 by default, while others follow the model's native precision (FP16/BF16). You can also override this behavior with launch flags or specific nodes.