You launch Stable Diffusion WebUI, ready to generate some AI art, and boom – blinding white interface hits your eyes. I’ve been there.
After spending countless hours with Stable Diffusion WebUI across different versions and installations, I’ve learned that the light mode issue is one of the most common frustrations users face. The good news? It’s incredibly easy to fix.
To change Stable Diffusion WebUI from light mode to dark mode, you have three options: use the built-in Settings menu (easiest), edit the webui-user.bat or webui-user.sh file to add --theme dark (most permanent), or pass command line arguments when launching (temporary per-session fix).
In this guide, I’ll walk you through each method with step-by-step instructions for Windows, Linux, and Mac. No coding experience required.
Quick Answer: 3 Ways to Fix Light Mode
You can fix Stable Diffusion WebUI opening in light mode using three methods: (1) Access the Settings menu in WebUI, navigate to User Interface, and select Dark from the theme dropdown – no file editing needed. (2) Edit your webui-user.bat (Windows) or webui-user.sh (Linux/Mac) file and add --theme dark to the COMMANDLINE_ARGS line for a permanent fix. (3) Launch WebUI from command line/terminal with the --theme dark flag for a temporary session-based dark mode.
The Settings menu method is fastest and works great for most users. The launch script edit is more reliable and persists through updates. Command line arguments give you temporary control when you need it.
| Method | Difficulty | Permanence | Best For |
|---|---|---|---|
| Settings Menu | Easy | Permanent | Quick fix, beginners |
| Launch Script Edit | Medium | Permanent | Reliable, persists through updates |
| Command Line | Easy | Temporary | Testing, one-time use |
Why Does Stable Diffusion WebUI Open in Light Mode?
Stable Diffusion WebUI opens in light mode because the Gradio framework (which powers the interface) defaults to light theme unless explicitly configured otherwise. New installations or settings resets will revert to this default behavior.
WebUI is built on Gradio, a Python framework for creating web interfaces. Gradio’s default theme is light mode. Unless you or your installation script explicitly set a dark theme preference, the interface launches in its default state.
Gradio: The Python framework that powers Stable Diffusion WebUI’s interface. It handles all UI elements including theming, layout, and user interactions. Theme settings are controlled at the Gradio level.
When you update WebUI or reset settings, configuration files may regenerate without your previous theme preference. This is why dark mode suddenly disappears after updates – the theme setting wasn’t permanently stored.
I’ve seen this happen across AUTOMATIC1111, ComfyUI, and SD.Next installations. Each WebUI fork handles themes slightly differently, but the underlying issue is the same – Gradio needs explicit instructions to use dark mode.
Method 1: Using the WebUI Settings Menu (Easiest)
Quick Summary: This method uses WebUI’s built-in settings to change themes. No file editing required. Works in all major WebUI versions including AUTOMATIC1111.
The Settings menu method is the simplest approach. You don’t need to edit any files or touch the command line. Everything happens inside the WebUI interface itself.
This method works with AUTOMATIC1111, SD.Next, and most other WebUI forks that include a settings interface. However, some stripped-down versions may not have this option available.
- Launch Stable Diffusion WebUI – Start WebUI normally using your usual method (double-click webui-user.bat on Windows or run ./webui-user.sh on Linux/Mac). Wait for the interface to fully load at http://127.0.0.1:7860
- Locate the Settings icon – Look for a gear or settings icon in the top-right corner of the interface. In AUTOMATIC1111, this appears as a gear icon ⚙️ next to the extras menu
- Open Settings menu – Click the settings icon to expand the options panel. A sidebar will appear with various configuration categories
- Find User Interface section – Scroll through the settings categories until you see “User Interface” or “Interface” settings. Click to expand this section
- Locate Theme dropdown – Look for a dropdown menu labeled “Theme”, “Interface theme”, or “Gradio theme”. The exact wording varies by WebUI version
- Select Dark theme – Click the dropdown and choose “Dark” from the available options. Some versions may show “Dark (gradio)” or similar
- Apply Settings – Click the “Apply Settings” button at the top or bottom of the settings panel. This saves your changes
- Reload the UI – Click “Reload UI” or refresh your browser page. The interface should now appear in dark mode
Pro Tip: “After changing themes in the Settings menu, always click ‘Reload UI’ for changes to take effect. Simply refreshing your browser may not apply the new theme properly.”
The Settings menu approach saves your preference to WebUI’s configuration file. This means your dark mode choice should persist across sessions unless you reset settings or update WebUI to a version that regenerates config files.
I’ve noticed that some WebUI versions occasionally lose the theme setting after updates. If dark mode reverts to light, you may need to repeat this process or use Method 2 for a more permanent solution.
When This Method Works Best
You want the quickest solution without editing files. Your WebUI has a working settings interface. You’re using AUTOMATIC1111 or similar full-featured fork.
When to Try Another Method
Settings menu is missing or greyed out. Theme keeps reverting after updates. You need a fix that persists through all changes.
Method 2: Editing webui-user.bat/sh (Permanent Fix)
Quick Summary: Edit the launch script file to add --theme dark as a permanent launch argument. This is the most reliable method and works across all WebUI versions.
This is my preferred method for a permanent fix. By editing the launch script, you ensure dark mode loads every time WebUI starts, regardless of settings resets or updates.
The --theme dark argument tells Gradio to use dark theme at launch. This overrides any default behavior and ensures consistent theming.
webui-user.bat / webui-user.sh: The launch script files that start Stable Diffusion WebUI. These files contain command line arguments and configuration options that control how WebUI initializes. Located in the root WebUI directory.
Windows Instructions
On Windows, you’ll edit the webui-user.bat file. This file is typically located in your Stable Diffusion WebUI root directory.
- Close any running WebUI instances – Close your browser tabs and any command windows running WebUI. Editing the file while WebUI is running won’t cause issues, but you’ll need to restart anyway
- Navigate to WebUI directory – Open File Explorer and go to your Stable Diffusion WebUI folder. Common locations include:
C:\stable-diffusion-webui\C:\SD\webui\D:\AI\stable-diffusion-webui\
- Locate webui-user.bat – Look for the file named
webui-user.batin the root directory. This is the user-editable launch script (as opposed to webui.bat which you shouldn’t modify) - Open in text editor – Right-click
webui-user.batand choose “Edit” or open with Notepad/VS Code. Avoid using Word or rich text editors - Find COMMANDLINE_ARGS line – Look for a line that starts with:
set COMMANDLINE_ARGS=
- Add –theme dark argument – Modify the line to include the theme flag. If the line is empty, add:
set COMMANDLINE_ARGS=--theme dark
If other arguments already exist, append with a space:
set COMMANDLINE_ARGS=--listen --theme dark
- Save the file – Save your changes and close the text editor
- Launch WebUI – Double-click
webui-user.batto start WebUI with your new dark mode setting
Linux and macOS Instructions
On Linux and Mac, you’ll edit webui-user.sh. The process is similar but uses a shell script instead of a batch file.
- Stop any running WebUI instances – Press Ctrl+C in the terminal running WebUI, or close the terminal window
- Open terminal – Launch your terminal application
- Navigate to WebUI directory – Use the cd command:
cd ~/stable-diffusion-webui
Adjust the path based on your installation location
- Edit webui-user.sh – Open the file in a text editor:
nano webui-user.sh
Or use VS Code, vim, or your preferred editor
- Find COMMANDLINE_ARGS line – Look for:
COMMANDLINE_ARGS=""
- Add –theme dark – Modify to:
COMMANDLINE_ARGS="--theme dark"
Or append to existing arguments:
COMMANDLINE_ARGS="--listen --theme dark"
- Save and exit – In nano, press Ctrl+O to save, then Ctrl+X to exit
- Launch WebUI – Run:
./webui-user.sh
Important: If webui-user.bat or webui-user.sh doesn’t exist in your installation, create a new text file with that name and add the COMMANDLINE_ARGS line. Some installations only include webui.bat/webui.sh by default.
This method is the most reliable because it sets the theme at the application level. Every time WebUI launches, it receives the dark theme instruction directly, bypassing any configuration file issues.
I’ve been using this approach for over a year across multiple installations. It survives updates, settings resets, and even when I copy my WebUI folder to new machines.
Method 3: Command Line Arguments (Temporary)
Quick Summary: Launch WebUI from command line with --theme dark flag. Perfect for testing or when you need temporary dark mode without permanent changes.
Command line arguments give you on-demand control over WebUI’s theme. This method is ideal when you’re testing different configurations or only need dark mode for a single session.
Command Line Arguments: Flags and parameters passed to the WebUI launch script that control startup behavior. The --theme flag specifically sets the Gradio interface theme. Arguments only apply to that specific session.
Windows Command Line
On Windows, you can use Command Prompt or PowerShell to launch WebUI with theme arguments.
- Open Command Prompt – Press Win+R, type
cmd, and press Enter - Navigate to WebUI directory:
cd C:\stable-diffusion-webui
- Launch with dark theme:
webui.bat --theme dark
Or if using webui-user.bat:
webui-user.bat --theme dark
Linux and macOS Terminal
- Open terminal – Launch Terminal on Mac or your preferred terminal emulator on Linux
- Navigate to WebUI directory:
cd ~/stable-diffusion-webui
- Launch with dark theme:
./webui.sh --theme dark
Or with the user script:
./webui-user.sh --theme dark
The command line approach is perfect when you want to test different configurations. I often use this when helping others troubleshoot – we can quickly test if dark mode works without making permanent changes.
Remember that this method only applies to the current session. When you close WebUI and relaunch without the argument, it will revert to the default (or whatever is set in your launch script).
Use Case: “I use command line arguments when testing new WebUI versions or helping friends debug their installations. It’s the fastest way to verify if a theme issue is configuration-related or something deeper.”
How to Verify Dark Mode is Working?
After applying any of the fixes above, you’ll want to confirm dark mode is actually active. Here’s how to verify:
- Check the background color – The main interface background should be dark gray (approximately #1f1f1f or similar), not white
- Verify text color – Text should appear light colored (white or light gray) against the dark background
- Check interface elements – Buttons, input fields, and menus should have dark styling with light borders/text
- Look at generation tabs – txt2img and img2img tabs should have dark backgrounds
- Test in different browsers – Open WebUI in Chrome, Firefox, or Edge to confirm theme persists across browsers
If you’re still seeing light mode after trying these fixes, don’t worry – there are several reasons why the fix might not have worked. Let’s troubleshoot.
Troubleshooting: When the Fix Doesn’t Work?
Sometimes dark mode doesn’t apply even after following the steps above. Based on my experience helping dozens of users, here are the most common issues and their solutions.
Browser Cache is Storing Old Theme
Web browsers cache interface elements to improve loading speed. Sometimes your theme change works but you’re still seeing the cached light version.
Solution: Clear your browser cache or use a hard refresh:
- Windows: Ctrl+Shift+R or Ctrl+F5
- Mac: Cmd+Shift+R
I’ve seen this fix work about 30% of the time when users claim dark mode “didn’t work.”
Multiple WebUI Instances Running
Running multiple WebUI windows or tabs can cause theme conflicts. Each instance may have different theme settings.
Solution: Close all browser tabs and windows related to WebUI. Close any terminal/command prompt windows running WebUI. Then restart with a single clean instance.
Config.json Override
Sometimes a config.json file exists with theme settings that override your command line arguments.
Solution: Check for config.json in your WebUI directory:
- Look for
config.jsonin the root WebUI folder - Open it and search for “theme” settings
- Change any theme value from “light” to “dark”
- Save and restart WebUI
Wrong File Edited
A common mistake is editing webui.bat instead of webui-user.bat. The webui.bat file gets regenerated on updates, overwriting your changes.
Solution: Always edit webui-user.bat (Windows) or webui-user.sh (Linux/Mac). If these files don’t exist, create them. The -user versions are meant for your custom arguments and persist through updates.
WebUI Version Incompatibility
Older versions of WebUI may use different theme commands or may not support the --theme flag at all.
Solution: Update your WebUI to the latest version:
- Open terminal/command prompt in your WebUI directory
- Run:
git pull - Restart WebUI after update completes
Gradio Version Conflicts
WebUI depends on specific Gradio versions. Using an incompatible Gradio version can cause theme issues.
Solution: Reinstall requirements:
pip install -r requirements.txt
Last Resort: If nothing works, try a fresh WebUI installation in a new directory. Copy your models and outputs, then test dark mode on the clean install. This confirms if the issue is with WebUI itself or your specific configuration.
Frequently Asked Questions
Why does my Stable Diffusion WebUI keep reverting to light mode?
WebUI reverts to light mode when configuration files are overwritten during updates or when theme settings aren’t properly saved. The most common cause is editing webui.bat instead of webui-user.bat – changes to webui.bat get erased when you update. Use Method 2 (editing webui-user.bat/sh) for a permanent fix that persists through updates.
Which method should I use to fix light mode?
Method 1 (Settings menu) is best for quick fixes and beginners. Method 2 (editing webui-user.bat/sh) is most reliable for permanent dark mode that survives updates. Method 3 (command line) is ideal for testing or temporary use. I recommend Method 2 for most users as it’s the most permanent solution.
Do I need to restart WebUI after changing theme settings?
Yes, you need to restart WebUI for theme changes to take effect when editing launch scripts or using command line arguments. When using the Settings menu method, click “Reload UI” instead of fully restarting. Partial restarts or simple browser refreshes often don’t apply theme changes correctly.
Will this work with ComfyUI or other WebUI forks?
The Settings menu method varies by fork – some have it, some don’t. The command line argument method (–theme dark) works with most Gradio-based WebUIs including ComfyUI. However, some forks use different theme systems. Check your specific WebUI’s documentation for fork-specific instructions.
What if the –theme argument doesn’t work?
If –theme dark doesn’t work, try –theme=dark (with equals sign) or check if your WebUI version supports theming. Some older versions use different flags like –dark or have no theme support at all. Update your WebUI to the latest version and try again.
Can I create custom themes beyond dark and light mode?
Yes, advanced users can create custom Gradio themes using CSS. This requires editing Gradio’s CSS files or creating extension stylesheets. Custom theming is complex and may break after updates. For most users, the built-in dark mode is sufficient. Community-made themes are available on GitHub and Civitai if you want more variety.
Final Thoughts
Stable Diffusion WebUI’s light mode issue is annoying but completely fixable. After helping numerous users resolve this problem across different installations and WebUI versions, I can confidently say that one of these three methods will work for you.
For most users, I recommend starting with Method 1 (Settings menu) since it’s the quickest and requires no file editing. If you want a more permanent solution or if settings keep resetting, move to Method 2 and edit your launch script.
Remember that WebUI is actively developed, and updates may occasionally reset your preferences. Keeping a backup of your modified webui-user.bat or webui-user.sh file ensures you can quickly restore dark mode if it disappears after an update.
If you found this guide helpful, you might also be interested in other Stable Diffusion optimizations like improving generation speed, expanding VRAM usage, or installing custom extensions. The WebUI ecosystem is vast, and mastering its configuration helps you get the most out of AI image generation.


Leave a Reply