Chroma InvalidDimensionException: Embedding Dimension Does Not Match Collection

Share
Ongoing Python, JavaScript, Docker Updated November 15, 2026Based on 3 user reportsHow we research

Quick answer

A collection locks its vector size on first write. Use the same embedding model, or create a new collection for the new model.

Most likely fix: Use the matching embedding model

How to fix it

Try these in order — the most common fix is first.

  1. 1. Use the matching embedding model

    1. Check which model created the collection
    2. Pass the same embedding_function on every get_collection call
    Did this fix it?
  2. 2. Start a new collection for the new model

    1. Create a new collection
    2. Re-embed and add your documents
    3. Delete the old collection once verified
    Did this fix it?

Symptoms

InvalidDimensionException: Embedding dimension 1536 does not match collection dimensionality 384 (numbers vary).

Why it happens

  • Switched embedding model after the collection was created
  • Collection reopened with a different embedding function
  • Upgrading to 0.5.0 and opening old persistent data (per the Chroma cookbook)

This guide also covers

  • chromadb embedding dimension does not match
  • InvalidDimensionException chroma
  • chroma dimension 384 1536

Still not working?

If Chroma keeps failing, you're not alone. See every Chroma problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other Chroma errors

All 11 Chroma errors and fixes →