{"record":{"id":"4ef2fbee82e79f82","repo":"lllyasviel/Fooocus","slug":"you-have-selected-base-model-other-than-sdxl-this","errorCode":null,"errorMessage":"You have selected base model other than SDXL. This is not supported yet.","messagePattern":"You have selected base model other than SDXL\\. This is not supported yet\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"modules/default_pipeline.py","lineNumber":55,"sourceCode":"        if p is not None:\n            if p in loaded_ControlNets:\n                cache[p] = loaded_ControlNets[p]\n            else:\n                cache[p] = core.load_controlnet(p)\n    loaded_ControlNets = cache\n    return\n\n\n@torch.no_grad()\n@torch.inference_mode()\ndef assert_model_integrity():\n    error_message = None\n\n    if not isinstance(model_base.unet_with_lora.model, SDXL):\n        error_message = 'You have selected base model other than SDXL. This is not supported yet.'\n\n    if error_message is not None:\n        raise NotImplementedError(error_message)\n\n    return True\n\n\n@torch.no_grad()\n@torch.inference_mode()\ndef refresh_base_model(name, vae_name=None):\n    global model_base\n\n    filename = get_file_from_folder_list(name, modules.config.paths_checkpoints)\n\n    vae_filename = None\n    if vae_name is not None and vae_name != modules.flags.default_vae:\n        vae_filename = get_file_from_folder_list(vae_name, modules.config.path_vae)\n\n    if model_base.filename == filename and model_base.vae_filename == vae_filename:\n        return\n","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/lllyasviel/Fooocus/blob/ae05379cc97bc4361ec8b4ec90193dab21be763f/modules/default_pipeline.py#L37-L73","documentation":"modules/default_pipeline.py hard-codes the Fooocus base pipeline to SDXL: assert_model_integrity() checks that the loaded base model's UNet (ignoring LoRA wrapping) is an instance of ldm_patched's SDXL class. A non-SDXL checkpoint (SD1.5, SD2.x) produces a different UNet class, so NotImplementedError('You have selected base model other than SDXL...') is raised. This fires when the default pipeline initializes/refreshes with an incompatible checkpoint.","triggerScenarios":"Selecting an SD1.5/SD2.x checkpoint (e.g. v1-5-pruned-emaonly.safetensors) as the base model in webui, or calling refresh_base_model with such a filename; the check runs on model_base.unet_with_lora.model's class.","commonSituations":"New Fooocus users dropping SD1.5 or non-SDXL fine-tunes into models/checkpoints and selecting them; pointing the checkpoint folder at a mixed SD1.5/SDXL collection and choosing the wrong entry.","solutions":["Use an SDXL checkpoint as the base model (e.g. sd_xl_base_1.0.safetensors, juggernautXL, dreamshaperXL) — check the filename/config for 'xl'/'sdxl'.","Move SD1.5 models out of models/checkpoints so they cannot be selected as base.","If you truly need SD1.5, you need a pipeline variant that supports it — Fooocus's default pipeline intentionally does not."],"exampleFix":"# before\nrefresh_base_model('v1-5-pruned-emaonly.safetensors')\n# after\nrefresh_base_model('sd_xl_base_1.0.safetensors')","handlingStrategy":"validation","validationCode":"from pathlib import Path\nname_l = name.lower()\nis_sdxl = 'xl' in name_l or 'sdxl' in Path(name).stem.lower()\nif not is_sdxl:\n    raise ValueError('base model must be an SDXL checkpoint (default pipeline limitation)')","typeGuard":"def looks_like_sdxl(checkpoint_name: str) -> bool:\n    n = checkpoint_name.lower()\n    return 'sdxl' in n or n.endswith('xl.safetensors') or '_xl_' in n or 'xl_' in n","tryCatchPattern":"try:\n    assert_model_integrity()\nexcept NotImplementedError as e:\n    print(f'Incompatible base model: {e}. Switch to an SDXL checkpoint.')\n    refresh_base_model('sd_xl_base_1.0.safetensors')","preventionTips":["Keep only SDXL checkpoints in models/checkpoints; store SD1.5 elsewhere.","When automating via API, validate the checkpoint name/config (look for 'xl') before refresh_base_model."],"tags":["sdxl","checkpoint","model-compatibility","pipeline","not-implemented"],"backgroundTag":null,"analyzedSha":"ae05379cc97bc4361ec8b4ec90193dab21be763f","analyzedAt":"2026-08-15T04:23:59.533Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}