Model Mismatch

Size mismatch loading a checkpoint

RuntimeError: Error(s) in loading state_dict …: size mismatch for … copying a param with shape … from checkpoint, the shape in current model is …

ComfyUI tried to load a model with the wrong architecture assumptions — the checkpoint’s weight shapes don’t match the model it is being loaded into.

What it means

When a checkpoint loads, its stored weights ("state_dict") must line up with the architecture ComfyUI expects. A size mismatch means at least one weight has a different shape than the target model — typically because the file is a different architecture than the loader assumes (loading an SDXL checkpoint as SD 1.5, or a Flux/other model through the wrong path), or the file is corrupted or partially downloaded.

Unlike an out-of-memory error, this fails immediately at load and is about compatibility, not capacity.

Common causes

  • Loading a checkpoint of one architecture with a loader/config for another.
  • A corrupted or incomplete model download.
  • A mismatched or incompatible VAE loaded alongside the checkpoint.
  • An unusual or non-standard checkpoint format the loader does not support.

How to fix it

  1. 1

    Confirm the model architecture

    Verify whether the file is SD 1.5, SDXL, Flux, or another family, and use the loader/config path intended for that architecture.

  2. 2

    Re-download if the file may be corrupted

    A partial or interrupted download produces shape errors. Re-download the checkpoint and compare file size/checksum where available.

  3. 3

    Match the VAE to the model

    If you load a separate VAE, ensure it belongs to the same architecture as the checkpoint.

  4. 4

    Use a known-good template for that architecture

    Load the model in a minimal, official example workflow for its architecture to confirm the file itself is valid before rebuilding your graph.

Recording each result’s exact checkpoint — architecture and version — alongside the workflow removes the guesswork about which loader a model belongs in.

Frequently asked questions

Frequently Asked Questions

Quick answers to the most common questions.

Related nodes

Related errors

Make every ComfyUI run reproducible

Numonic captures the full workflow behind each ComfyUI generation — models, samplers, seeds, prompts, and custom nodes — so a setup that finally works is one you can find and rebuild, not re-debug.