ML data always included in backup-metadata; remove --no-ml
ML metadata (face detections, CLIP embeddings) is not a separate category from the rest of the metadata. It is always fetched and included. The only opt-in is --exif (or --all) which requires downloading every file for EXIF extraction.
This commit is contained in:
@@ -11,7 +11,6 @@ import type { EnteFile } from "./model/types.js";
|
||||
export type ProgressCallback = (message: string) => void;
|
||||
|
||||
export interface MetadataBackupOptions {
|
||||
mlData?: boolean;
|
||||
exif?: boolean;
|
||||
onProgress?: ProgressCallback;
|
||||
}
|
||||
@@ -120,7 +119,6 @@ export const runMetadataBackup = async (
|
||||
opts?: MetadataBackupOptions,
|
||||
): Promise<void> => {
|
||||
const log = opts?.onProgress ?? (() => {});
|
||||
const wantML = opts?.mlData ?? true;
|
||||
const wantExif = opts?.exif ?? false;
|
||||
|
||||
mkdirSync(outDir, { recursive: true });
|
||||
@@ -176,17 +174,13 @@ export const runMetadataBackup = async (
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch ML data in bulk if requested
|
||||
let mlDataMap = new Map<number, Record<string, unknown>>();
|
||||
if (wantML) {
|
||||
log("Fetching ML data (face detections, CLIP embeddings)...");
|
||||
mlDataMap = await fetchMLDataForFiles(
|
||||
client,
|
||||
[...fileKeys.keys()],
|
||||
fileKeys,
|
||||
);
|
||||
log(`Got ML data for ${mlDataMap.size} file(s)`);
|
||||
}
|
||||
log("Fetching ML data (face detections, CLIP embeddings)...");
|
||||
const mlDataMap = await fetchMLDataForFiles(
|
||||
client,
|
||||
[...fileKeys.keys()],
|
||||
fileKeys,
|
||||
);
|
||||
log(`Got ML data for ${mlDataMap.size} file(s)`);
|
||||
|
||||
// Write per-file JSON (with optional ML data and EXIF)
|
||||
const writtenFileIDs = new Set<number>();
|
||||
|
||||
Reference in New Issue
Block a user