Number one, pick a good checkpoint (model) that is relevant for the type of image you are attempting.
I would recommend:
You must be registered to see the links
,
You must be registered to see the links
,
You must be registered to see the links
.
Next is to make your prompt as good as possible with clear desription, properly weighted and sufficient negative prompt.
Weighting means how much emphasis is put on a tag and it's done like this: "(large breast:1.4)" .
It can also be used in order to decrease something: "(Diffused light:0.6)" .
Use negative prompts for things you don't want to see in your image. Such as (ugly), (disfigured), (deformed), (fused), (conjoined), (extra limbs), (missing limbs) etc. You can of course weight tags in the negative prompts as well.
It is very effective to use the positive prompt in unison with the negative prompt.
Positive: (large breast:1.4)
Negative: (small breast:1.4)
Don't use too "heavy" weighting though, it may "break" the prompt and make the result unpredictable and more likely to create monstrosities.
You can try to use "post processing". In settings/ Postprocessing, enable both GFPGAN and Codeformer.
They will show up in tx2img and img2img. You will then adjust "visibility" to activate them. Try either on it's own, and/or with "Restore Faces", or try them both together and/or with "Restore Faces". You can choose wich type of Restore Faces you are using in setting/Face Restoration. Try different amount of steps. Also try different amounts of CFG Scale. Try different samplers.
Euler a is fast and a good start but you can get more out of SD with others. I personally use "DPM++ SDE Karras" most of the time and sometimes "DPM++ 2m Karras". Heun is also very good but try them all.
If you want to compare settings in a way that is easy to overview. Use Plot script.
It will generate a table or grid of images.
You can have samplers in x-axis and amount of steps for each sampler in y-axis as an example.
If you have the GPU for it you can use Hires Fix. It is the largest image quality enhancement that is available at this moment.
Use as high multiplier ("upscale by") your GPU will allow. You will find the limit when you get cuda memory error.
Use Hires steps between 10-30, though 15-20 is usually good. Use 0.4-0.6 Denoising strength. Use a good upscaler.
Different upscalers will give slightly different results. The main difference is sharpness, light and color.
Lanczos or SwinIR_4x is a good start.
Miscellaneous "hidden" things that can increase the image quality:
Get the new VAE. You can read about it in this
post.
In settings/Stable Diffusion " Enable quantization in K samplers for sharper and cleaner results ".
If you have done everything up to this point but still have issues you can try "clip skip" in settings/Stable Diffusion.
2 is usually enough but sometimes 3 is the ticket.
Good Luck and remember to have fun.