| | |
| | | 阶段5: 视频生成智能体 (适配 Session JSON 格式) |
| | | - 从 session.json 的 artifacts["storyboard"] 读取拍摄片段(Segments) |
| | | - 视频提示词:风格前缀 + 分镜列表(分镜1: [时长] content...) |
| | | - 参考图:从 session.json 的 artifacts["reference_generation"] 或 scene2image 读取 |
| | | - 参考图:从 session.json 的 artifacts["reference_generation"] 读取 |
| | | - 支持逐项并发生成、实时预览、重新生成 |
| | | """ |
| | | |
| | |
| | | |
| | | save_path = self._next_version_path(sid, segment_id) |
| | | try: |
| | | from tool.video_client import VideoClient |
| | | from models.video_client import VideoClient |
| | | client = VideoClient() |
| | | client.generate_video( |
| | | prompt=prompt, |
| | |
| | | segments.extend(ep.get("segments", [])) |
| | | return self._build_payload(sid, segments) |
| | | |
| | | video_model = input_data.get("video_model", "") or settings.VIDEO_MODEL |
| | | video_model = self._require_input(input_data, "video_model") |
| | | enable_concurrency = input_data.get("enable_concurrency", True) |
| | | from config_model import get_max_concurrency |
| | | from models.config_model import get_max_concurrency |
| | | concurrency = get_max_concurrency(video_model, enable_concurrency) |
| | | |
| | | video_ratio = input_data.get("video_ratio", "16:9") |