{"record":{"id":"0ce95fafb2bd3b25","repo":"AUTOMATIC1111/stable-diffusion-webui","slug":"no-checkpoints-found-when-searching-for-checkpoin","errorCode":null,"errorMessage":"No checkpoints found. When searching for checkpoints, looked at:\n - file {os.path.abspath(shared.cmd_opts.ckpt)}\n - directory {model_path}\n - directory {os.path.abspath(shared.cmd_opts.ckpt_dir)}\nCan't run without a checkpoint. Find and place a .ckpt or .safetensors file into any of those locations.","messagePattern":"No checkpoints found\\. When searching for checkpoints, looked at:\n - file (.+?)\n - directory (.+?)\n - directory (.+?)\nCan't run without a checkpoint\\. Find and place a \\.ckpt or \\.safetensors file into any of those locations\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"critical","filePath":"modules/sd_models.py","lineNumber":234,"sourceCode":"\r\n\r\ndef select_checkpoint():\r\n    \"\"\"Raises `FileNotFoundError` if no checkpoints are found.\"\"\"\r\n    model_checkpoint = shared.opts.sd_model_checkpoint\r\n\r\n    checkpoint_info = checkpoint_aliases.get(model_checkpoint, None)\r\n    if checkpoint_info is not None:\r\n        return checkpoint_info\r\n\r\n    if len(checkpoints_list) == 0:\r\n        error_message = \"No checkpoints found. When searching for checkpoints, looked at:\"\r\n        if shared.cmd_opts.ckpt is not None:\r\n            error_message += f\"\\n - file {os.path.abspath(shared.cmd_opts.ckpt)}\"\r\n        error_message += f\"\\n - directory {model_path}\"\r\n        if shared.cmd_opts.ckpt_dir is not None:\r\n            error_message += f\"\\n - directory {os.path.abspath(shared.cmd_opts.ckpt_dir)}\"\r\n        error_message += \"Can't run without a checkpoint. Find and place a .ckpt or .safetensors file into any of those locations.\"\r\n        raise FileNotFoundError(error_message)\r\n\r\n    checkpoint_info = next(iter(checkpoints_list.values()))\r\n    if model_checkpoint is not None:\r\n        print(f\"Checkpoint {model_checkpoint} not found; loading fallback {checkpoint_info.title}\", file=sys.stderr)\r\n\r\n    return checkpoint_info\r\n\r\n\r\ncheckpoint_dict_replacements_sd1 = {\r\n    'cond_stage_model.transformer.embeddings.': 'cond_stage_model.transformer.text_model.embeddings.',\r\n    'cond_stage_model.transformer.encoder.': 'cond_stage_model.transformer.text_model.encoder.',\r\n    'cond_stage_model.transformer.final_layer_norm.': 'cond_stage_model.transformer.text_model.final_layer_norm.',\r\n}\r\n\r\ncheckpoint_dict_replacements_sd2_turbo = { # Converts SD 2.1 Turbo from SGM to LDM format.\r\n    'conditioner.embedders.0.': 'cond_stage_model.',\r\n}\r\n\r","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/82a973c04367123ae98bd9abdf80d9eda9b910e2/modules/sd_models.py#L216-L252","documentation":"Raised by sd_models.py's checkpoint selection when checkpoints_list is empty: startup model discovery found no .ckpt/.safetensors in the models/Stable-diffusion directory, the --ckpt file, or --ckpt_dir. The WebUI cannot build a model without weights, so it raises FileNotFoundError listing every location it searched.","triggerScenarios":"First launch with no model downloaded; --ckpt pointing to a moved/deleted file; --ckpt_dir set to an empty or wrong directory; model directory permissions preventing enumeration; model file with an unsupported extension.","commonSituations":"Fresh installs where the user expected a bundled model; moving model folders and forgetting the --ckpt_dir flag; headless/API setups whose launch script passes a stale checkpoint path.","solutions":["Place a .ckpt or .safetensors file into the models/Stable-diffusion directory shown in the message","If using --ckpt, verify the path exists (ls the absolute path printed in the error)","If using --ckpt_dir, confirm it is the directory that actually contains the weights","Re-download the model (e.g. from huggingface.co/stabilityai or civitai) if the file was deleted or truncated to 0 bytes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import os, glob\nckpt_dirs = [os.path.join('models', 'Stable-diffusion')]\nfound = [f for d in ckpt_dirs for f in glob.glob(os.path.join(d, '*.safetensors')) + glob.glob(os.path.join(d, '*.ckpt'))]\nassert found, 'No checkpoint present; download one before launching'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep at least one .safetensors in models/Stable-diffusion before launching","Script installs: download the model first, then start the WebUI","Pin --ckpt/--ckpt_dir to stable absolute paths in service definitions"],"tags":["model-loading","checkpoint","startup","configuration"],"backgroundTag":null,"analyzedSha":"82a973c04367123ae98bd9abdf80d9eda9b910e2","analyzedAt":"2026-08-14T16:46:43.225Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}