PromptZone - Leading AI Community for Prompt Engineering and AI Enthusiasts

Cover image for Running Stable Diffusion XL Locally with Automatic1111
Arif Lefevre
Arif Lefevre

Posted on

Running Stable Diffusion XL Locally with Automatic1111

Stable Diffusion XL runs fine on a single consumer GPU, but it is not a drop-in swap for the older 1.5 checkpoints. Different native resolution, different prompt behaviour, an optional second model, and an incompatible LoRA ecosystem. This walks through getting SDXL working in the Automatic1111 web UI, the resolutions it was actually trained on, when the refiner pass earns its cost, and where the simpler Fooocus interface makes more sense.

What SDXL changed

Stability AI released SDXL 1.0 in July 2023. Three differences matter in daily use:

  • It was trained at 1024x1024, not 512x512. Asking SDXL for a 512px image gives you soft, badly composed output. The old habit of generating small and upscaling afterwards does not transfer.
  • It uses two text encoders instead of one. Prompts written for 1.5, with long comma-chained tag soup and heavy negative prompts, tend to underperform. Shorter, more descriptive natural-language prompts usually land better.
  • It ships as a base model plus an optional refiner. The refiner is a separate checkpoint trained to clean up the last denoising steps.

LoRAs, textual inversions and ControlNet models built for SD 1.5 also do not work with SDXL: the architectures differ. Check the base model listed on any download page before spending bandwidth on it.

Hardware you actually need

The base checkpoint in fp16 is roughly 7 GB on disk, and the refiner is a similar size again. For VRAM, 8 GB is a realistic floor for 1024x1024 generation, 12 GB makes life comfortable, and below 8 GB you will be leaning on memory-saving flags and accepting slower generations.

Automatic1111 exposes launch flags for this. --medvram-sdxl applies medium-VRAM optimisations only when an SDXL model is loaded, which is the right default on mid-range cards. --lowvram goes further and is noticeably slower.

Consumer graphics card installed inside a desktop computer case

Getting it running

  1. Update the web UI. Proper SDXL handling, including the refiner controls in the txt2img tab, arrived with the 1.6.0 release of Automatic1111's stable-diffusion-webui. Older installs need workarounds you do not want.
  2. Download sd_xl_base_1.0.safetensors from the SDXL base repository on Hugging Face and drop it in models/Stable-diffusion.
  3. Optionally add sd_xl_refiner_1.0.safetensors from the refiner repository to the same folder.
  4. Launch with the memory flag your card needs, then pick the base checkpoint in the top-left selector. The first generation after a model switch is always slow; that is the load, not the sampler.
  5. Set width and height to 1024x1024 before your first test. Leaving the default 512x512 in place is the single most common reason people conclude that SDXL is worse than 1.5.

Resolutions SDXL was trained on

SDXL was trained on a set of aspect-ratio buckets that all sit near one megapixel. Staying on or near them gives visibly better composition than picking arbitrary dimensions.

Aspect ratio Resolution Typical use
1:1 1024 x 1024 Avatars, product shots, general testing
4:3 / 3:4 1152 x 896, 896 x 1152 Editorial images, half-body portraits
3:2 / 2:3 1216 x 832, 832 x 1216 Photographic framing, full portraits
16:9 / 9:16 1344 x 768, 768 x 1344 Landscapes, banners, phone wallpapers
21:9 / 9:21 1536 x 640, 640 x 1536 Cinematic crops, tall panels

Pushing far above these numbers in one pass produces duplicated limbs and repeated horizons. Generate at a bucket resolution, then upscale with hires fix or a dedicated upscaler.

When the refiner is worth it

There are two ways to use the refiner. The built-in switch hands the image over partway through denoising, typically around 80 percent of the steps, so the base model composes and the refiner finishes. The alternative is to generate normally, send the result to img2img with the refiner selected, and run a low denoising strength around 0.2 to 0.3.

The refiner helps most on photographic material: skin texture, fabric weave, foliage, small background detail. It helps least on flat illustration, vector-style art and stylised anime, where it can sand off the very edges that made the image look deliberate. It also costs a second model in memory, and plenty of SDXL fine-tunes are meant to be used without it.

Vivid abstract digital artwork with swirling colored light

Fooocus when you want images, not settings

If configuring samplers and refiner switch points is not how you want to spend your evening, Fooocus is the alternative. It is built on SDXL, ships opinionated defaults, handles the refiner internally, applies prompt expansion automatically, and exposes a handful of style presets instead of a wall of sliders.

The trade-off is reproducibility. Because it rewrites and expands prompts behind the scenes, the same text will not reproduce the same image in Automatic1111 or ComfyUI. Use it for exploration; use A1111 when you need a result you can reproduce or script.

LoRAs for SDXL

A LoRA is a small set of adapter weights that shifts the model toward a subject, character or style without retraining it. Loading one in A1111 means adding <lora:filename:0.8> to your prompt, where the trailing number is the strength.

A useful example of a purpose-built SDXL LoRA is TShirtDesignRedmond, trained to produce flat, printable t-shirt graphics rather than photographic scenes. Practical rules that apply to almost any LoRA:

  • Start at strength 0.7 and adjust. Above 1.0 the LoRA usually swamps the prompt and flattens variety.
  • Use the trigger words listed on the model page. Many LoRAs simply do not activate without them.
  • Stacking more than two or three at once tends to produce muddy, averaged results.

Screen-printed graphic t-shirts hanging on a rail in a workshop

A prompt to test the install

Once the model loads, this is a reasonable first check: it leans on SDXL's strength with stylised portrait photography.

photography of a medicine man, character portrait, Wakanda, science-fiction, future, surreal, afrofuturism, mystical
Enter fullscreen mode Exit fullscreen mode

Negative prompt:

illustration, anime, 3D
Enter fullscreen mode Exit fullscreen mode

Run it on the SDXL base checkpoint at 832x1216, around 30 steps, CFG near 7, with a DPM++ sampler. Those are starting points, not magic numbers: change one variable at a time and keep the seed fixed.

Takeaways

  • Set 1024x1024 or another trained bucket before judging output quality.
  • Match your launch flags to your VRAM rather than fighting out-of-memory errors afterwards.
  • Treat the refiner as an optional finishing pass for photographic work, not a required second stage.
  • Only install LoRAs and ControlNet models explicitly built for SDXL.
  • Reach for Fooocus when you want output fast, and Automatic1111 when you need reproducibility.

Top comments (0)