InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: SDXL generated images are only black

Open jooray opened this issue 3 years ago • 11 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

macOS

GPU

mps

VRAM

96GB

What version did you experience this issue on?

3.0.1post3

What happened?

When generating images, I see progress with some blunt image as usual, but then the saved image is pure black color.

Using SDXL with refiner on mps backend.

Screenshots

Generating:

Screenshot 2023-07-30 at 22 52 01

Result:

Screenshot 2023-07-30 at 22 51 14

Additional context

No response

Contact Details

No response

jooray avatar Jul 30 '23 20:07 jooray

Since recent update / re-installation, I am also only getting pure black images on Windows. Just mentioning that this is not a Mac OS issue.

Vega-KH avatar Jul 30 '23 22:07 Vega-KH

@jooray @Vega-KH can you try with fp16 precision?

Millu avatar Jul 31 '23 02:07 Millu

I experienced the same also with fp16, I'm on a MacBook Pro M1 16GB RAM

KennethLj avatar Jul 31 '23 06:07 KennethLj

Same.

jooray avatar Jul 31 '23 07:07 jooray

With SDXL, if you use the default VAE, you need to select fp32 for VAE Precision. If you use the custom VAE that has fp16 in the name, you'll need to instead select fp16 for VAE Precision. Can you please confirm you have these set correctly?

psychedelicious avatar Jul 31 '23 08:07 psychedelicious

Ok, changing to VAE fp32 worked for me, thanks

KennethLj avatar Jul 31 '23 08:07 KennethLj

Great thanks for checking @KennethLj . I'll leave this open til we hear back from @jooray and @Vega-KH .

psychedelicious avatar Jul 31 '23 09:07 psychedelicious

Yes, changing to VAE fp32 worked. Maybe a better user interface that would not allow or at least warn that this won't work?

jooray avatar Jul 31 '23 12:07 jooray

With SDXL, if you use the default VAE, you need to select fp32 for VAE Precision. If you use the custom VAE that has fp16 in the name, you'll need to instead select fp16 for VAE Precision. Can you please confirm you have these set correctly?

FYI, I specifically replaced the built-in SDXL VAE (that I downloaded just a day after release, before it was rolled back to the 0.9 version on HuggingFace) with the third-party VAE supposedly fixed for fp16. This VAE DOES work in fp32 mode. I believe I tried it in fp16 mode and it still DID NOT work. But I can verify this evening.

Adreitz avatar Jul 31 '23 14:07 Adreitz

@Adreitz I may certainly be wrong about the fp16 custom VAE requiring you to select fp16, but if it also doesn't work in fp16, then there is some other issue.

I've created #4093 as a feature request to improved the UX for VAE Precision. Closing this issue now having gotten confirmation that this setting was the missing piece.

psychedelicious avatar Jul 31 '23 14:07 psychedelicious

Just to mention that I have the problem with fp16 too. Setting the VAE precision to fp32 worked.

metal3d avatar Aug 03 '23 20:08 metal3d