immich-app/immich · error · Error

Unknown CLIP model: . Please check the model name for typos…

Error message

Unknown CLIP model: ${newConfig.machineLearning.clip.modelName}. Please check the model name for typos and confirm this is a supported model.

What it means

During system-config validation, Immich's SmartInfoService calls getCLIPModelInfo to resolve the configured CLIP model name; if the name is not in the known model catalog, validation fails with this error, preventing an unusable ML configuration from being saved.

Solutions

  1. Use one of the supported CLIP model names from Immich's ML settings (e.g. 'immich-app/ViT-B-32__openai' or 'immich-app/ViT-B-16__laion2b_s34b_b88k').
  2. Check for typos and exact casing of the model name in Administration > Settings > Machine Learning > Smart Search.
  3. After fixing, re-run the smart search job to rebuild embeddings with the valid model.
  4. Pin a known-good model name if upgrading Immich changed the supported list.

Example fix

// before
"clip": { "modelName": "ViT-B-32" }
// after
"clip": { "modelName": "immich-app/ViT-B-32__openai" }
Defensive patterns

Strategy: try-catch

Validate before calling

import { getCLIPModelInfo } from 'src/utils/misc';
try { getCLIPModelInfo(modelName); } catch { throw new Error(`${modelName} is not a supported CLIP model`); }

Try / catch

try {
  await api.updateConfig(config);
} catch (e) {
  if (/Unknown CLIP model/.test(e.message)) {
    config.machineLearning.clip.modelName = DEFAULT_CLIP_MODEL;
    await api.updateConfig(config);
  } else throw e;
}

Prevention

When it happens

Trigger: Saving a system config whose machineLearning.clip.modelName is misspelled, an unsupported/incompatible model name, or a name removed from Immich's supported list.

Common situations: Copy-pasting a HuggingFace model name that Immich's ML server doesn't support; typos like 'ViT-L-14' vs the exact supported string; upgrading Immich after a model was renamed/dropped.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of immich-app/immich@e55ac299a4 (2026-09-15). Data as JSON: /api/errors/3b898e7e6d8bb007. Report an issue: GitHub.

Appendix: source

Thrown at server/src/services/smart-info.service.ts:28

@Injectable()
export class SmartInfoService extends BaseService {
  @OnEvent({ name: 'ConfigInit', workers: [ImmichWorker.Microservices] })
  async onConfigInit({ newConfig }: ArgOf<'ConfigInit'>) {
    await this.init(newConfig);
  }

  @OnEvent({ name: 'ConfigUpdate', workers: [ImmichWorker.Microservices], server: true })
  async onConfigUpdate({ oldConfig, newConfig }: ArgOf<'ConfigUpdate'>) {
    await this.init(newConfig, oldConfig);
  }

  @OnEvent({ name: 'ConfigValidate' })
  onConfigValidate({ newConfig }: ArgOf<'ConfigValidate'>) {
    try {
      getCLIPModelInfo(newConfig.machineLearning.clip.modelName);
    } catch {
      throw new Error(
        `Unknown CLIP model: ${newConfig.machineLearning.clip.modelName}. Please check the model name for typos and confirm this is a supported model.`,
      );
    }
  }

  private async init(newConfig: SystemConfig, oldConfig?: SystemConfig) {
    if (!isSmartSearchEnabled(newConfig.machineLearning)) {
      return;
    }

    await this.databaseRepository.withLock(DatabaseLock.CLIPDimSize, async () => {
      const { dimSize } = getCLIPModelInfo(newConfig.machineLearning.clip.modelName);
      const dbDimSize = await this.databaseRepository.getDimensionSize('smart_search');
      this.logger.verbose(`Current database CLIP dimension size is ${dbDimSize}`);

      const modelChange =
        oldConfig && oldConfig.machineLearning.clip.modelName !== newConfig.machineLearning.clip.modelName;
      const isDimSizeChange = dbDimSize !== dimSize;

View on GitHub (pinned to e55ac299a4)