Open feffy380 opened 4 months ago
Are you sure that is the real reason for your problem?
I see the notice below on this page.
Note : this does not work with ControlNet or UNet-forward-hijacking Extensions!!
and I see this in your error log
File "/home/hope/src/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/batch_hijack.py", line 59, in processing_process_images_hijack
return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
What happens if you disable control or remove it?
p.s. I might be wrong. I am just stating what I see.
I'm not using controlnet. That's the line that falls back to the original processing function if the checkbox is disabled. The error only occurs when I use --precision half
.
I already pointed out the cause of the error (webui reporting the wrong dtype for the unet) and that setting the correct dtype resolves the issue. If I knew where it gets set I'd submit a PR myself
As I already wrote, I am not saying you are wrong about the root cause. I am just pointing out that based on your log, you are using ControlNet.
If I were you, I would temporarily remove the ControlNet extension and double-check if I get the same error without it. The error log should be slightly different without the ControlNet extension since you will not have that line I pulled out from your log.
We need to wait for the developers to get a proper answer.
Checklist
What happened?
sd_models_xl.extend_sdxl()
adds ashared.sd_model.model.diffusion_model.dtype
attribute to SDXL models, which is not updated after casting to float16 when using--precision half
. Anything relying on this attribute to determine the dtype of SDXL models will see float instead of float16. SD1.5 models are unaffected from what I've seen.I know of at least one extension that checks this attribute to determine the unet's dtype and is broken due to the misreported dtype: https://github.com/aria1th/sd-webui-deepcache-standalone/issues/9 Hardcoding the extension to use float16 or using
devices.dtype_unet
effectively works around the bug.Steps to reproduce the problem
--precision half
Refreshes caches when step is divisible by number
> 1float
based on misreported dtype but receivingfloat16
insteadWhat should have happened?
Extension runs without crashing.
What browsers do you use to access the UI ?
Mozilla Firefox
Sysinfo
sysinfo-2024-07-18-14-49.json
Console logs
Additional information
No response