I'm sure people smarter than us will be logging network traffic to be sure so yeah the local installs ought to be ok. Btw any tips on where to start on improving output from Stable Diffusion? Like an idiots guides to prompts or what extensions you need to install and how to do it etc?
That's a rabbit hole and a half. However, I will endeavour to drop some wisdom (Better to answer in this thread as the other one is more about ChatAI)
/Autism mode engaged
I'll assume you have nothing and start from there
Firstly you'll need to download Python & Git.
Make sure you install Automatic1111 through git
I recommend either installing on a dedicated SSD or a chunky HDD. Don't install to your main OS drive because the models will fill up your hard drive space in no time once you have a few of them given they are anywhere from 2-6GB each and you almost certainly will build up a collection (I have 710GB of models currently, and that's after pruning them down )
Stable Diffusion web UI. Contribute to AUTOMATIC1111/stable-diffusion-webui development by creating an account on GitHub.
github.com
That way you can update it easily via git pull. If it isn't then it's a case of manually downloading and overwriting files every time you want to update.
With my set up I have two installs on separate drives
1. For actual generation work (2GB SSD)
2. For testing models, etc etc ...before determining whether they are any good (2GB HDD Partition)
I only have the 2nd on set to automatically update, that way if there is an issue (which usually gets fixed quickly tbh) I'm not fucking up my main install.
My Win-User-Bat has these settings on the second less the 'git pull' on the first
Code:
@echo off
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS= --xformers --no-half-vae --opt-split-attention --disable-nan-check --autolaunch
git pull
call webui.bat
Update!! - if you have a pretty capable GPU then
look here and check against the
Cuda requirements as to whether you can run pytorch 2.0 and then follow the procedures there instead. No need for Xformers with Pytorch 2.0.
You can read up on the codes here: -
Stable Diffusion web UI. Contribute to AUTOMATIC1111/stable-diffusion-webui development by creating an account on GitHub.
github.com
Your go-to place for models is here
Explore thousands of high-quality Stable Diffusion & Flux models, share your AI-generated art, and engage with a vibrant community of creators
civitai.com
Though be aware you have to wade through a lot of anime waifus (and the odd furry stuff...*shudders*), and so you might want safe search on, however if : -
Safe mode off and too hell with the consequences
Unless you are planning on a career in mixing and merging models yourself don't bother downloading the 7GB versions you don't need them. Most pruned models are in the 2-4GB range and they are perfectly fine. You'll often find that ppl upload the big model straight away and then put up the pruned version a day or so later. Sometimes it is just worth doing a 'wait and see' on certain models. Esp as some creators have a bad habit of uploading a model then uploading an update to it a day or so later (it's like bruh.....seriously ),
You can just click on the model to download, however, someone made a handy extension here: -
Stable Diffusion Webui Extension for Civitai, to manage your model much more easily. - butaixianran/Stable-Diffusion-Webui-Civitai-Helper
github.com
That has a lot of functionality
The model landscape is always changing as new mixes and new models appear daily however some pretty dependable
1.5 models are these ones: -
civitai.com
Research Model - How to Build Protogen ProtoGen_X3.4 - Enbrace the ugly, if you dare... By Downloading you agree to the Seek Art Mega License , and...
civitai.com
DreamShaper - V∞! Please check out my other base models , including SDXL ones! Check the version description below (bottom right) for more info and...
civitai.com
Check my exclusive models on Mage: ParagonXL / NovaXL / NovaXL Lightning / NovaXL V2 / NovaXL Pony / NovaXL Pony Lightning / RealDreamXL / RealDrea...
civitai.com
One thing to get is a VAE which along with models improves outputs
There are about 3 of 4 different ones, some orientated towards anime, however, the main one is this: -
We’re on a journey to advance and democratize artificial intelligence through open source and open science.
huggingface.co
Often models will say they have a VAE, which you can download as well as the model, however, they're generally just the same 3-4 ones. If you want a simple life, just copy it to your model's folder and rename it with the model name + .var.ckpt or vae.safesensor and make sure under settings 'ignore selected VAE for stable diffusion checkpoints that have their own .vae.pt next to them'
Hopefully, at some point, some clever bastard will add some script that automatically can link this Model to that VAE without having to either manually select it or clone the same file, but right now it's not the case.
Anyway on settings: -
0. I don't bother with Grids
1. PNG always
2. Save text information about generation parameters as chunks to png files (super useful)
3. I like codeformers for face restoration, however increasingly models are way better at faces, so face restoration is less necessary but if you must go codeformers 0.5 0r 0.6 is usually sufficent
4. Ignore selected VAE for stable diffusion checkpoints that have their own .vae.pt next to them (as suggested earlier)
5. Enable quantization in K samplers for sharper and cleaner results. This may change existing seeds. Requires to restart to apply.
6. Add model hash to generation information
7. Add model name to generation information
8. When reading generation parameters from text into UI (from PNG info or pasted text), do not change the selected model/checkpoint. (sometimes you want to try out a prompt with a different model, not auto switch models).
9) Quicksettings list post this into the text box below : sd_model_checkpoint, CLIP_stop_at_last_layers, sd_vae
That will put the clipskip & VAE selection on the front end (where they should have been from the off)
10) anytime you move a model, embed or whatever in the files no need to restart SD, just refresh/reload the UI
Samplers I don't use I hide. I use the following: -
Euler A
The Karras ones
DDIM
PLMS (good for inpainting)
UnmiPC
None of the above should need to go beyond 40 steps to generate a decent image, and I wouldn't bother with additional steps with hi-rez fix (although use high-rez fix, more on that later)
CFG scale the lower it is the more random it gets the higher it is the more it tries to conform to the prompt. 7 - 10 are good ranges, if you want to be a bit looser then go lower (useful for Controlnet). I rarely ever go higher than 10.
Someone said a good rule of thumb is to take the CFG number ( say 7) and use that as the calc to work out your generation steps off of (so 7, 14, 21, 28, 35) but that could just be BS
under scripts, at the bottom of the UI you can X/Y a lot of stuff so set test generations to determine how different samplers compare etc etc
I wouldn't waste too much time with that though unless you want to get into finetuning an image to determine the best result.
From the official extensions, I'd recommend the following: -
https://github.com/Klace/stable-diffusion-webui-instruct-pix2pix
This allows you to change small things in an existing image easily without inpainting, though you do need to download the 7GB model for it work off of
an images browse for stable-diffusion-webui. Contribute to AlUlkesh/stable-diffusion-webui-images-browser development by creating an account on GitHub.
github.com
Basically an in UI browser that allows you to review and rate your generations and add to favourites for easy recall.
Contribute to Coyote-A/ultimate-upscale-for-automatic1111 development by creating an account on GitHub.
github.com
Adds more bells and whilst to upscaling, available from the imagetoimage scripts tab
You might want to look at ControlNet, dynamic prompts, prmptgen, wildcards & additional networks, though some of these are installed by default IIRC.
I don't have a bulletproof guide from prompting, you can generally find the prompt info used for models at Civiai with the models
I use this
Adds a button to download sample images in one click for CivitAI - tehrobber/civitai-one-click-dl
github.com
which requires the tamper monkey web extension to download quickly zip and download any model preview images, which I drop into a folder for easy reference and means I can load up the image via the PNG Info tab if required. All you do id refresh the page when on a civitai model page and the zip file appears under the downloads tab.
The main things I've learnt are: -
if using a
1.5 Model (which are the most popular) keep at least 1 dimension at 512 pixels. Typically I might generate images at 512x768 (2:3)
If you are using the
2.1 model then you have to have 768pixels as a minimum width
Don't get obsessed about trying to generate the same result as someone, even if you have all their generational data to hand. There are myriad factors involved the might have resulted in them getting the result they did versus yours from whether they used xformers to what build of A111 they were on.
Don't get too fussy about trying to massively upscale when initially generating using high res fix. Unless you have s 4090 your GPU will likely crap out when you go beyond trying to generate past x2. However you can upscale images after generation x4 and beyond easily either under the image to image or the extras tab.
It took me a long time to realise that. I do use the high rez fix as it boosts image quality and well as addresses errors, but I generally set it to 1.25 times, and then if I want to work the image I can always regenerate it using the seed into etc
There's a good overview of how to upscale effectively here: -
With high rez fix, it tends to default to 0.7, on the Denoising strength however the higher the number the bigger the regeneration and so you might want to use a lower scale like say 0.2-0.3 . as that way it's not radically remaking everything.
As mentioned before restore faces is not that useful. I generally turn it off now as the newer community models do a great job with faces and oftentimes, esp if you are using anime or semi-real models the outputs are worse for it.
Main thing is negative prompts are super useful, and you'll find that there are a lot of community-generated TI embed negative embeds.
For instance this guy has enhancement negative embeds for both 1.5 & 2.21 models which work really well, dependent on the image type
I put this together to make it easy for people to get them all in one page. Full details and examples can be found on the original model pages. Dan...
civitai.com
When it does come to upscaling you're not bound by the ones that come with SD you can find a load here: -
upscale.wiki
I really like
4x_foolhardy_Remacri
4xNMKD-Supeecale-SP_178000_G
Any anime/painterly/vector type stuff just use the R-ESRGAN-4X+ Anime6B which is installed as standard as that works pretty good.
Quick little insight into the UI. The purple tab toggles to your models/additional networks, and if you have the civitai helper installed it will add preview images for your models, embeds etc, as well as links to the civitai page, keywords, prompts, etc.
You can create subfolders within the various model's folders which is what I've done, so it's not one big old list of madness, although there is a search function. : -
You'll also find a lot of tutorials at civitai and their discord is pretty good for tips & tricks and the like.
and it's worth keeping tabs on the following YouTubers
Anyway...hopefully that will give you some things to think about. Hit me up on Discord though if you have particular questions.
Couple of quick prompt tips
() add emphasis/weight to the words in a prompt, so (big eyes) or ((big eyes)) or (big eyes:1.2) all work better than big eyes, on their own. If you want to add emphasis select the word then CTRL+Up arrow or just add the brackets yourself
Also
(Thing1|Thing2) in a prompt means that the generation will swap between whatever thing1 is and whatever thing2 is with every step to create an amalgam so (Emma Stone|Scarlett Johansson) would produce a hybrid between them.
However for more control though use [] instead : -
[Thing 1:Thing 2:##number of steps or #.# decimal of] which generates off the first until it either hits the number of steps or the decimal , where in it switched to the second.
So for instance
[emma stone|Scarlett Johansson: 0.5] would mean whatever the generational step count, 50% of the way through the generation would swap over to Scarlett for the remainder of the generation.
The later approach is going to give you a much more distinct look versus the former, esp as you can adjust it to fine tune the results.
/Autism mode dis-engaged
Be aware there are other SD applications like InvokeAI and ComfyUI (the latter of which everyone is raving about as it's quite adaptable), however, A1111 is by far the most popular and widely supported currently.
Also, don't get precious over generations. Ultimately SD is about batching on mass, picking out a few winners and working them up and discarding the rest. What you make today might seem like the bee's knees but 3 months from now you'll be like 'WTF do I still have this BS on my Rig?' I have old folders full of thousands of generations that are just lurking around in need of me having the desire to give them a good clean-up tbh. Nowadays I delete daily after every generation.