| | |
| | | const [history, setHistory] = useState<HistoryItem[]>([]); |
| | | const [projectParams, setProjectParams] = useState<ProjectParams | null>(null); |
| | | const [autoMode, setAutoMode] = useState(false); |
| | | const [videoSound, setVideoSound] = useState('on'); |
| | | const [videoShotType, setVideoShotType] = useState('multi'); |
| | | // 用于顶栏流程图状态判断 |
| | | const [currentStageFromSession, setCurrentStageFromSession] = useState<string | null>(null); |
| | | const [completedStagesFromSession, setCompletedStagesFromSession] = useState<string[]>([]); |
| | |
| | | vlm_model: params.vlm_model, |
| | | image_t2i_model: params.image_t2i_model, |
| | | image_it2i_model: params.image_it2i_model, |
| | | video_generation_mode: params.video_generation_mode, |
| | | video_first_frame_model: params.video_first_frame_model, |
| | | video_start_end_model: params.video_start_end_model, |
| | | video_reference_model: params.video_reference_model, |
| | | video_model: params.video_model, |
| | | enable_concurrency: params.enable_concurrency, |
| | | web_search: params.web_search, |
| | |
| | | vlm_model: params.vlm_model, |
| | | image_t2i_model: params.image_t2i_model, |
| | | image_it2i_model: params.image_it2i_model, |
| | | video_generation_mode: params.video_generation_mode, |
| | | video_first_frame_model: params.video_first_frame_model, |
| | | video_start_end_model: params.video_start_end_model, |
| | | video_reference_model: params.video_reference_model, |
| | | video_model: params.video_model, |
| | | scene_number: result.params?.scene_number, |
| | | expand_idea: params.expand_idea, |
| | |
| | | vlm_model: projectParams?.vlm_model, |
| | | image_t2i_model: projectParams?.image_t2i_model, |
| | | image_it2i_model: projectParams?.image_it2i_model, |
| | | video_generation_mode: projectParams?.video_generation_mode, |
| | | video_first_frame_model: projectParams?.video_first_frame_model, |
| | | video_start_end_model: projectParams?.video_start_end_model, |
| | | video_reference_model: projectParams?.video_reference_model, |
| | | video_model: projectParams?.video_model, |
| | | video_ratio: projectParams?.video_ratio, |
| | | video_resolution: projectParams?.video_resolution, |
| | | video_sound: videoSound, |
| | | video_shot_type: videoShotType, |
| | | video_sound: 'on', |
| | | video_shot_type: 'multi', |
| | | }; |
| | | // 从剧本产物获取实际场景数 |
| | | try { |
| | |
| | | vlm_model: projectParams?.vlm_model, |
| | | image_t2i_model: projectParams?.image_t2i_model, |
| | | image_it2i_model: projectParams?.image_it2i_model, |
| | | video_generation_mode: projectParams?.video_generation_mode, |
| | | video_first_frame_model: projectParams?.video_first_frame_model, |
| | | video_start_end_model: projectParams?.video_start_end_model, |
| | | video_reference_model: projectParams?.video_reference_model, |
| | | video_model: projectParams?.video_model, |
| | | video_sound: videoSound, |
| | | video_shot_type: videoShotType, |
| | | video_sound: 'on', |
| | | video_shot_type: 'multi', |
| | | }; |
| | | |
| | | // 设置 running 状态以便显示进度条(如 Logline 选择后生成剧本) |
| | |
| | | vlm_model: projectParams?.vlm_model, |
| | | image_t2i_model: projectParams?.image_t2i_model, |
| | | image_it2i_model: projectParams?.image_it2i_model, |
| | | video_generation_mode: projectParams?.video_generation_mode, |
| | | video_first_frame_model: projectParams?.video_first_frame_model, |
| | | video_start_end_model: projectParams?.video_start_end_model, |
| | | video_reference_model: projectParams?.video_reference_model, |
| | | video_model: projectParams?.video_model, |
| | | video_ratio: projectParams?.video_ratio, |
| | | video_resolution: projectParams?.video_resolution, |
| | |
| | | const meta = ((status as any).meta || {}) as any; |
| | | const s = Object.keys(meta).length > 0 ? meta : (status as any); |
| | | if (s.idea || s.user_textbox_input) { |
| | | // Legacy session compatibility: old sessions only stored one video_model, so hydrate it as the first-frame model. |
| | | const restoredFirstFrameVideoModel = s.video_first_frame_model || s.video_model || ''; |
| | | setProjectParams({ |
| | | idea: s.idea || s.user_textbox_input || '', |
| | | style: s.style || '', |
| | |
| | | vlm_model: s.vlm_model || '', |
| | | image_t2i_model: s.image_t2i_model || '', |
| | | image_it2i_model: s.image_it2i_model || '', |
| | | video_generation_mode: s.video_generation_mode || 'first_frame', |
| | | video_first_frame_model: restoredFirstFrameVideoModel, |
| | | video_start_end_model: s.video_start_end_model || 'wan2.7-i2v', |
| | | video_reference_model: s.video_reference_model || 'wan2.7-r2v', |
| | | video_model: s.video_model || '', |
| | | expand_idea: s.expand_idea || false, |
| | | enable_concurrency: s.enable_concurrency || false, |
| | |
| | | vlm_model: projectParams.vlm_model, |
| | | image_t2i_model: projectParams.image_t2i_model, |
| | | image_it2i_model: projectParams.image_it2i_model, |
| | | // Legacy session compatibility: projectParams may come from an old session with only video_model. |
| | | video_generation_mode: projectParams.video_generation_mode || 'first_frame', |
| | | video_first_frame_model: projectParams.video_first_frame_model || projectParams.video_model, |
| | | video_start_end_model: projectParams.video_start_end_model || 'wan2.7-i2v', |
| | | video_reference_model: projectParams.video_reference_model || 'wan2.7-r2v', |
| | | video_model: projectParams.video_model, |
| | | video_ratio: projectParams.video_ratio, |
| | | video_resolution: projectParams.video_resolution || '720P', |
| | |
| | | isRunning={effectiveIsRunning} |
| | | hasPendingItems={hasPendingItems} |
| | | hasNextStageStarted={hasNextStageStarted} |
| | | videoSound={videoSound} |
| | | videoShotType={videoShotType} |
| | | onVideoParamsChange={(params: { videoSound?: string; videoShotType?: string }) => { |
| | | if (params.videoSound !== undefined) setVideoSound(params.videoSound); |
| | | if (params.videoShotType !== undefined) setVideoShotType(params.videoShotType); |
| | | }} |
| | | referenceArtifact={referenceArtifact} |
| | | scriptArtifact={scriptArtifact} |
| | | artifacts={Object.keys(stageStates).reduce((acc: any, key) => { |