mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 17:25:11 +03:00
feat(ml)!: customizable ML settings (#3891)
* consolidated endpoints, added live configuration * added ml settings to server * added settings dashboard * updated deps, fixed typos * simplified modelconfig updated tests * Added ml setting accordion for admin page updated tests * merge `clipText` and `clipVision` * added face distance setting clarified setting * add clip mode in request, dropdown for face models * polished ml settings updated descriptions * update clip field on error * removed unused import * add description for image classification threshold * pin safetensors for arm wheel updated poetry lock * moved dto * set model type only in ml repository * revert form-data package install use fetch instead of axios * added slotted description with link updated facial recognition description clarified effect of disabling tasks * validation before model load * removed unnecessary getconfig call * added migration * updated api updated api updated api --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm"
|
||||
|
||||
export class RenameMLEnableFlags1693236627291 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
UPDATE system_config SET key = CASE
|
||||
WHEN key = 'ffmpeg.classificationEnabled' THEN 'ffmpeg.classification.enabled'
|
||||
WHEN key = 'ffmpeg.clipEnabled' THEN 'ffmpeg.clip.enabled'
|
||||
WHEN key = 'ffmpeg.facialRecognitionEnabled' THEN 'ffmpeg.facialRecognition.enabled'
|
||||
ELSE key
|
||||
END
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
UPDATE system_config SET key = CASE
|
||||
WHEN key = 'ffmpeg.classification.enabled' THEN 'ffmpeg.classificationEnabled'
|
||||
WHEN key = 'ffmpeg.clip.enabled' THEN 'ffmpeg.clipEnabled'
|
||||
WHEN key = 'ffmpeg.facialRecognition.enabled' THEN 'ffmpeg.facialRecognitionEnabled'
|
||||
ELSE key
|
||||
END
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user