{"record":{"id":"2f5744b16e30f08c","repo":"AUTOMATIC1111/stable-diffusion-webui","slug":"sampler-config-name-is-not-supported-for-sdxl","errorCode":null,"errorMessage":"Sampler {config.name} is not supported for SDXL","messagePattern":"Sampler (.+?) is not supported for SDXL","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"modules/sd_samplers.py","lineNumber":39,"sourceCode":"samplers_hidden = {}\r\n\r\n\r\ndef find_sampler_config(name):\r\n    if name is not None:\r\n        config = all_samplers_map.get(name, None)\r\n    else:\r\n        config = all_samplers[0]\r\n\r\n    return config\r\n\r\n\r\ndef create_sampler(name, model):\r\n    config = find_sampler_config(name)\r\n\r\n    assert config is not None, f'bad sampler name: {name}'\r\n\r\n    if model.is_sdxl and config.options.get(\"no_sdxl\", False):\r\n        raise Exception(f\"Sampler {config.name} is not supported for SDXL\")\r\n\r\n    sampler = config.constructor(model)\r\n    sampler.config = config\r\n\r\n    return sampler\r\n\r\n\r\ndef set_samplers():\r\n    global samplers, samplers_for_img2img, samplers_hidden\r\n\r\n    samplers_hidden = set(shared.opts.hide_samplers)\r\n    samplers = all_samplers\r\n    samplers_for_img2img = all_samplers\r\n\r\n    samplers_map.clear()\r\n    for sampler in all_samplers:\r\n        samplers_map[sampler.name.lower()] = sampler.name\r\n        for alias in sampler.aliases:\r","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/82a973c04367123ae98bd9abdf80d9eda9b910e2/modules/sd_samplers.py#L21-L57","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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'"],"exampleFix":"# before (API payload pinned to an SD1.5-only sampler)\npayload = {\"sampler_name\": \"PLMS\", ...}\n# after\npayload = {\"sampler_name\": \"DPM++ 2M\", ...}","handlingStrategy":"validation","validationCode":"from modules import sd_samplers\ndef is_sampler_ok_for_model(name, model):\n    cfg = sd_samplers.find_sampler_config(name)\n    return cfg is not None and not (getattr(model, 'is_sdxl', False) and cfg.options.get('no_sdxl', False))","typeGuard":null,"tryCatchPattern":"try:\n    sampler = sd_samplers.create_sampler(name, model)\nexcept Exception as e:\n    if 'not supported for SDXL' in str(e):\n        sampler = sd_samplers.create_sampler('DPM++ 2M', model)\n    else:\n        raise","preventionTips":["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"],"tags":["sampler","sdxl","api","validation"],"backgroundTag":null,"analyzedSha":"82a973c04367123ae98bd9abdf80d9eda9b910e2","analyzedAt":"2026-08-14T16:46:43.225Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}