[Stable Diffusion] Prompt Sharing and Learning Thread

Divine Cyberman

New Member
Feb 17, 2023
13
51
Hi, first post here. Still trying to figure out how inpainting to fix eyes/hands/etc works. Should I change the original prompt or leave it as is? Also, is it better to upscale the image before inpainting?
 

HardcoreCuddler

Engaged Member
Aug 4, 2020
2,395
3,072
I have a GPU with 3Gb of VRAM and I can generate images without problems (as long as I keep the resolution at 512x512 or its equivalent aspect ratio) The key is in the parameters of the 'webui.user.bat' file. Right-click and select 'Edit'. The content of the file will appear in the Windows notepad. Look for the line of code 'set COMMANDLINE_ARGS=' and after the equals sign write the following: "--medvram --opt-split-attention" without "". Save the file and run the .bat again. It works like this for me and I haven't had any problems, unless I want to raise the resolution to more than 512x512. I hope it helps you if you still haven't solved it.
Uhh yea thanks but I did solve it, "--xformers --opt-split-attention" did it for me
 
  • Like
Reactions: yomimmo and Mr-Fox

Mr-Fox

Well-Known Member
Jan 24, 2020
1,401
3,793
Hi, first post here. Still trying to figure out how inpainting to fix eyes/hands/etc works. Should I change the original prompt or leave it as is? Also, is it better to upscale the image before inpainting?
First go to settings and then Face restoration, choose "CodeFormer" and set the slider to 0.6 to begin with. When you generate images make sure that restore faces is checked. If the eyes are good from the start you don't need to edit them. In regard to inpainting I'm a beginner and can't help you.
This video is about fixing the eyes:
 

yomimmo

New Member
Nov 18, 2019
6
17
Uhh yea thanks but I did solve it, "--xformers --opt-split-attention" did it for me
Can you tell me how you did to make 'xformers' work for you? When I put that option in the 'webui.bat' it gave me an error and I had to remove them. And I see from your following image, that it allows you to generate even at 768x512. I can't get it to work at more than 512 or equivalent aspect ratio.
 
  • Like
Reactions: HardcoreCuddler

Sepheyer

Well-Known Member
Dec 21, 2020
1,528
3,598
Can you tell me how you did to make 'xformers' work for you? When I put that option in the 'webui.bat' it gave me an error and I had to remove them. And I see from your following image, that it allows you to generate even at 768x512. I can't get it to work at more than 512 or equivalent aspect ratio.
Can you post the screenshot of the error?
 
  • Like
Reactions: HardcoreCuddler

xmodo99

Newbie
Feb 20, 2020
17
16
Do you guys keep 2 or 3 SD tabs open in your browser to alternate different variations of prompts? For me that's key to keep tracking of things, I don't know if there is a more sophisticated way... Looking at the prompts from the pictures I generate is not the best, am I losing some kind of log function?
You can use the X/Y/Z prompt variation to see changes in prompts.

And I'm sure there's a gallery plugin somewhere, not sure what it's called. It shows all your previous generated images.
 
  • Like
Reactions: Mr-Fox

HardcoreCuddler

Engaged Member
Aug 4, 2020
2,395
3,072
Can you tell me how you did to make 'xformers' work for you? When I put that option in the 'webui.bat' it gave me an error and I had to remove them. And I see from your following image, that it allows you to generate even at 768x512. I can't get it to work at more than 512 or equivalent aspect ratio.
I really have no idea, I didn't do anything extra. I use the pfg model that seph uses as well, and just added those options
 

HardcoreCuddler

Engaged Member
Aug 4, 2020
2,395
3,072
It seems to me that --opt-split-attention is pretty much mandatory for around 4GB of VRAM right now.
After that, --xformers seems to give better performance (not sure what the exact downside is yet).
Then, --lowvram allows you to generate higher resolutions but completely FUCKS your speed.
--medvram also slows you down by like 2 times it seems but still allows me to generate close to 1000x1000 pixels which is pretty neat.
Thanks for coming to my ted talk
 

Sepheyer

Well-Known Member
Dec 21, 2020
1,528
3,598
--xformers seems to give better performance (not sure what the exact downside is yet).
The tradeoff for xformers:

"When xformers is enabled image generation can be faster, but can also lead to image generation no longer being deterministic. That means if you generate an image with the exact same settings as before the new image may be slightly different."
 

HardcoreCuddler

Engaged Member
Aug 4, 2020
2,395
3,072
The tradeoff for xformers:

"When xformers is enabled image generation can be faster, but can also lead to image generation no longer being deterministic. That means if you generate an image with the exact same settings as before the new image may be slightly different."
well yea I've read that myself but I've tried multiple times to get the same image, and the same image is what you get it seems. I never had it generate significantly different images. So honestly? I see no downside to xformers :)
 
  • Like
Reactions: Sepheyer

HardcoreCuddler

Engaged Member
Aug 4, 2020
2,395
3,072
Can you tell me how you did to make 'xformers' work for you? When I put that option in the 'webui.bat' it gave me an error and I had to remove them. And I see from your following image, that it allows you to generate even at 768x512. I can't get it to work at more than 512 or equivalent aspect ratio.
by the way you need an Nvidia GPU for xformers. It must take advantage of their deep learning thing afaik
 
  • Like
Reactions: Mr-Fox and Sepheyer

HardcoreCuddler

Engaged Member
Aug 4, 2020
2,395
3,072
I also just found out that editing an image using the windows photos app makes it unusable in certain scenarios.
An example would be img2img inpainting. I got "images don't match" errors continuously.
The fix is to reexport the image using a proper editor like GIMP while choosing to KEEP all the crap that the windows photo editor did to the image. Gimp convers all that metadata into actual modifications on the image instead of resaving as just metadata that tells apps how to process the image (rotation metadata was the one that was fucking me over in my case)
 
  • Like
Reactions: Mr-Fox and Sepheyer

fr34ky

Active Member
Oct 29, 2017
812
2,167
You can use the X/Y/Z prompt variation to see changes in prompts.

And I'm sure there's a gallery plugin somewhere, not sure what it's called. It shows all your previous generated images.
Nice, I'll check that out and see if it's comfortable for my workflow

First go to settings and then Face restoration, choose "CodeFormer" and set the slider to 0.6 to begin with. When you generate images make sure that restore faces is checked. If the eyes are good from the start you don't need to edit them. In regard to inpainting I'm a beginner and can't help you.
This video is about fixing the eyes:
Hey man, one of the things I'm not much experienced with is inpainting, I fixed a couple of things but it's not in my usual workflow so I don't feel like I have any say on this topic.
Still, I'm starting to have some doubts about using face restoration all the time, I've seen some guys like AItrepreneur having excelent results while NOT using face restoration while fixing faces with inpainting and I've seen that face restoration sometimes takes the face in a 'different direction' than the original one, specially if you are using a face from a LORA... just a theory, I started observing and trying that stuff yesterday.
 
  • Like
Reactions: Mr-Fox