Automatic1111 - pmcculler/sd-dynamic-javascript GitHub Wiki
What is it?
- Automatic1111 is a front-end or interface for using Stable Diffusion. Do you need a front end? Strictly speaking... no... but you will want one in the first few minutes. And this is a good one with lots of features, extensibility, and extensions. There are others for different needs; LMK if you know of a UI comparison I can link to.
Where is it?
Where do I get it?
- You can do a git pull, if you know how to do that.
- Or here's a way to do it in one click or so on Windows: https://www.youtube.com/watch?v=rtUpIY9Opjs&t=511s
How can I install the release candidate?
- This method works for any release candidate, not just 1.6.0: https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/12751#
Various Problems!
I get this complaint every time though I ain't done nothing, should I be worried / do something? "no module: 'xformers'. Processing without..." and so on 3 times.
- If you have made no attempt to use xformers, a kind of optimization technique, then it is completely safe to ignore this. The warning is frankly confusing and probably shouldn't happen. It just freaks people out for no reason.
I can't switch to this cool checkpoint, it gives me an error ""Error while deserializing header: MetadataIncompleteBuffer" !
- The file is incomplete or corrupted. Delete the checkpoint file (in stable-diffusion-webui/models/Stable-diffusion unless you moved it) and download it again. Sorry!
Automatic1111 has gone nuts telling me some file or directory doesn't exist, and it doesn't even exist!
-
The error message looks like this: "FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\BLAH\AppData\Local\Temp\gradio\tmpBLAH.png'"
-
This is a bug. Creating the directory yourself will get you past it. Sorry.
I got this messages about NaNs and I didn't do nothin'n. "NansException: A tensor with all NaNs was produced in Unet."
- Try making an image with another model once then coming back to the one you're using now. Yeah, it sucks. Some kinda bug.
I can't load or use LoRAs anymore suddenly??
- If you're on at least A1111 1.5.0, then the LyCoris extension is no longer necessary and might be causing a problem. Disable it in the Extensions tab.
My LyCoris tab doesn't seem to be there anymore?
- If you're on at least A1111 1.5.0, the LyCoris extension now prints a warning asking you to remove it and does nothing. Its basic functionality was absorbed by A1111 so it is no longer needed, disable it in the Extensions tab.
My console is spammed with messages about connecting to 127.0.0.1/api/predict???
- Try disabling the de-oldify extension?
My colors don't affect the right things, or bleed all over the place! Help!
-
You can do some bleeding control with the BREAK keyword, but finer control is available through an extension! https://github.com/hnmr293/sd-webui-cutoff
-
Once you have it, you do this. Want a tree with green leaves and a tree with purple leaves? Prompt: "a tree with green leaves, a tree with purple leaves". Then with the extension you specify the 'target tokens' green and purple. That should do it. If you need to go beyond what this extension does, look at the latent coupling extension, the regional prompting extension, and inpainting.
The eyes won't render right and-
- Yes, it will do that. Try using one of several LoRAs focused on fixing up eyes found on Civitai. There are other techniques such as inpainting or eye mask detection that can assist as well.
How do I make the faces real faces?
- Try turning on "Restore Faces" or installing the extension ADetailer https://github.com/Bing-su/adetailer.
Wait what's this ADetailer thing?
- It's an extension for A1111; extensions add features to A1111 or change the way it works. ADetailer, or After Detailer, takes a pass at images right at the end of the generation process, and it will try to correct things for you. If you select a "face model" it will look for and "fix" faces - I find it to be fantastically good at that, much better than "Restore faces" - and if you select the hand model, it will look for and try to fix hands - I find it's not as good at that, but it sometimes works. You can select both models, too, or in Settings you can make it so you can select several models at once. ADetailer adds some time to image generation while it looks for faces and hands and what not, as you ask it to, but I feel it's quite worthwhile. Here's the extension information with how to use and install it: https://github.com/Bing-su/adetailer
I always get two identical image gens instead of one. What's the deal?
- One is the "grid" of one images. You can turn it off in the case that there's just one image generated somewhere in Settings.
Why can't I make my ranger/barbarian/dragonoid hold a sword?!
- Anecdotally, Stable Diffusion doesn't seem to be good at this. Be persistent. Also, this might help? https://civitai.com/models/69323/unlimited-blade-works-or-weapon-loha-beta
How can I get multiple characters on the same background?
-
Maybe this extension can help you? https://github.com/Extraltodeus/multi-subject-render
-
Otherwise, it could be inpainting for you.
Why are my images pale and faded?
-
You need a VAE to add some color!
-
- There are others well used for more realistic images, such as this one. https://civitai.com/models/76118/vae-ft-mse-840000-ema-pruned 👀
Something / Everything is screwed up, what do I do?
- Try restarting the UI, at the top of the Extensions tab.
- Try restarting the webui, by killing the process or closing its window or however you usually do it.
- Try switching to a different type of browser, like Chrome/Firefox.
- Reboot your computer.
- Try updating your extensions.
- Try disabling extensions until it works again.
- Try updating A1111.
- Try saving your existing A1111 directory and installing from scratch in a new one.
- Try installing a previous version of A1111 from github, in case the most recent release has a new bug.
My extensions are apparently incompatible! What now?
- You could politely ask the extension authors to resolve the issue. (Or if you are coding wizard do it yourself and share.) You could turn one and the on and off as needed to use one and the other. Or you could have parallel installations of A1111 with different extensions installed. Or you could find a different workflow or UI entirely, sorry.
The extent of my affections are destroying me!
- Those are song lyrics, not a problem with A1111. Probably.
What even is inpainting? Original? Fill? Great taste? What denoising scale should I use?
-
Inpainting is when you mask part of an image and ask the AI to generate a replacement for that part of the image; it could look a lot like what was there before, or nothing like it. As an example, you could mask part of the ocean and horizon and ask A1111 to draw a ship on the sea... and it will! Handy also for asking the AI to give something a second or third or fiftieth try, like, say... hands. More information and details: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#inpainting
-
Denoising in img2img: if just upscaling, denoise at around 0.2 - 0.3. Original mode, use about 0.5, for fill, use around 0.75.
-
And here's a great 9 minute video on the topic: https://www.youtube.com/watch?v=ocDWBDnDKt0
How do I train my own models?
-
Out of scope of the FAQ to cover in detail, but take a look at
-
- Articles on Civitai https://civitai.com/articles
-
- Search Youtube, there's good Stable Diffusion stuff there.
-
If you're worried about what rank to pick or resize to, this article would argue for fewer: https://github.com/cloneofsimo/lora/discussions/37
I get an error in kohya_ss about a kernel something on line 167...
- This really is beyond the scope of this FAQ but... 1000 series cards can't use the default optimizer, try switching to lion?
Training is not working. Help.
- Try asking politely in the Training channel in the Civitai discord.
I upgraded my video card at great expense, and now everything renders like crap!
- Stop webui. Delete the venv folder in A1111 to delete the driver specific cache. Restart. Cooking with fire!
Upscaling or Hires fix causes junk to appear, or just changes everything!
-
Turn the denoising value to below 0.3 and try again. Denoising is in the glossary.
-
Try changing the seed to random (-1) and running it again, maybe more than once.
-
Tweak the CFG in either direction (probably up?) and try again.
-
A different upscaler (see elsewhere in the FAQ) may produce results you find more pleasing.
Can I, like, make 3D models and stuff?
- Sure check this out https://civitai.com/articles/1065
User Interface
I have to redo everything from scratch every time I start the UI!
-
Try an extension: https://github.com/ilian6806/stable-diffusion-webui-state.git
-
You can also edit ui-config.json in the main install directory, but make a backup copy, be careful, and be aware that updating to a new version may overwrite your changes.
At least one of my styles doesn't seem to be working/applying correctly??
- Do you have the infolk comment extension, and end your prompt on a # comment line? Yeah, the styles are appended right onto it and thereby at least partially commented out. Either end on something else or make sure there's a newline before the important part of your style.
Glossary
Clip Skip
Denoising Strength
-
This is how much change you're enabling. Less than 0.3 means not too much, more than 0.5 means a fair amount. For example, if you set the denoising strength of an upscaler to a high value, the resulting image will have a higher resolution but might not look much like what you started with.
-
To adjust denoising in increments in the X/Y/Z plot script, use '0.15-0.6 (+0.05)' which will proceed from denoise strength 0.15 to strength 0.6 in increments of 0.05.
ENSD ?
- Eta noise seed delta, which means an offset applied to the generation seed. If set to the magic number 31337 it causes Automatic1111 seeds to align with NAI seeds. If you feel compelled to change yours, it's under Settings->Sampler Parameters->Eta noise seed delta.
Settings
Do I choose "GPU" or "CPU" for my random number generator source?
- Both will make the random numbers you need to generate images, but only the CPU setting makes it likely that you'll be able to generate the same image someone else did from a particular seed, settings, and prompt.
There are all kinds of settings, like "sigma min" - what do they mean?
- Let us know if you want to help out with clearly documenting any of that. 😁
Extensions
What's an extension?
-
Extensions add features to A1111 or change the way it works, many are third party. Lots can be found in the main index, look in the 'Extensions' tab in A1111, click on the 'Available' sub-tab and press the Load From button to get a list. These are curated at least a little bit before they are added to the list, but not afterwards, so the extensions are not guaranteed to do what you want or even what they say they will, but they do usually work, especially if they are recently updated.
-
- There are many extensions not in the main index that you can install if you find them, they will have install instructions.
Is there an extension for deleting images I don't like?
- Yes - https://github.com/AlUlkesh/sd_delete_button - keep in mind it always deletes the last rendered image.
Is there an extension for letting me have wildcards and random selection or random weights in my prompts?
- Yes, at least 3: Wildcards, Dynamic Prompts, and Unprompted. All in Available under the Extensions tab, unselect 'Ads' to see Unprompted in results.
Is there an extension that lets me using a programming language?
-
Yes, and there are a couple of different ways to integrate a programming language in Automatic1111.
-
- To control to flow of image generation, there's the built in Python custom code script (use --allow-code on your webui command line to see the script appear), a and a Lua extension
-
- To embed code in the prompt box, there's a Javascript extension.
Is there an extension for letting me make an image grid?
- The script X/Y/Z Plot, standard with Automatic1111, will let you do that for 1 to 3 dimensions (variables). For more ambitious grids with unlimited dimensions there is an Infinity Grid extension.
ADetailer
How do I make the faces not all look the same?
- Try turning down the denoiser strength in the dropdown options. It defaults to 0.4, try 0.3 and play from there.
What's the best extension?
- I dunno probably infolk comment? It's like 8 lines of code and super useful. Wait you didn't mean in terms of code elegance?
Controlnet
Can I use multiple OpenPose controlnets at the same time?
- Maybe? Try it.
Can I make my stuff glow??
- Probably look into this https://civitai.com/models/80536/lighting-based-picture-control-controlne
Can I train Controlnet myself?
- Here's the guide on how to do that: https://github.com/lllyasviel/ControlNet/blob/main/docs/train.md
Can I...
-
Here's a guide to Controlnet: https://stable-diffusion-art.com/controlnet/
-
Yes, though how well they in particular will combine is unknown, you'll have to experiment.
This eye mask extension wants CMAKE? Which wants DLIB??
- This extension https://github.com/ilian6806/stable-diffusion-webui-eyemask wants cmake, which is here https://cmake.org/download/ and on Windows follow this guide https://www.geeksforgeeks.org/how-to-install-dlib-library-for-python-in-windows-10/ for getting DLIB installed. It's apparently vital to get the right version of Visual Studio installed, install DLIB for all users, etc.
Dynamic Prompts
Can I use random weights for words/tokens/phrases and loras?
- Yes. Syntax is (hello world:{0.1|0.5|0.9|1.1}) or <lora:myneatlora:{0.2|0.4|1.8}> - fill in with numbers you want, or use wildcards to fetch them from a file. Caveat: using variant selection like this on a lora may mean that the lora does not appear in Hires Fix rendering. Words and phrases work fine.
When I use Dynamic Prompts (or other prompt magic) in Automatic1111 Styles, the syntax just gets dumped raw in the final prompt without getting processed, what do I do?
- Style contents are appended to the positive and negative prompts late, after Dynamic Prompts and similar extensions have already run, so Style contents won't get processed. Either do not use prompt magic in Styles, or use the Apply Styles button before generating. Apply Styles will paste the Style contents into the prompts immediately, so they will be processed during image generation, but it also clears the Styles dropdown.
How do I make my own extension? The instructions are... vague.
- We've written some! Some reasonably detailed instructions coming. Ping if you have immediate questions.
Troubleshooting
I'm getting a weird error about mismatched dimensions or something?
- Uncheck the optimizations listed until Settings -> Optimizations.
I was working right along and then Automatic1111 crashed and it won't even start up again, giving weird error messages like "it re-enables warnings on import" and I think it hates me.
- The crash probably messed up your install in a fundamental way. Move your install directory aside, install a fresh Automatic1111, and move the LORAS and checkpoints and other models and goodies from the old install to the new one, after you see that it's working again. Sorry a reinstall sounds drastic but it works a lot and even saves time with mysterious errors and hours of debugging.