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]: (A100) Generating fully black images at res over ~600x600 #5757

Closed
1 task done
Idkbythispoint opened this issue Dec 15, 2022 · 9 comments
Closed
1 task done
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@Idkbythispoint
Copy link

Idkbythispoint commented Dec 15, 2022

Is there an existing issue for this?

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

What happened?

When generating images with a higher res that about 600x600, all it generates is black

Steps to reproduce the problem

  1. Start the webui
  2. Try to generate a high-res photo
  3. Get fully black images

What should have happened?

It should have generated an image

Commit where the problem happens

/notebooks/invoke

What platforms do you use to access UI ?

Other/Cloud

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--share --enable-insecure-extension-access

Additional information, context and logs

I am using an A100-80G on Paperspace (Gradient)
Also seems to happen less on SD2

@Idkbythispoint Idkbythispoint added the bug-report Report of a bug, yet to be confirmed label Dec 15, 2022
@Idkbythispoint Idkbythispoint changed the title [Bug]: Generating fully black images at res over ~900x900 [Bug]: Generating fully black images at res over ~600x600 Dec 15, 2022
@E-16
Copy link

E-16 commented Dec 15, 2022

Stable Diffusion doesn't work with pictures that don't match 64x64 grid. For this reason, step of 64 was added for picture resolution.

In your case 600/64=9.375 has modulo, your close one is 9*64=576

@Idkbythispoint
Copy link
Author

Stable Diffusion doesn't work with pictures that don't match 64x64 grid. For this reason, step of 64 was added for picture resolution.

In your case 600/64=9.375 has modulo, your close one is 9*64=576

i know, and i still get it on higher (multiples of 64x64) resolutions like 1024x1024 and 2048x2048

@ataa
Copy link

ataa commented Dec 15, 2022

If 2.0 or 2.1 is generating black images, enable full precision with --no-half or try using the --xformers optimization.

@Idkbythispoint
Copy link
Author

Idkbythispoint commented Dec 15, 2022

If 2.0 or 2.1 is generating black images, enable full precision with --no-half or try using the --xformers optimization.

  1. Im using SD1.5
  2. all the --xformers optimization does is throw an error and crash

@ClashSAN ClashSAN changed the title [Bug]: Generating fully black images at res over ~600x600 [Bug]: (A100) Generating fully black images at res over ~600x600 Dec 16, 2022
@Death0Justice
Copy link

I don't know if it is the same problem, but I kinda experienced similar situation too. In my case it's the img2img randomly generate entire black images when the output resolution is high. I solved it using --no-half-vae, as it turns out my vae model doesn't mix well with half precision floating-point calculation. I guess you can try both --no-half and --no-half-vae.

@aliencaocao
Copy link
Contributor

Stable Diffusion doesn't work with pictures that don't match 64x64 grid. For this reason, step of 64 was added for picture resolution.

In your case 600/64=9.375 has modulo, your close one is 9*64=576

Original model doesn't, but this repo does, see #4978. The limitation is now 8x8. Also, the fact that you get a black image means the resolution is not an issue, because in cases where the resolution is not supported, webui will throw an error before even generating for 1 step.

@aliencaocao
Copy link
Contributor

Your issue is a random one right, meaning you don't get black image every single time.
This is a known issue for very long and happens across almost all GPUs. On GPUs without tensor cores, using FP16 seems to be the cause, but even on GPUs that properly supports FP16, it still happens randomly.

@Idkbythispoint
Copy link
Author

im not talking about odd resolutions, im talking about resolutions like 1024x1024 and 2048x2048. and the --no-half and --no-half-vae files got it to generate, but its just.... lines?
00036-2962026922-a titan from titanfall

@skywalkerx86
Copy link

skywalkerx86 commented Dec 20, 2022

I wasn't having this issue at all a day ago, then all of a sudden every gen is getting some black images. generally when using "highres fix". I turned on the "save before highres" and the 576x768's will save and the 768x1024 will be black. Not on every image, but seems fairly consistent on regen of the same seed, but often regens will work.
3090ti

update: i think my vae wasn't loaded correctly last time I started the server. I just noticed the gen's pre-highres-fix colors were more muted than the re-run that didn't gen a black image. Might want to play with your vae setting/which you're using just to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

7 participants