lllyasviel/Fooocus · error · NotImplementedError

You have selected base model other than SDXL. This is not su

Error message

You have selected base model other than SDXL. This is not supported yet.

What it means

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.

Source

Thrown at modules/default_pipeline.py:55

        if p is not None:
            if p in loaded_ControlNets:
                cache[p] = loaded_ControlNets[p]
            else:
                cache[p] = core.load_controlnet(p)
    loaded_ControlNets = cache
    return


@torch.no_grad()
@torch.inference_mode()
def assert_model_integrity():
    error_message = None

    if not isinstance(model_base.unet_with_lora.model, SDXL):
        error_message = 'You have selected base model other than SDXL. This is not supported yet.'

    if error_message is not None:
        raise NotImplementedError(error_message)

    return True


@torch.no_grad()
@torch.inference_mode()
def refresh_base_model(name, vae_name=None):
    global model_base

    filename = get_file_from_folder_list(name, modules.config.paths_checkpoints)

    vae_filename = None
    if vae_name is not None and vae_name != modules.flags.default_vae:
        vae_filename = get_file_from_folder_list(vae_name, modules.config.path_vae)

    if model_base.filename == filename and model_base.vae_filename == vae_filename:
        return

View on GitHub (pinned to ae05379cc9)

Solutions

  1. 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'.
  2. Move SD1.5 models out of models/checkpoints so they cannot be selected as base.
  3. If you truly need SD1.5, you need a pipeline variant that supports it — Fooocus's default pipeline intentionally does not.

Example fix

# before
refresh_base_model('v1-5-pruned-emaonly.safetensors')
# after
refresh_base_model('sd_xl_base_1.0.safetensors')
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path
name_l = name.lower()
is_sdxl = 'xl' in name_l or 'sdxl' in Path(name).stem.lower()
if not is_sdxl:
    raise ValueError('base model must be an SDXL checkpoint (default pipeline limitation)')

Type guard

def looks_like_sdxl(checkpoint_name: str) -> bool:
    n = checkpoint_name.lower()
    return 'sdxl' in n or n.endswith('xl.safetensors') or '_xl_' in n or 'xl_' in n

Try / catch

try:
    assert_model_integrity()
except NotImplementedError as e:
    print(f'Incompatible base model: {e}. Switch to an SDXL checkpoint.')
    refresh_base_model('sd_xl_base_1.0.safetensors')

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of lllyasviel/Fooocus@ae05379cc9 (2026-08-15). Data as JSON: /api/errors/4ef2fbee82e79f82. Report an issue: GitHub.