AUTOMATIC1111/stable-diffusion-webui · error · Exception
Sampler {config.name} is not supported for SDXL
Error message
Sampler {config.name} is not supported for SDXL What it means
create_sampler() in sd_samplers.py refuses to build a sampler whose config carries options['no_sdxl']=True when the loaded model reports is_sdxl. Some sampler algorithms were never adapted to SDXL's UNet/attention shapes, so they are explicitly blacklisted for SDXL checkpoints instead of failing deep inside k-diffusion.
Source
Thrown at modules/sd_samplers.py:39
samplers_hidden = {}
def find_sampler_config(name):
if name is not None:
config = all_samplers_map.get(name, None)
else:
config = all_samplers[0]
return config
def create_sampler(name, model):
config = find_sampler_config(name)
assert config is not None, f'bad sampler name: {name}'
if model.is_sdxl and config.options.get("no_sdxl", False):
raise Exception(f"Sampler {config.name} is not supported for SDXL")
sampler = config.constructor(model)
sampler.config = config
return sampler
def set_samplers():
global samplers, samplers_for_img2img, samplers_hidden
samplers_hidden = set(shared.opts.hide_samplers)
samplers = all_samplers
samplers_for_img2img = all_samplers
samplers_map.clear()
for sampler in all_samplers:
samplers_map[sampler.name.lower()] = sampler.name
for alias in sampler.aliases:
View on GitHub (pinned to 82a973c043)
Solutions
- Switch to an SDXL-supported sampler such as DPM++ 2M, DPM++ SDE, Euler, or Euler a
- Update the WebUI — sampler/SDXL compatibility improves between releases and some samplers gained SDXL support
- If the sampler is required, use a non-SDXL (SD1.5/SD2.x) checkpoint
- For API scripts, derive the sampler list dynamically or catch this error and fall back to 'DPM++ 2M'
Example fix
# before (API payload pinned to an SD1.5-only sampler)
payload = {"sampler_name": "PLMS", ...}
# after
payload = {"sampler_name": "DPM++ 2M", ...} Defensive patterns
Strategy: validation
Validate before calling
from modules import sd_samplers
def is_sampler_ok_for_model(name, model):
cfg = sd_samplers.find_sampler_config(name)
return cfg is not None and not (getattr(model, 'is_sdxl', False) and cfg.options.get('no_sdxl', False)) Try / catch
try:
sampler = sd_samplers.create_sampler(name, model)
except Exception as e:
if 'not supported for SDXL' in str(e):
sampler = sd_samplers.create_sampler('DPM++ 2M', model)
else:
raise Prevention
- Derive sampler choices from the loaded checkpoint family instead of hardcoding
- For API clients, validate sampler_name against modules.sd_samplers.samplers before sending
- Re-check saved default settings after swapping to an SDXL model
When it happens
Trigger: Loading an SDXL checkpoint and requesting a sampler marked no_sdxl in all_samplers (historically PLMS and a few k-diffusion variants) via the UI dropdown, --sampler launch flag, or the API sampler_name field.
Common situations: Scripts or API payloads hardcoding a sampler name that worked for SD1.5 (e.g. 'PLMS') after switching to an SDXL model; stale saved default sampler in settings after swapping checkpoints.
Related errors
- Sampler not found
- Invalid encoded image
- always on script {alwayson_script_name} not found
- Cannot have a selectable script in the always on scripts par
- Init image not found
AI-assisted analysis of AUTOMATIC1111/stable-diffusion-webui@82a973c043 (2026-08-14).
Data as JSON: /api/errors/2f5744b16e30f08c.
Report an issue: GitHub.