• Clear cache for a specific model.

    Removes cached model files for a specific model from IndexedDB storage. This forces the model to be re-downloaded on next use.

    Parameters

    • modelName: string

      Name of the model to clear from cache

    Returns Promise<void>

    Example

    // Clear specific model cache
    await clearModelCacheForModel('u2net');

    // Clear custom model cache
    await clearModelCacheForModel('u2net_custom');

    // Next session creation will re-download the model
    const session = await newSession('u2net');