feat: 添加数据集元数据类型定义,包括标签和描述句子

This commit is contained in:
Vixalie
2026-03-26 22:38:05 +08:00
parent 0f32fef15f
commit d36b993031

36
src/lib/types/meta.ts Normal file
View File

@@ -0,0 +1,36 @@
export type DatasetMeta = {
name: string;
targetModel: string;
loraType: string;
unifiedImageSize: boolean;
unifiedImageRatio: boolean;
imageSize: [number, number];
triggerWords: string[];
}
export type Tag = {
id: string;
content: string;
weight: number;
category: string | null;
}
export type DescribeSentence = {
id: string;
content: string;
weight: number;
category: string | null;
}
export type ImageMeta = {
fileName: string;
bypassed: boolean;
originalSize: [number, number];
originalRatio: number;
cropStart: [number, number];
cropSize: [number, number];
tags: Tag[];
selectedTags: string[];
sentences: DescribeSentence[];
selectedSentences: string[];
}