You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: projects/singularity_cinema/README_EN.md
+80-33Lines changed: 80 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,48 +179,95 @@ ms-agent run --project singularity_cinema \
179
179
180
180
---
181
181
182
+
182
183
### 5) Output and Failure Retry
183
184
184
-
- The run typically takes about 20 minutes.
185
-
- The generated video is output to `output_video/` under your command execution directory (controlled by `--output_dir`) as `final_video.mp4`.
186
-
- If the run fails (timeout/interruption/missing files), you can rerun the command directly: the system will read execution info in `output_video` and resume from the breakpoint.
187
-
- To regenerate from scratch: rename/delete the `output_video` directory.
188
-
- To rerun only part of a storyboard: delete only the corresponding files for that segment; rerunning will execute only those segments.
185
+
- **Estimated time**: The full pipeline takes about **20 minutes** (depends on machine performance and model/API speed).
186
+
- **Output location**: By default, the video and all intermediate artifacts are generated in `output_video/` under the **directory where you run the command** (can be changed via `--output_dir`).
187
+
- Final video file: `output_video/final_video.mp4`
188
+
- **Failure retry / resume from checkpoint**: If the run fails (e.g., timeout, interruption, missing files), you can **rerun the exact same command**. The system will read existing intermediate results in `output_video/` and continue from where it stopped.
189
+
- **Regenerate everything**: Delete or rename the `output_video/` directory, then run again.
190
+
- **Redo only a specific scene/step**: Delete the files you want to regenerate, **and any downstream files that depend on them** (for example, if you delete a scene’s render output, rerunning will only re-render that scene).
191
+
- Common practice: delete the target scene’s related files + the final `final_video.mp4` to trigger regeneration of only the necessary parts.
189
192
190
193
---
191
194
192
-
## Technical Workflow
195
+
## Execution Pipeline and Effect Tuning
196
+
197
+
If you are not satisfied with the result of a certain step, you can trigger regeneration by **deleting the output files of that step** (and all subsequent files that depend on them).
198
+
The complete workflow and code entry points are defined in: `projects/singularity_cinema/workflow.yaml`. Below is each step in order, including inputs, outputs, and scope (all under `output_video/` by default).
199
+
200
+
1. **Generate the base script**
201
+
- Input: user requirements (may include user-provided files)
202
+
- Output:
203
+
- `script.txt`: main script content
204
+
- `topic.txt`: original request/topic
205
+
- `title.txt`: short-video title
206
+
- Code: `generate_script/agent.py`
193
207
194
-
1. Generate a base script from user requirements
195
-
- Input: user requirements; may read a user-specified file
196
-
- Output: script file `script.txt`, original request file `topic.txt`, short-video title file `title.txt`
197
-
2. Split the script into storyboard segments
208
+
2. **Split the script and design storyboards**
198
209
- Input: `topic.txt`, `script.txt`
199
-
- Output: `segments.txt`, a list of segments describing narration, background image generation requirements, and foreground Manim animation requirements
200
-
3. Generate audio narration for each segment
210
+
- Output: `segments.txt`(shot list: each shot includes narration, background image requirements, foreground animation requirements, etc.)
211
+
- Code: `segment/agent.py`
212
+
213
+
3. **Generate voice-over audio for each segment**
201
214
- Input: `segments.txt`
202
-
- Output: `audio/audio_N.mp3`list (N starts from 1), plus `audio_info.txt` in the root directory containing audio durations
203
-
4. Generate Remotion animation code based on audio duration
204
-
- Input: `segments.txt`, `audio_info.txt`
205
-
- Output: Manim code files `remotion_code/segment_N.py` (N starts from 1)
206
-
5. Fix Remotion code
207
-
- Input: `remotion_code/segment_N.py`(N starts from 1), pre-error file `code_fix/code_fix_N.txt`
208
-
- Output: updated `remotion_code/segment_N.py`
209
-
6. Render Remotion code
210
-
- Input: `remotion_code/segment_N.py`
211
-
- Output: `remotion_render/scene_N`folder list; if a segment includes Remotion requirements in `segments.txt`, the corresponding folder will contain `remotion.mov`
212
-
7. Generate text-to-image prompts
215
+
- Output:
216
+
- `audio/segment_N.mp3`: voice-over for segment N (N starts from 1)
217
+
- `audio_info.txt`: audio duration and other info (used later for animation alignment)
218
+
- Code: `generate_audio/agent.py`
219
+
- Scope: by default, every segment has voice-over
220
+
- Exception: when `use_text2video=true` and `use_video_soundtrack=true`, and the segment is marked as **text-to-video** in the storyboard design, the system will use the video’s original soundtrack instead of generating separate voice-over.
221
+
222
+
4. **Generate prompts for text-to-image**
213
223
- Input: `segments.txt`
214
-
- Output: `illustration_prompts/segment_N.txt`(N starts from 1)
215
-
8. Text-to-image generation
216
-
- Input: list of `illustration_prompts/segment_N.txt`
217
-
- Output: list of `images/illustration_N.png` (N starts from 1)
218
-
9. Generate a background image (solid color) with the short-video title and slogans
219
-
- Input: `title.txt`
220
-
- Output: `background.jpg`
221
-
10. Compose the final video
222
-
- Input: all files from previous steps. This step may take a long time with no logs and does not consume tokens.
223
-
- Output: `final_video.mp4`
224
+
- Output:
225
+
- `illustration_prompts/segment_N.txt`: background image prompt for segment N
226
+
- If foreground images are needed: `illustration_prompts/segment_N_foreground_K.txt`(prompt for the K-th foreground image of segment N)
227
+
- Code: `generate_illustration_prompts/agent.py`
228
+
- Scope: describes the image content required for each segment
229
+
230
+
5. **Generate images from prompts (text-to-image)**
231
+
- Input: prompt files such as `illustration_prompts/segment_N.txt`
0 commit comments