b00af8a704
Phase 4.3: Largest component change. Adds cascading genre picker using Phase 3 style data, DiT model selector with backend sync, EditableSlider for all numeric parameters, LoRA load/unload panel, bulk generate, vocal gender selector. Batch size max kept at 4 (not 8), inference steps max kept at 32 (not 200) to prevent OOM. Added LoRA API stubs to api.ts. Added ditModel to GenerationParams type.
155 lines
3.1 KiB
TypeScript
155 lines
3.1 KiB
TypeScript
export interface Song {
|
|
id: string;
|
|
title: string;
|
|
lyrics: string;
|
|
style: string;
|
|
coverUrl: string;
|
|
duration: string;
|
|
createdAt: Date;
|
|
isGenerating?: boolean;
|
|
queuePosition?: number; // Position in queue (undefined = actively generating, number = waiting in queue)
|
|
progress?: number;
|
|
stage?: string;
|
|
generationParams?: any;
|
|
tags: string[];
|
|
audioUrl?: string;
|
|
isPublic?: boolean;
|
|
likeCount?: number;
|
|
viewCount?: number;
|
|
userId?: string;
|
|
creator?: string;
|
|
creator_avatar?: string;
|
|
ditModel?: string;
|
|
}
|
|
|
|
export interface Playlist {
|
|
id: string;
|
|
name: string;
|
|
description?: string;
|
|
coverUrl?: string;
|
|
cover_url?: string;
|
|
songIds?: string[];
|
|
isPublic?: boolean;
|
|
is_public?: boolean;
|
|
user_id?: string;
|
|
creator?: string;
|
|
created_at?: string;
|
|
song_count?: number;
|
|
songs?: any[];
|
|
}
|
|
|
|
export interface Comment {
|
|
id: string;
|
|
songId: string;
|
|
userId: string;
|
|
username: string;
|
|
content: string;
|
|
createdAt: Date;
|
|
}
|
|
|
|
export interface GenerationParams {
|
|
// Mode
|
|
customMode: boolean;
|
|
|
|
// Simple Mode
|
|
songDescription?: string;
|
|
|
|
// Custom Mode
|
|
prompt: string;
|
|
lyrics: string;
|
|
style: string;
|
|
title: string;
|
|
ditModel?: string;
|
|
|
|
// Common
|
|
instrumental: boolean;
|
|
vocalLanguage: string;
|
|
|
|
// Music Parameters
|
|
bpm: number;
|
|
keyScale: string;
|
|
timeSignature: string;
|
|
duration: number;
|
|
|
|
// Generation Settings
|
|
inferenceSteps: number;
|
|
guidanceScale: number;
|
|
batchSize: number;
|
|
randomSeed: boolean;
|
|
seed: number;
|
|
thinking: boolean;
|
|
audioFormat: 'mp3' | 'flac';
|
|
inferMethod: 'ode' | 'sde';
|
|
shift: number;
|
|
|
|
// LM Parameters
|
|
lmTemperature: number;
|
|
lmCfgScale: number;
|
|
lmTopK: number;
|
|
lmTopP: number;
|
|
lmNegativePrompt: string;
|
|
lmBackend?: 'pt' | 'vllm';
|
|
lmModel?: string;
|
|
|
|
// Expert Parameters
|
|
referenceAudioUrl?: string;
|
|
sourceAudioUrl?: string;
|
|
referenceAudioTitle?: string;
|
|
sourceAudioTitle?: string;
|
|
audioCodes?: string;
|
|
repaintingStart?: number;
|
|
repaintingEnd?: number;
|
|
instruction?: string;
|
|
audioCoverStrength?: number;
|
|
taskType?: string;
|
|
useAdg?: boolean;
|
|
cfgIntervalStart?: number;
|
|
cfgIntervalEnd?: number;
|
|
customTimesteps?: string;
|
|
useCotMetas?: boolean;
|
|
useCotCaption?: boolean;
|
|
useCotLanguage?: boolean;
|
|
autogen?: boolean;
|
|
constrainedDecodingDebug?: boolean;
|
|
allowLmBatch?: boolean;
|
|
getScores?: boolean;
|
|
getLrc?: boolean;
|
|
scoreScale?: number;
|
|
lmBatchChunkSize?: number;
|
|
trackName?: string;
|
|
completeTrackClasses?: string[];
|
|
isFormatCaption?: boolean;
|
|
}
|
|
|
|
export interface PlayerState {
|
|
currentSong: Song | null;
|
|
isPlaying: boolean;
|
|
progress: number;
|
|
volume: number;
|
|
}
|
|
|
|
export interface User {
|
|
id: string;
|
|
username: string;
|
|
createdAt: Date;
|
|
followerCount?: number;
|
|
followingCount?: number;
|
|
isFollowing?: boolean;
|
|
isAdmin?: boolean;
|
|
avatar_url?: string;
|
|
banner_url?: string;
|
|
}
|
|
|
|
export interface UserProfile {
|
|
user: User;
|
|
publicSongs: Song[];
|
|
publicPlaylists: Playlist[];
|
|
stats: {
|
|
totalSongs: number;
|
|
totalLikes: number;
|
|
};
|
|
}
|
|
|
|
// Simplified views for ACE-Step UI
|
|
export type View = 'create' | 'library' | 'profile' | 'song' | 'playlist' | 'search';
|