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

[Bug]: Rendering Black images with sdxl #12019

Closed
1 task done
LazyCat420 opened this issue Jul 26, 2023 · 8 comments
Closed
1 task done

[Bug]: Rendering Black images with sdxl #12019

LazyCat420 opened this issue Jul 26, 2023 · 8 comments
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance sdxl Related to SDXL

Comments

@LazyCat420
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

Rendering images I can see it but when it gets to the last 10% it goes black and the output in the folder is also a black image. I don't get any error messages. Has anyone else run into this problem? Used the sdxl 0.9 base in txt2img.

Steps to reproduce the problem

Settings

a cat driving a cat car, high detail
Negative prompt: ugly, deformed, disfigured
Steps: 40, Sampler: Euler a, CFG scale: 7.5, Seed: 2295296581, Size: 512x512
Model: Everyjourney_SDXL_pruned, Version: v1.5.0

What should have happened?

should have gotten a picture of a cat driving a car.

Version or Commit where the problem happens

Version: v1.5.0

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

Cross attention optimization

xformers

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

set COMMANDLINE_ARGS= --disable-safe-unpickle --xformers --disable-nan-check

List of extensions

n/a

Console logs

didn't get a error

Additional information

No response

@LazyCat420 LazyCat420 added the bug-report Report of a bug, yet to be confirmed label Jul 26, 2023
@w-e-w
Copy link
Collaborator

w-e-w commented Jul 26, 2023

don't --disable-nan-check

@akx akx added the sdxl Related to SDXL label Jul 26, 2023
@maxiy01
Copy link

maxiy01 commented Jul 27, 2023

Try using --no-half-vae

@w-e-w
Copy link
Collaborator

w-e-w commented Jul 27, 2023

webui it should auto switch to --no-half-vae (32-bit float) if NaN was detected
and it only checks for NaN when NaN check is not disabled (when not using --disable-nan-check)
this is a new feature in 1.5.0
so only enable --no-half-vae if your device does not support half or for whatever reason NaN happens too often

note some older cards might perform the worst with half the, so in this situations you might want to still use --no-half-vae

@thebongmaster
Copy link

I am also getting this issue, running on AMD GPU Radeon RX 6600 with latest SD webui

@allancorrigall
Copy link

I am also getting this issue, running on AMD GPU Radeon RX 6600 with latest SD webui

same. I'm on 6800 xt..

@pfeiffee
Copy link

I had this exact issue and the remove --disable-nan-check suggestion from @w-e-w solved it for me.

@catboxanon catboxanon added asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance and removed bug-report Report of a bug, yet to be confirmed labels Aug 26, 2023
@hansolocambo
Copy link

Except with a very small amount of models (Pony XL), every SDXL generates also black images for me. I can see the image but it disappears at the last second and saves a black image.
Been using SD for more than a year without issue. Any advice please ?
i9-2900K, RTX 3090

@w-e-w
Copy link
Collaborator

w-e-w commented Jan 24, 2024

@hansolocambo are you using the sdxl-vae-fp16-fix
https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/blob/main/sdxl_vae.safetensors
xl on fp16 often produced NaN in VAE so if you are using fp16 which is the default when then you should use the fp16 fix vee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance sdxl Related to SDXL
Projects
None yet
Development

No branches or pull requests

9 participants