[Stable Diffusion] Prompt Sharing and Learning Thread

Sharinel

Active Member
Dec 23, 2018
598
2,509
With being out they've at least reduced the size of the file to about half of 0.9
There's claims you need at least 12gb vram to use it, which we already know is a massive lie considering comfyui already ran it fine (and fairly fast) on far less. On my 6gb it used less than 5gb and didn't use too much longer than other models on the same image size etc.

Testing in a1111 is another story though. To LOAD the model you need a lot of RAM, not vram, without settings you probably need close to 16gb, for me it used close to 32, but that's probably a case of "take as much as is free".
Having OOM with generating, while i can load it fine, even with --medvram it OOM for me so far. Maybe some settings can be tweaked, but hopefully they can optimize things in the code as it clearly should work on much less vram usage (which the case of comfy proves).
--lowvram lets me generate images, but speed is a major issue....3,5-4min on a 1024x image...funny enough it only uses 2.9gb during so in theory you should be able to use it on pretty small cards...with a lot of patience

(updated: have gotten it to run with --medvram so that's possibly with just 6gb vram too)
Tried the new XL model - at the moment it is very limited for support, most Loras and TI's won't work with it. However Dreamshaper has released an alpha of it's checkpoint for the new version.
Downsides - For faces at the moment you seem to be stuck with 1024x1024. Any variation in that very quickly gives you issues. I tried 1024x1536 and got plenty of 'horsefaces' :p Non-facial stuff seems to be fine however. Fingers/Hands are still a WIP, was hoping they had that fixed

Here's a closeup of a face I tried, was quite happy with the detail when I zoomed in

00007-4238320764.jpg
 

jberger990

Newbie
Mar 10, 2018
55
218
Anyone know how to get hair like in the below picture? Blunt Bangs and Twin Braids doesn't seem to work. I'm at the point where I am trying to find anime characters with similar styles just so I can download the lora.
 

Dagg0th

Member
Jan 20, 2022
279
2,746
Anyone know how to get hair like in the below picture? Blunt Bangs and Twin Braids doesn't seem to work. I'm at the point where I am trying to find anime characters with similar styles just so I can download the lora.
There is a guy on civitai with tons of Lora haistyles, I'll give you the link once I arrive at home but not sure if they have twin braided tails, you can try inpaint, and sketch inpaint, they give good results for specific stuff

Edit:

Here is the link but no twin braided, guess you have to inpaint or force it with controlnet
 
  • Like
Reactions: Mr-Fox

jberger990

Newbie
Mar 10, 2018
55
218
There is a guy on civitai with tons of Lora haistyles, I'll give you the link once I arrive at home but not sure if they have twin braided tails, you can try inpaint, and sketch inpaint, they give good results for specific stuff

Edit:

Here is the link but no twin braided, guess you have to inpaint or force it with controlnet
How would inpaint work for that? just draw over the head and keep redoing until I get what I want?
 
  • Like
Reactions: sharlotte

me3

Member
Dec 31, 2016
316
708
Tried the new XL model - at the moment it is very limited for support, most Loras and TI's won't work with it. However Dreamshaper has released an alpha of it's checkpoint for the new version.
Downsides - For faces at the moment you seem to be stuck with 1024x1024. Any variation in that very quickly gives you issues. I tried 1024x1536 and got plenty of 'horsefaces' :p Non-facial stuff seems to be fine however. Fingers/Hands are still a WIP, was hoping they had that fixed

Here's a closeup of a face I tried, was quite happy with the detail when I zoomed in

View attachment 2804300
Even in the limited testing i got to do i noticed many of the same issues there's always been with "anatomy", it's probably better as there's more pixels to work with and training should hopefully fix more. I haven't had a chance to see if the refiner fixes any of the issues, with the need to change model and pretty heavy load on memory it's a bit of a pain with my low specs.

Upside, hopefully, is that there should be a reduced need for negatives and "simpler" prompts in general. Hard to say how well they've succeed on that front so far, but clearly it's not that bad a start in many regards
 

me3

Member
Dec 31, 2016
316
708
Anyone know how to get hair like in the below picture? Blunt Bangs and Twin Braids doesn't seem to work. I'm at the point where I am trying to find anime characters with similar styles just so I can download the lora.
Image is not very well suited at telling what kind of braid no "positioning" of them, but something like "braided pigtails" might work. For a full "cut", you might get close with a "bob cut with braided bangs"...hairstyles are often very affected by seed and some models are very limited in what they want to produce
 

devilkkw

Member
Mar 17, 2021
323
1,093
With being out they've at least reduced the size of the file to about half of 0.9
There's claims you need at least 12gb vram to use it, which we already know is a massive lie considering comfyui already ran it fine (and fairly fast) on far less. On my 6gb it used less than 5gb and didn't use too much longer than other models on the same image size etc.

Testing in a1111 is another story though. To LOAD the model you need a lot of RAM, not vram, without settings you probably need close to 16gb, for me it used close to 32, but that's probably a case of "take as much as is free".
Having OOM with generating, while i can load it fine, even with --medvram it OOM for me so far. Maybe some settings can be tweaked, but hopefully they can optimize things in the code as it clearly should work on much less vram usage (which the case of comfy proves).
--lowvram lets me generate images, but speed is a major issue....3,5-4min on a 1024x image...funny enough it only uses 2.9gb during so in theory you should be able to use it on pretty small cards...with a lot of patience

(updated: have gotten it to run with --medvram so that's possibly with just 6gb vram too)
6gb with --medvram not work, i'm just curius and downloaded it because everywere i see people enthusiast about it, but i'm not really a fun of this checkpoint(i saw some good result and some bad, like every other model). So i decided to try.
Unable to load model as standard, so i added --medvram and model load, but Expected all tensors to be on the same device is the result. Unable to generate any image, but not a problem, i hope to see some result here.
 
  • Like
Reactions: Mr-Fox and Sepheyer

me3

Member
Dec 31, 2016
316
708
6gb with --medvram not work, i'm just curius and downloaded it because everywere i see people enthusiast about it, but i'm not really a fun of this checkpoint(i saw some good result and some bad, like every other model). So i decided to try.
Unable to load model as standard, so i added --medvram and model load, but Expected all tensors to be on the same device is the result. Unable to generate any image, but not a problem, i hope to see some result here.
Update if you haven't got 1.5.1, also launch options like --no-half and no-half-vae cause issues for some.
SDXL comes with vae so you shouldn't need to load that anyway.
 
  • Like
Reactions: devilkkw and Mr-Fox

Sharinel

Active Member
Dec 23, 2018
598
2,509
Is there a new way to upscale yet, or is it still just using the extras tab?
I've never set foot in the extras tab, couldn't tell you what it is for :)

My workflow is to generate the images at 512x768 on the txt2img tab, send any decent ones to img2img and then use ultimate sd upscaler in the script dropdown to upscale by 2x then 2x again (find this better quality result than x4 right away)

 
  • Like
Reactions: devilkkw and Mr-Fox

devilkkw

Member
Mar 17, 2021
323
1,093
Up to date. i think problem is Nvidia driver. what version are you running?
Tested. with last 536.67 i load model without --medvram in 70s. and generate image at 896x1152 in 15mino_O
Also lastet driver have problem, pushing out image is really slow: 52 sec in standard sd1.5 model.
With version 532.03 image with same setting take 14sec.
So:
536.67---SD-XL work--slow every creation
532.03---SD-XL don't work--fast in other model.

I downgrade driver again, not really need SD-XL at actual status. maybe work better in the future.

Taked a prompt and this is result in SD-XL, maybe some TI used waste quality? sdxl.png :
For comparison, same prompt in anime model:
nosdxl.png
 
  • Like
Reactions: Mr-Fox and Sepheyer

me3

Member
Dec 31, 2016
316
708
Tested. with last 536.67 i load model without --medvram in 70s. and generate image at 896x1152 in 15mino_O
Also lastet driver have problem, pushing out image is really slow: 52 sec in standard sd1.5 model.
With version 532.03 image with same setting take 14sec.
So:
536.67---SD-XL work--slow every creation
532.03---SD-XL don't work--fast in other model.

I downgrade driver again, not really need SD-XL at actual status. maybe work better in the future.

Taked a prompt and this is result in SD-XL, maybe some TI used waste quality? View attachment 2805185 :
For comparison, same prompt in anime model:
View attachment 2805193
it's not the driver version, mine isn't updated.
I had the same error but it went away, as i changed several things at the same time i'm not sure which (if any) of the changes affected it.
Start with just medvram and xformers, might be worth checking other optimizing settings if you're running that as well.

Also none of your TI or lora is likely to work well/correctly with SDXL as none of them are trained with anything closely relating to it as a base. Even many extensions don't really work with it.
 
  • Like
Reactions: Mr-Fox

Synalon

Member
Jan 31, 2022
225
663
Upscaler Ultrasharp Test.png

Upscaling test with a new model came out ok so I thought I'd share.

1) Start by rendering the image as usual.
2) Send to image to image and double the resolution size, I used denoise 0.25 but tests up until 0.5 seemed fine to me.
3) Send to Extras upscale by x2, use the 4xUltrasharp model ( You already increased it by 2 in image to image so this will make it x4 the original image size)

It seems to add a smoother edge as far as I can tell, I'm reasonably happy with it. Even an average image like this came out ok.
 

devilkkw

Member
Mar 17, 2021
323
1,093
it's not the driver version, mine isn't updated.
I had the same error but it went away, as i changed several things at the same time i'm not sure which (if any) of the changes affected it.
Start with just medvram and xformers, might be worth checking other optimizing settings if you're running that as well.

Also none of your TI or lora is likely to work well/correctly with SDXL as none of them are trained with anything closely relating to it as a base. Even many extensions don't really work with it.
With driver after 532.03 sd-xl work. The only issue i have is for pushing out image. I prefer stay on 532.03 because is fastest and wait for better implementation of sdxl. I remember first sd1.4, take about 4min for generate a512x512 image,i hope see sdxl better work in next month,just wait for it.
I'm not an expert on driver, but after version 532.03 they changed something, with newer version memory is better used and allow above x2 resolution without OOM error. but is really slow in pushing out image. Generation is fast, only pushing out is slow.
Also i've tested only with a1111 and don't know if it work's better on other UI.
Maybe someone test and post here their result for fast comparison, including driver version and UI used.
 
  • Like
Reactions: Mr-Fox

me3

Member
Dec 31, 2016
316
708
Reason for the slow times etc with newer drivers is because they changed it to use vram and ram together. that's why you don't get OOM either. Problem is that it does this regardless so even if you had enough vram for simpler stuff it still offloads things into ram so there's a fair bit of lag every time that happens. If they'd done this much more efficient and actually only used ram when truly needed the idea would have worked much better. Last i checked they'd even done this in such a moronic way that it can't be software controlled either so you can't "fix" or limit the offloading. Maybe they've changed this any version since i checked but it's another case of seemingly good ideas badly executed cause ppl don't think things through...
 
  • Like
Reactions: devilkkw

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
View attachment 2807296

Upscaling test with a new model came out ok so I thought I'd share.

1) Start by rendering the image as usual.
2) Send to image to image and double the resolution size, I used denoise 0.25 but tests up until 0.5 seemed fine to me.
3) Send to Extras upscale by x2, use the 4xUltrasharp model ( You already increased it by 2 in image to image so this will make it x4 the original image size)

It seems to add a smoother edge as far as I can tell, I'm reasonably happy with it. Even an average image like this came out ok.
Ultrasharp is great for anything not photo realism, in other words images without sharp edges. If you want photo realism use NMKD Superscale or NMKD Face. (the user has exceeded the datalimit for the month).
My own link:
Unzip in this folder: Stable-Diffusion\stable-diffusion-webui\models\ESRGAN
Don't use extra tab, instead use hiresfix in text2img, or use SD Upscale alt Ultimate SD Upscale ( I have not tried Ultimate) in img2img tab. You can find it in script menu. SD Upscale is very similar to hiresfix in that it generates new pixels that increase the quality of the image while upscale in extra tab only makes the image larger without any improvement in actual quality.
You could even get a decrease in quality if you use the wrong upscaler. The pro of SD Upscale over hiresfix is that it uses tiling.
The resolution you set in img2img tab sets the tile size and the multiplier how large the image will be in the end. This means that you can get a better result faster with less vram. The con is that you can't control how many steps it will use, like you can with hiresfix. It's a big pain that it takes so long to use hiresfix and it also is limited by your vram. I think that you preserve the image better with hiresfix and get potentially a better result. I'm not so sure about this anymore though as I used to be. Good testing has to be done. I don't know the difference between SD Upscale and Ultimate SD Upscale since I have only used SD Upscale so far. If you do widescreen images like I do with latent couple SD Upscale is a must. I have tried hiresfix, it does work but it's problematic and takes even more time than usual for some reason.
I don't see the benefit in doing upscaling 2 times. I would need to see convincing evidence first to believe this.
You could at least get to 4k easily with SD Upscale in one go without it taking ages. Just set the tile size small enough.
Example: You could generate 480 x 720 and then use SD Upscale with multiplier set to 3 and get 1440 x 2160. Technically this is a portrait format image in 4k. If you use the very common 512x768 and multiply by 4 you will get 2048x3072 wich is technically almost 6k in portrait format. It's the height that matters in the name "k" in a portrait image since it's ap a 3rd of the width of the widescreen image of the same height. Ok sorry for the long rambling post I hope I made my point clear enough.:LOL:
 

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,802
This is only an example and a proof of concept. With more time spent I'm sure I could get something more impressive and much better result. I think this make my point though. Don't use extra tab.. Use SD Upscaler or potentially the Ultimate SD Upscaler, though I'm not yet convinced it is any better. I did a quick test run but I need to do a lot more to reach any conclusion.

512x768 20steps very simple prompt, absolutereality
(same as Synalon though an older version).
(512x768)x4 with SD Upscale=2048x3072
ap 2.40min 8GB Vram GTX1070
00041-3220800376.png 00016-3220800376.0.png
 
Last edited:

Synalon

Member
Jan 31, 2022
225
663
Ultrasharp is great for anything not photo realism, in other words images without sharp edges. If you want photo realism use NMKD Superscale or NMKD Face. (the user has exceeded the datalimit for the month).
My own link:
Unzip in this folder: Stable-Diffusion\stable-diffusion-webui\models\ESRGAN
Don't use extra tab, instead use hiresfix in text2img, or use SD Upscale alt Ultimate SD Upscale ( I have not tried Ultimate) in img2img tab. You can find it in script menu. SD Upscale is very similar to hiresfix in that it generates new pixels that increase the quality of the image while upscale in extra tab only makes the image larger without any improvement in actual quality.
You could even get a decrease in quality if you use the wrong upscaler. The pro of SD Upscale over hiresfix is that it uses tiling.
The resolution you set in img2img tab sets the tile size and the multiplier how large the image will be in the end. This means that you can get a better result faster with less vram. The con is that you can't control how many steps it will use, like you can with hiresfix. It's a big pain that it takes so long to use hiresfix and it also is limited by your vram. I think that you preserve the image better with hiresfix and get potentially a better result. I'm not so sure about this anymore though as I used to be. Good testing has to be done. I don't know the difference between SD Upscale and Ultimate SD Upscale since I have only used SD Upscale so far. If you do widescreen images like I do with latent couple SD Upscale is a must. I have tried hiresfix, it does work but it's problematic and takes even more time than usual for some reason.
I don't see the benefit in doing upscaling 2 times. I would need to see convincing evidence first to believe this.
You could at least get to 4k easily with SD Upscale in one go without it taking ages. Just set the tile size small enough.
Example: You could generate 480 x 720 and then use SD Upscale with multiplier set to 3 and get 1440 x 2160. Technically this is a portrait format image in 4k. If you use the very common 512x768 and multiply by 4 you will get 2048x3072 wich is technically almost 6k in portrait format. It's the height that matters in the name "k" in a portrait image since it's ap a 3rd of the width of the widescreen image of the same height. Ok sorry for the long rambling post I hope I made my point clear enough.:LOL:
From what I saw with my testing the benefit to upscaling twice is that the first time is a small increase and it increases the resolution while keeping the detail ( mostly the eyes ) looking the way they should without distortion.

After its upscaled slightly once, when you do the second upscale the detail ( such as round pupils ) is already there and it refines it further. When I tried just upscaling by x4 the eyes looked all distorted in the pupils and required photoshop for me to fix.



I used this guys video mostly when I was testing
 
Last edited:
  • Like
Reactions: DD3DD and Mr-Fox