Stable Diffusion web UIParameters & settings
A1111 Settings Explained: Steps, CFG, Seed, Hires. fix
In the AUTOMATIC1111 web UI, the settings that matter most are the checkpoint, sampling method and steps, width and height, CFG scale, seed and, for larger images, hires. fix with its denoising strength. Start from the defaults, fix the seed, and change one control at a time; that is how you learn what each one does to the model you have loaded.
The Stable Diffusion web UI by AUTOMATIC1111, usually shortened to A1111, puts every generation control on one screen. The Forge fork keeps the same layout with speed improvements, so this guide applies to both. The txt2img tab is where most work happens; img2img adds an input image and one extra slider. Below is what each control does, what to start with and how the settings interact.
The txt2img tab, top to bottom
At the top sit the checkpoint selector and, in most setups, the VAE selector. The checkpoint is the model and determines the look; the VAE decodes the final image and affects colour and fine detail. Leave the VAE on automatic unless colours look washed out, in which case pick the VAE recommended for your checkpoint.
Below are two text boxes: the prompt and the negative prompt. Then the generation controls, a Generate button, and the output gallery with buttons to send the result to img2img, inpainting or extras. Each saved image also receives its full settings as metadata, which the PNG Info tab can read back.
The core controls
- Sampling method. The algorithm that denoises each step. DPM++ 2M Karras and Euler a are dependable defaults; the names appear in the dropdown. Change this last, not first.
- Sampling steps. How many denoising passes. 20 to 30 is enough for most SD 1.5 and SDXL checkpoints. More steps cost time with little gain past about 30.
- Width and height. The native resolution of the model matters. SD 1.5 was trained around 512 pixels and SDXL around 1024. Going well above native in one pass produces repeated limbs and doubled subjects; that is what hires. fix is for.
- Batch count and batch size. Count runs the job several times in sequence; size generates several images at once and needs more video memory. Use count on a small card.
- CFG scale. How strictly the prompt is followed. 7 is the classic default. Lower values look softer and more natural; higher values become contrasty and literal, and above about 12 most models fall apart.
- Seed. The starting noise. -1 means random. The dice button sets -1; the recycle button copies the seed of the last image. Fix the seed before comparing any two settings.
Hires. fix and denoising strength
Hires. fix generates at the model’s native size, upscales the result, then runs a second pass over it. The upscaler dropdown chooses the method (Latent, ESRGAN variants and others), "upscale by" sets the factor, and hires steps sets the second-pass step count (0 reuses the main value). Denoising strength controls how much the second pass may change: 0.3 to 0.5 adds detail while keeping the composition; above 0.6 the image starts to reinvent itself.
In img2img the same denoising strength slider decides how much of your input image survives. 0.2 is a light retouch, 0.5 a strong restyle, 0.75 and above keeps little more than the layout. Combine a lower value with a higher CFG when you want the prompt to steer without losing the picture.
LoRA, weighting and prompt syntax
A LoRA adds a trained style or subject. In A1111 you call it from the prompt: <lora:filename:0.8>, where the number is the weight. The Lora tab under the Generate button inserts the tag for you. Most LoRAs also need a trigger word in the prompt; it is listed where you downloaded the file. Start at 0.7 to 0.8 and lower it if the LoRA overpowers the checkpoint.
Emphasis uses brackets: (golden hour:1.3) raises a term, [fog] lowers it. Keep weights between 0.8 and 1.4. Stacking several heavy weights fights the model. For prompt structure that works across models, the Stable Diffusion prompts guide goes deeper.
Settings at a glance
| Setting | What it does | Start with |
|---|---|---|
| Checkpoint | The model; decides style and subject range | One well-documented SD 1.5 or SDXL checkpoint |
| VAE | Decodes the final image; affects colour | Automatic, or the one your checkpoint recommends |
| Sampling method | Denoising algorithm | DPM++ 2M Karras |
| Sampling steps | Number of passes | 25 |
| Width / height | Output size | Native: 512 x 768 (SD 1.5), 1024 x 1024 (SDXL) |
| CFG scale | Prompt adherence | 7, then try 5 and 9 |
| Seed | Starting noise | -1 to explore, fixed to compare |
| Hires. fix | Two-pass upscale for large images | Off until the composition is right, then 1.5x at 0.4 denoise |
| Denoising strength | How much a pass may change the input | 0.4 for hires. fix, 0.5 for img2img |
| Batch count / size | Repeats in sequence / in parallel | Count 4, size 1 |
A method for learning any new checkpoint
- Load the checkpoint, set a simple prompt, leave everything at the defaults, seed -1, batch count 4. Look at what the model does unprompted.
- Pick the best of the four and recycle its seed.
- Run CFG 5, 7 and 9 on that seed. Choose.
- Run steps 20 and 35. If you cannot tell them apart, stay at 20.
- Only now add hires. fix, a LoRA or a different sampler, one at a time.
Save the final settings as a style (the Styles dropdown stores prompt and negative prompt) and keep the PNG, which stores everything else.
Try it
Prompt: close-up portrait of an elderly fisherman in a wool jumper, harbour at dusk behind him, soft overcast light, 85mm lens, film grain
Negative prompt: blurry, deformed, extra fingers, watermark, text, oversaturated
Sampler: DPM++ 2M Karras, steps 25, CFG 7
Size: 832 x 1216 (SDXL) or 512 x 768 (SD 1.5)
Seed: -1 for the first batch, then recycle the best
Hires. fix: off for the first pass
Once a seed works, switch hires. fix on at 1.5x with denoising 0.4 and compare the two. Then change only the CFG to see which version of the face you prefer.