| 1 | /* ─── Provider + Model 分组结构 ─── */ |
| 2 | export interface ModelOption { |
| 3 | id: string; |
| 4 | label: string; |
| 5 | default?: boolean; |
| 6 | } |
| 7 | |
| 8 | export interface ProviderGroup { |
| 9 | provider: string; |
| 10 | label: string; |
| 11 | models: ModelOption[]; |
| 12 | } |
| 13 | |
| 14 | export type VideoGenerationMode = 'first_frame' | 'start_end_frame' | 'reference'; |
| 15 | |
| 16 | export const VIDEO_GENERATION_MODES: Array<{ id: VideoGenerationMode; label: string; ability: string; modelKey: string }> = [ |
| 17 | { id: 'first_frame', label: '首帧生视频', ability: 'first_frame_i2v', modelKey: 'video_first_frame_model' }, |
| 18 | { id: 'start_end_frame', label: '首尾帧生视频', ability: 'start_end_frame_i2v', modelKey: 'video_start_end_model' }, |
| 19 | { id: 'reference', label: '参考图生视频', ability: 'reference_to_video', modelKey: 'video_reference_model' }, |
| 20 | ]; |
| 21 | |
| 22 | export function videoModeAbility(mode: string | undefined) { |
| 23 | return VIDEO_GENERATION_MODES.find(item => item.id === mode)?.ability || 'first_frame_i2v'; |
| 24 | } |
| 25 | |
| 26 | export function videoModeModelKey(mode: string | undefined) { |
| 27 | return VIDEO_GENERATION_MODES.find(item => item.id === mode)?.modelKey || 'video_first_frame_model'; |
| 28 | } |
| 29 | |
| 30 | export const STYLES = [ |
| 31 | { id: 'comic-book', label: 'Comic Book / 漫画' }, |
| 32 | { id: 'anime', label: 'Anime / 动漫' }, |
| 33 | { id: 'realistic', label: 'Realistic / 写实' }, |
| 34 | { id: '3d-disney', label: '3D Disney / 迪士尼' }, |
| 35 | { id: 'watercolor', label: 'Watercolor / 水彩' }, |
| 36 | { id: 'oil-painting', label: 'Oil Painting / 油画' }, |
| 37 | { id: 'cyberpunk', label: 'Cyberpunk / 赛博朋克' }, |
| 38 | { id: 'chinese-ink', label: 'Chinese Ink / 水墨' }, |
| 39 | ]; |
| 40 | |
| 41 | /* ─── 视频比例 ─── */ |
| 42 | export const VIDEO_RATIOS = [ |
| 43 | { id: '16:9', label: '16:9', ratio: '16:9' }, |
| 44 | { id: '9:16', label: '9:16', ratio: '9:16' }, |
| 45 | { id: '1:1', label: '1:1', ratio: '1:1' }, |
| 46 | { id: '4:3', label: '4:3', ratio: '4:3' }, |
| 47 | { id: '3:4', label: '3:4', ratio: '3:4' }, |
| 48 | { id: '21:9', label: '21:9', ratio: '21:9' }, |
| 49 | ]; |
| 50 | |
| 51 | /* ─── 视频分辨率 ─── */ |
| 52 | export const VIDEO_RESOLUTIONS = [ |
| 53 | { id: '720P', label: '720P' }, |
| 54 | { id: '1080P', label: '1080P' }, |
| 55 | ]; |
| 56 |