diff --git a/pixelle_video/services/frame_processor.py b/pixelle_video/services/frame_processor.py index 00949d6..ce1c5f1 100644 --- a/pixelle_video/services/frame_processor.py +++ b/pixelle_video/services/frame_processor.py @@ -58,52 +58,52 @@ class FrameProcessor: try: # Step 1: Generate audio (TTS) + if progress_callback: + progress_callback(ProgressEvent( + event_type="frame_step", + progress=0.0, + frame_current=frame_num, + frame_total=total_frames, + step=1, + action="audio" + )) await self._step_generate_audio(frame, config) + + # Step 2: Generate image (ComfyKit) if progress_callback: progress_callback(ProgressEvent( event_type="frame_step", progress=0.25, frame_current=frame_num, frame_total=total_frames, - step=1, - action="audio" + step=2, + action="image" )) - - # Step 2: Generate image (ComfyKit) await self._step_generate_image(frame, config) + + # Step 3: Compose frame (add subtitle) if progress_callback: progress_callback(ProgressEvent( event_type="frame_step", progress=0.50, frame_current=frame_num, frame_total=total_frames, - step=2, - action="image" + step=3, + action="compose" )) - - # Step 3: Compose frame (add subtitle) await self._step_compose_frame(frame, storyboard, config) + + # Step 4: Create video segment if progress_callback: progress_callback(ProgressEvent( event_type="frame_step", progress=0.75, frame_current=frame_num, frame_total=total_frames, - step=3, - action="compose" - )) - - # Step 4: Create video segment - await self._step_create_video_segment(frame, config) - if progress_callback: - progress_callback(ProgressEvent( - event_type="frame_step", - progress=1.0, - frame_current=frame_num, - frame_total=total_frames, step=4, action="video" )) + await self._step_create_video_segment(frame, config) logger.info(f"โœ… Frame {frame.index} completed") return frame diff --git a/pixelle_video/services/video_generator.py b/pixelle_video/services/video_generator.py index 7d65b92..cf1d549 100644 --- a/pixelle_video/services/video_generator.py +++ b/pixelle_video/services/video_generator.py @@ -379,7 +379,7 @@ class VideoGeneratorService: logger.success(f"๐ŸŽฌ Video generation completed: {final_video_path}") # Step 6: Create result - self._report_progress(progress_callback, "finalizing", 1.0) + self._report_progress(progress_callback, "completed", 1.0) video_path_obj = Path(final_video_path) file_size = video_path_obj.stat().st_size diff --git a/web/i18n/locales/en_US.json b/web/i18n/locales/en_US.json index 32b0024..da391e2 100644 --- a/web/i18n/locales/en_US.json +++ b/web/i18n/locales/en_US.json @@ -116,17 +116,19 @@ "status.connection_success": "โœ… Connected", "status.connection_failed": "โŒ Connection failed", + "progress.generating_title": "Generating title...", "progress.generating_narrations": "Generating narrations...", "progress.splitting_script": "Splitting script...", "progress.generating_image_prompts": "Generating image prompts...", "progress.frame": "Frame {current}/{total}", "progress.frame_step": "Frame {current}/{total} - Step {step}/4: {action}", - "progress.step_audio": "Generating audio", - "progress.step_image": "Generating image", - "progress.step_compose": "Composing frame", - "progress.step_video": "Creating video segment", - "progress.concatenating": "Concatenating video segments...", + "progress.step_audio": "Generating audio...", + "progress.step_image": "Generating image...", + "progress.step_compose": "Composing frame...", + "progress.step_video": "Creating video segment...", + "progress.concatenating": "Concatenating video...", "progress.finalizing": "Finalizing...", + "progress.completed": "โœ… Completed", "error.input_required": "โŒ Please provide topic or content", "error.api_key_required": "โŒ Please enter API Key", diff --git a/web/i18n/locales/zh_CN.json b/web/i18n/locales/zh_CN.json index 4cd0a7d..79067c9 100644 --- a/web/i18n/locales/zh_CN.json +++ b/web/i18n/locales/zh_CN.json @@ -116,17 +116,19 @@ "status.connection_success": "โœ… ่ฟžๆŽฅๆˆๅŠŸ", "status.connection_failed": "โŒ ่ฟžๆŽฅๅคฑ่ดฅ", + "progress.generating_title": "็”Ÿๆˆๆ ‡้ข˜...", "progress.generating_narrations": "็”Ÿๆˆๆ—็™ฝ...", "progress.splitting_script": "ๅˆ‡ๅˆ†่„šๆœฌ...", "progress.generating_image_prompts": "็”Ÿๆˆๅ›พ็‰‡ๆ็คบ่ฏ...", "progress.frame": "ๅˆ†้•œ {current}/{total}", "progress.frame_step": "ๅˆ†้•œ {current}/{total} - ๆญฅ้ชค {step}/4: {action}", - "progress.step_audio": "็”Ÿๆˆ่ฏญ้Ÿณ", - "progress.step_image": "็”Ÿๆˆๆ’ๅ›พ", - "progress.step_compose": "ๅˆๆˆ็”ป้ข", - "progress.step_video": "ๅˆ›ๅปบ่ง†้ข‘็‰‡ๆฎต", - "progress.concatenating": "ๆ‹ผๆŽฅ่ง†้ข‘็‰‡ๆฎต...", + "progress.step_audio": "็”Ÿๆˆ่ฏญ้Ÿณ...", + "progress.step_image": "็”Ÿๆˆๆ’ๅ›พ...", + "progress.step_compose": "ๅˆๆˆ็”ป้ข...", + "progress.step_video": "ๅˆ›ๅปบ่ง†้ข‘็‰‡ๆฎต...", + "progress.concatenating": "ๆญฃๅœจๆ‹ผๆŽฅ่ง†้ข‘...", "progress.finalizing": "ๅฎŒๆˆไธญ...", + "progress.completed": "โœ… ็”ŸๆˆๅฎŒๆˆ", "error.input_required": "โŒ ่ฏทๆไพ›ไธป้ข˜ๆˆ–ๅ†…ๅฎน", "error.api_key_required": "โŒ ่ฏทๅกซๅ†™ API Key",