Tips and tricks

WebUI Stable Diffusion - set default settings

In AUTOMATIC1111’s Stable Diffusion WebUI (A1111), the UI elements (like sampling steps, CFG scale, width/height, sampler, Hires fix, etc.) reset to factory defaults every time you restart the WebUI because those values are not permanently saved by default — they are volatile session settings unless you explicitly make them persistent.

Here are the main ways to set default values that load automatically on startup (as of 2026, works in v1.10.x and dev branch):

Method 1: Edit ui-config.json (Most Reliable & Recommended)

This file stores the default values for nearly all sliders, dropdowns, checkboxes, and fields in the UI.

  1. Close the WebUI completely (close the Command Prompt window).
  2. In File Explorer, go to your WebUI root folder: F:\ai\stable-diffusion-webui
  3. Find and open ui-config.json with Notepad (or any text editor like Notepad++, VS Code).
    • If it doesn’t exist yet → generate one image first (it auto-creates on first use).
    • Make a backup copy first (e.g., ui-config.json.bak) in case something goes wrong.
  4. Search (Ctrl+F) for the setting you want to change. The keys are human-readable, like:
    • “txt2img/Sampling steps/value”: 20, → change to your preferred default, e.g. 30,
    • “txt2img/CFG Scale/value”: 7, → change to 7.5, or whatever you like
    • “txt2img/Width/value”: 512, → e.g. 768,
    • “txt2img/Height/value”: 512, → e.g. 1024,
    • “txt2img/Sampling method/value”: “DPM++ 2M Karras”, → change sampler name
    • “txt2img/Hires. fix/value”: false, → set to true, to enable by default
    • And many more (Hires denoising, seed -1, etc.)
    Example snippet to edit:JSON"txt2img/Sampling steps/value": 35, "txt2img/CFG Scale/value": 7.5, "txt2img/Width/value": 768, "txt2img/Height/value": 1024, "txt2img/Sampling method/value": "DPM++ 2M Karras", "txt2img/Hires. fix/value": true, "txt2img/Hires steps/value": 20, "txt2img/Denoising strength/value": 0.35, "txt2img/Upscaler/value": "4x-UltraSharp",
  5. Save the file.
  6. Relaunch webui-user.bat — the UI should now load with your new defaults.
  • Tip: To discover exact key names, change a setting in the UI → generate an image → go to PNG Info tab → drag the image in → it shows the key names in the parameters list (e.g., “Sampling steps: 35”).
  • Reset to factory: Delete or rename ui-config.json (and config.json if needed) → restart WebUI → it regenerates defaults.

Method 2: Use the Built-in “Defaults” Section in Settings Tab

  1. In WebUI → Settings tab (top menu).
  2. Left sidebar → Click Defaults (or search “defaults”).
  3. Adjust values here (e.g., default sampler, steps, CFG, resolution, etc.).
  4. Click Apply settings at the top/bottom.
  5. Click Reload UI (or restart WebUI) — some changes stick as new defaults.
  • This method writes to ui-config.json automatically.
  • Some advanced fields (e.g., custom quicksettings) may still need direct file edit.

Method 3: Quicksettings Dropdown (Top Bar Defaults)

The top bar (below model selector) has quick toggles (e.g., sampler, steps, CFG, resolution). These reset unless pinned.

  • Click the gear icon next to Quicksettings (or go Settings → User interfaceQuicksettings list).
  • Edit the comma-separated list to include your favorites (e.g., sampling_method, sampling_steps, CFG_scale, width, height, hr_scale, denoising_strength).
  • These become clickable defaults, but for permanent startup values, combine with ui-config.json.

Method 4: Extensions for Presets (If You Want Multiple Profiles)

If you switch workflows often (e.g., one for nudes, one for portraits):

Quick Tips & Troubleshooting

  • Changes not sticking? → Make sure you Apply settings + Reload UI (or full restart). Some require restart.
  • ui-config.json corrupted? → Delete it (backup first) → restart → regenerate.
  • Command-line defaults (rarely used): You can add args like –width 768 –height 1024 to webui-user.bat (set COMMANDLINE_ARGS=…), but this only sets CLI flags, not full UI defaults.
  • Always backup ui-config.json before big edits.

This should stop the resets. Start by editing ui-config.json for your most-used values (steps 35, CFG 7.5, 768×1024, DPM++ 2M Karras, Hires on, etc.) — test with a generation. If issues persist (e.g., specific field ignores changes), share which settings are resetting, and I’ll guide on the exact key.

Leave a comment

Your email address will not be published

{"type":"main_options","images_arr":"'#ffffff'","bg_slideshow_time":"0","site_url":"https:\/\/digitalzoomstudio.net","theme_url":"https:\/\/digitalzoomstudio.net\/wp-content\/themes\/qucreative\/","is_customize_preview":"off","gallery_w_thumbs_autoplay_videos":"off","base_url":"https:\/\/digitalzoomstudio.net"}