[Stable Diffusion] Prompt Sharing and Learning Thread

Sharinel

Active Member
Dec 23, 2018
506
2,095
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
303
1,034
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
208
631
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
303
1,034
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,793
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,793
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
208
631
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

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,793
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 distored in the pupils and required photoshop for me to fix.
Ok but did you use SD Upscale script or just the normal img2img upscale? It's a big difference
 
  • Like
Reactions: Synalon

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,793
As I said I just doubled the res size in img to img. I haven't even started learning to use the scripts yet :p
Well this clears things up a lot. Also I forgot to ask what denoising strength you used. This is also very important. If you get distorsion, something is obviously wrong.. The normal upscale in img2img and extra tab, doesn't create any new pixels to the image it only enlarge what is already there. It can't invent new pixels. hiresfix and SD Upscale is part of the generative process and creates new pixels. This actually increases the image quality, while normal upscaling only make the image larger without any real increase in quality. If you look carefully most of the time you actually lose details. The normal upscaling smoothes the details out and you actually lose sharpness. I guess you will just have to try it out for yourself to see what I'm talking about.
 
Last edited:

Synalon

Member
Jan 31, 2022
208
631
Well this says a lot. Also I forgot to ask what denoising strength you used. This is also very important. If you get distorsion, something is obviously wrong.. The normal upscale in img2img and extra tab, doesn't create any new pixels to the image it only enlarge what is already there. It can't invent new pixels. hiresfix and SD Upscale is part of the generative process and creates new pixels. This actually increases the image quality, while normal upscaling only make the image larger without any real increase in quality. If you look carefully most of the time you actually lose details. The normal upscaling smoothes the details out and you actually lose sharpness. I guess you will just have to try it out for yourself to see what I'm talking about.
0.25 Denoising strength in the picture I posted, I tested up until 0.50. I mentioned it there because I wasn't sure it was correct, so its best to give everybody all the information I have so they can experiment as well.
 
  • Like
Reactions: Mr-Fox

felldude

Active Member
Aug 26, 2017
505
1,500
Has anyone had success with IMG to 3D or text to 3D (ALT title AI is commin fer yer jerbs...soon)
Img-3d.jpg

Also is Comfy UI the best solution to use SDXL 1.0
 

humanno21

Member
Dec 4, 2019
283
749
Sorry for a newbie question but I want to check if this is a route I should take or even explore. What is the purpose of this? I see only portraits posted. Can you do full scenes with sex with this?
 

Dagg0th

Member
Jan 20, 2022
203
1,990