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

On the problem that the same resolution can not be generated stably #2293

Closed
RokiRokiPoi opened this issue Oct 11, 2022 · 16 comments
Closed
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance

Comments

@RokiRokiPoi
Copy link

RokiRokiPoi commented Oct 11, 2022

When I use stable diffusion webui, I can generate 1600 896 images, but this is unstable, and black images usually appear. Besides, if I restart webui-user.bat, I may not be able to generate 1600 896 images.
I want to know why, if I can generate such a picture, why I can't generate it again because I restart it.If I really need to generate such a picture, what should I do to help me realize it?

  • OS:window10 i711800h 3060 6g laptop
  • Browser Microsoft edge
  • Commit revision :maybe it's Commit hash: 6a9ea5b
    4{@D 7_S2@}4I@LT_{WQ5](https://user-images.githubusercontent.com/115579908/195163904-1cb2fd80-f198-48f4-ad63-a532b2ed8051.png) i cannot generate 1600 896 picture ![TX8H244Y )V6Z48QPWI(D
    This is a 1600 960 resolution picture that I once generated.
    I am waiting for your reply.Please solve my problem.
@RokiRokiPoi RokiRokiPoi added the bug-report Report of a bug, yet to be confirmed label Oct 11, 2022
@RokiRokiPoi
Copy link
Author

4{@D 7_S2@}4~I@LT_{W`Q5
there is the error report

@aleksusklim
Copy link

Probably something in your system uses GPU resources too. Try this:

  1. Close all other applications (especially all other browser tabs).
  2. Disable hardware acceleration in your current browser (actually, you can use for this GUI one browser you like less – for example Edge or Firefox if you prefer Chrome for everyday tasks) and in other applications (notable example is Telegram Desktop).

@RokiRokiPoi
Copy link
Author

Actually, I started webui when I turned on my computer, At that time, there was no software that occupied memory or video memory. but it didn't work. Still can't generate pictures.

As for the choice of browser, I'm using edge now, and I can't generate such a picture without enable the hardware acceleration, that is, nothing has changed, which is why I feel very puzzled.

@ClashSAN
Copy link
Collaborator

ClashSAN commented Oct 11, 2022

@RokiRokiPoi
make use of --lowvram and --xformers. put both flags in commandline args in webui-user.bat. If you can't install the xformers, then --lowvram only.

..What you said above is strange, you cannot turn off hardware acceleration in the browser? Try a different one, I can disable this on Brave browser.

@kryztoval
Copy link

You can check how much vram you have available by using nvidia-smi command and reading the output
I see you are using waifu diffusion, that model is bigger unless you have pruned it.

You may have better luck using the low ram setting mentioned by others earlier.

In my setup it uses a lot more than 4gb of ram with no optimizations: Torch active/reserved: 8835/11526 MiB, Sys VRAM: 11458/24576 MiB (46.62%)

I can try your prompt if you share the txt generator for it.

@RokiRokiPoi
Copy link
Author

@ClashSAN
I'm sorry for my mistake. I mean, I still can't generate such a picture even though I have turned off hardware acceleration.
The last time I generated the resolution of 1600896, I used---medvram --no-half, but now I can't generate the image of 1600 896 by starting webui-user.bat even though I haven't changed anything.
Now I want to continue to use --medvram and --nohalf, I tried once --lowvram, but it was too slow, and it took nearly ten minutes to generate a picture.
Is xformer useful? If it can help me, I will try to install it.

@RokiRokiPoi RokiRokiPoi closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2022
@RokiRokiPoi RokiRokiPoi reopened this Oct 12, 2022
@RokiRokiPoi
Copy link
Author

OK, I found the problem:--no-half, delete--no-half. I can generate 1600 900 images (although many of them are black image).
Can someone tell me what role --no-half has? I feel it can help me improve the image quality.I'm not sure.

@aleksusklim
Copy link

Can someone tell me what role --no-half has?

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Troubleshooting#green-or-black-screen

But you stated you have GTX 3060 6Gb, it should not matter. You don't need no-half here.

I see you are using waifu diffusion, that model is bigger unless you have pruned it.

Personally, I merged WD with itself, saving as float 16 with that checkbox in merging tab – and it gave more lightweight file.

@RokiRokiPoi
Copy link
Author

RokiRokiPoi commented Oct 12, 2022

@aleksusklim
-- no-half really affects the quality of drawing for me, and I don't know how it is work. Even if I am a 3060, I still have black pictures, but there is no green picture.

But you stated you have GTX 3060 6Gb, it should not matter. You don't need no-half here.

I will upload those two pictures later, with the same tag and the same parameters but different results.

@kryztoval
Copy link

--no-half tells the model to use full precision numbers in memory instead of half precision which require less memory. The issue is that some cards do not support half precision like the GTX1650 IIRC.

Did you disable censorship? black images normally result if you create a NSFW image and did not tell the generator that NSFW was ok for you.

@RokiRokiPoi
Copy link
Author

00817-1329415664-((1girl)),(Resource Integration
disable the --no-half

00808-1329415664-((1girl)),(Resource Integration
enable the--no-half

@RokiRokiPoi
Copy link
Author

RokiRokiPoi commented Oct 12, 2022

--no-half tells the model to use full precision numbers in memory instead of half precision which require less memory. The issue is that some cards do not support half precision like the GTX1650 IIRC.

Did you disable censorship? black images normally result if you create a NSFW image and did not tell the generator that NSFW was ok for you.

no,i never generate the nsfw image
Maybe using nohalf is a negative optimization for me?

Turn off nohalf, my black image generation rate is much higher.

@kryztoval
Copy link

No half does disable an optimization. using half is faster. You only want to disable half if the gpu does not support it.

@kryztoval
Copy link

the images I see from your exact prompt are not even close in style to what you posted - how did you manage to get that with just 20 steps?

@ClashSAN
Copy link
Collaborator

@RokiRokiPoi xformers will nearly double your previous batch count, inferring it doubles available vram. so yes, very helpful it would auto-install and enable for you automatically. add to commandline args:

--xformers

also turn off the censorship and see if there's a difference

@0xdevalias
Copy link

0xdevalias commented Nov 1, 2022

A friend mentioned that using xformers could make things non-deterministic, and that there were a lot of references to it on the repo issues here. Wanting to understand a bit more about it, and link a bunch of potentially related issues together, I tried to find as many issues as I could that seemed to be related to xformers and the potential for it to be causing non-deterministic / unstable / inconsistent results:

The following may potentially be related (ordered by issue number):

Issues:

Discussions:

I also came across this thread in the xformers repo, which while I can't guarantee is related, am wondering if it might be:

And a question I raised on a PR in the diffusers repo:

@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 3, 2023
DrakeRichards pushed a commit to DrakeRichards/stable-diffusion-webui that referenced this issue Dec 20, 2023
Atry pushed a commit to Atry/stable-diffusion-webui that referenced this issue Jul 11, 2024
* add support for animal pose

* Update __init__.py

* fix typo

* flatten json result list

* format files

* remove unused functions

* 🚧 Support edit

* nits

* fix test expecetations

---------

Co-authored-by: huchenlei <[email protected]>
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
Projects
None yet
Development

No branches or pull requests

6 participants