diff --git a/apps/api/src/opendirector_api/agent.py b/apps/api/src/opendirector_api/agent.py index b311d8f03..49c383d71 100644 --- a/apps/api/src/opendirector_api/agent.py +++ b/apps/api/src/opendirector_api/agent.py @@ -20,6 +20,7 @@ from opendirector.agent.catalog import model_choices from opendirector.agent.context import RunContext, RuntimeId +from opendirector.agent.references import TurnReference, resolve_turn_references from opendirector.agent.citations import referenced_sources, with_trace_sources from opendirector.agent.runtime import AgentRuntimes, runtime_available, configured_runtimes, runtime_spec, runtime_catalog, runtime_status from opendirector.agent.skills import skills @@ -675,9 +676,8 @@ async def prepare(project_id: UUID, value: Turn, session: str, accept_language: raise ProjectError('技能已失效,请重新选择。', 409) snapshot = await asyncio.to_thread(projects.snapshot, project_id) assets = {str(asset.id): asset for asset in snapshot.assets} - for asset_id in value.assets: - if str(asset_id) not in assets: - raise ProjectError('引用素材不属于当前工程。', 409) + turn_refs = resolve_turn_references(snapshot, value.id, value.content or (), value.assets) + attachment_ids = dict.fromkeys(str(ref.asset.assetId) for ref in turn_refs) model = config['modelId'] if config else value.runtimeModel model_is_cli_default = spec.modelSource == 'cli' and not model model_selections = dict(value.modelSelections) @@ -691,7 +691,8 @@ async def prepare(project_id: UUID, value: Turn, session: str, accept_language: 'message': {'id': str(value.id), 'role': 'user', 'text': value.text, 'content': value.content, 'assets': [{'id': str(asset.id), 'name': asset.name, 'type': asset.metadata.mimeType, 'size': asset.metadata.size, 'fingerprint': asset.fingerprint} - for asset in (assets[str(key)] for key in value.assets)], + for asset in (assets[key] for key in attachment_ids)], + 'turnReferences': [ref.model_dump(mode='json', exclude_none=True) for ref in turn_refs], 'skills': value.skills, 'runtime': value.runtime, 'runtimeModel': value.runtimeModel, 'modelSelections': dict(value.modelSelections), 'model': model, 'modelIsCliDefault': model_is_cli_default, @@ -760,6 +761,9 @@ async def renew_session() -> None: context = [] for reply in saved['messages'][:-1]: content = reply['text'] or '(empty reply)' + bound = [TurnReference.model_validate(ref).observation() for ref in reply.get('turnReferences', [])] + if bound: + content += '\nProject references in chat order: ' + json.dumps(bound, ensure_ascii=False) references = [] for attachment in reply.get('assets', []): asset = assets.get(attachment['id']) @@ -778,7 +782,10 @@ async def renew_session() -> None: session=run_session, directory=plan['directory'], config=plan['config'], messages=context, selected_skills=message.get('skills') or [], thinking=plan['thinking'], model_selections=plan['model_selections'], runtime_model=message.get('runtimeModel'), - skills=plan['available'], conversation_id=chain.conversation_id) + skills=plan['available'], conversation_id=chain.conversation_id, + turn_references=tuple(TurnReference.model_validate(ref) for ref in message.get('turnReferences', [])), + earlier_references=tuple(TurnReference.model_validate(ref) for reply in saved['messages'][:-2] + for ref in reply.get('turnReferences', []))) async with aclosing(runtimes.stream(run)) as stream: async for event in stream: if event['type'] == 'delta': diff --git a/apps/api/src/opendirector_api/creation.py b/apps/api/src/opendirector_api/creation.py index 76d6d100f..3701c3706 100644 --- a/apps/api/src/opendirector_api/creation.py +++ b/apps/api/src/opendirector_api/creation.py @@ -24,7 +24,7 @@ from opendirector.application.creation_timeline_packages import CreationTimelinePackages from opendirector.application.creation_video_compatibility import CreationVideoCompatibility, VideoConversionTask from opendirector.domain.creation.timeline_packages import TimelinePackageImportRequest, TimelinePackageImportReceipt -from opendirector.domain.creation.assets import Asset, UploadInfo +from opendirector.domain.creation.assets import ASSET_REVISION_HEADER, Asset, UploadInfo from opendirector.domain.creation.base import MediaKind from opendirector.domain.creation.commands import Command, CommandReceipt, Query as CreationQuery from opendirector.domain.creation.project import ProjectSnapshot, ViewState @@ -281,7 +281,7 @@ def projection(project_id: UUID): return canvas.projection(project_id) @router.post('/projects/{project_id}/queries') - async def query(project_id: UUID, value: CreationQuery): + async def query(project_id: UUID, value: CreationQuery, request: Request): if value.projectId != project_id: raise ProjectError('查询不属于当前工程。') if value.type in {'pipeline.plan', 'pipeline.execution.get', 'pipeline.executions.list'}: @@ -454,12 +454,13 @@ def browser_image(project_id: UUID, asset_id: UUID, 'X-Content-Type-Options': 'nosniff'}) @router.get('/projects/{project_id}/assets/{asset_id}/content') - def content(project_id: UUID, asset_id: UUID, range_header: str | None = Header(default=None, alias='Range'), + def content(project_id: UUID, asset_id: UUID, revision: int | None = Query(default=None, ge=1), + range_header: str | None = Header(default=None, alias='Range'), if_none_match: str | None = Header(default=None, alias='If-None-Match')): - stream, asset = assets.open_media(project_id, asset_id) + stream, asset = assets.open_media(project_id, asset_id, revision=revision) size, etag = asset.metadata.size, '"' + asset.fingerprint + '"' headers = {'Accept-Ranges': 'bytes', 'ETag': etag, 'Cache-Control': 'private, no-cache', - 'X-Content-Type-Options': 'nosniff', + 'X-Content-Type-Options': 'nosniff', ASSET_REVISION_HEADER: str(asset.revision), 'Content-Disposition': ('attachment' if asset.kind == 'file' else 'inline') + "; filename*=utf-8''" + quote(asset.name, safe='')} if range_header is None and if_none_match == etag: diff --git a/apps/api/src/opendirector_api/localization.py b/apps/api/src/opendirector_api/localization.py index cf7a982f5..2b9a59dfd 100644 --- a/apps/api/src/opendirector_api/localization.py +++ b/apps/api/src/opendirector_api/localization.py @@ -11,6 +11,7 @@ from opendirector.domain.timeline_errors import timeline_error_message +from opendirector.domain.creation.assets import ASSET_DOWNLOAD_ENGLISH from opendirector.domain.creation.commands import CommandReceipt from opendirector.domain.capabilities import Capability from opendirector.domain.capability_messages import english_capability_message, missing_tool_model_message @@ -42,6 +43,12 @@ 'prompt_optimization_too_large': 'The references are too large for prompt optimization. Reduce their size or number and try again.', 'prompt_optimization_result': 'The model did not return a usable prompt. Your original text was kept.', 'prompt_optimization_provider': 'The text model could not optimize the prompt. Check its settings and try again. Your original text was kept.', + **ASSET_DOWNLOAD_ENGLISH, + "desktop_auth_required": "The desktop connection has expired. Reopen the application.", + 'h3_timeline_guides_single_model': 'Configure timeline guides for an individual FastH3 model.', + 'h3_timeline_guides_source_limit': 'An H3 segment accepts one source video reference.', + 'h3_timeline_guides_deployment': 'Enable timeline guides only for a compatible self-hosted FastH3 video endpoint.', + 'h3_timeline_guides_unsupported': 'H3 source video segments require a self-hosted H3 endpoint with timeline guides and Reference mode.', 'image_quality_unsupported': 'This model does not support the selected image quality. Choose Auto or select another model.', 'bigmodel_video_model': 'The BigModel video protocol supports CogVideoX-3 only.', 'bigmodel_video_output': 'Choose a supported CogVideoX-3 pixel size and a 5- or 10-second duration. The size determines the aspect ratio.', @@ -49,6 +56,23 @@ 'bigmodel_video_frames': 'Use text, one first-frame image, or an explicit first/last pair. Each frame slot accepts one image; a last frame requires a first frame. Reference and continuation modes are not supported.', 'bigmodel_video_prompt': 'CogVideoX-3 prompts allow up to 512 characters. Provide a prompt or frame image.', 'bigmodel_video_cancel': 'Remote BigModel video cancellation is not connected. The task may continue running and incur charges.', + 'workflow_assembly_busy': 'This assembly run is already processing. Wait for its result.', + 'workflow_media_invalid': 'The source frame range, dimensions, frame rate, or soundtrack does not match the assembly.', + 'workflow_media_failed': 'Media processing failed. Check FFmpeg and the source videos.', + 'segment_run_busy': 'This Run has an unresolved execution. Check its execution status before starting again.', + 'segment_run_unavailable': 'The Run execution service is unavailable.', + 'segment_run_no_execution': 'This Run has no execution available to pause or resume.', + 'segment_run_not_paused': 'This Run has no paused execution to resume.', + 'segment_run_invalid_state': 'This action is unavailable in the execution’s current state.', + 'segment_run_stale_execution': 'This Run’s execution changed. Refresh its status and select the execution again.', + 'segment_run_incompatible_result': 'The selected result is incompatible with this Run’s frozen inputs or selected guides.', + 'segment_run_candidate_missing': 'The selected candidate is unavailable in this execution.', + 'segment_run_guide_mismatch': 'The continuation guide does not match the result produced by its upstream step in this execution.', + 'segment_run_job_missing': 'The segment execution did not return a matching job.', + 'segment_run_job_unsettled': 'The original segment job can still be recovered. Check that job before starting again.', + 'segment_run_reconciliation_pending': 'The original provider task is still unresolved.', + 'segment_run_remote_missing': 'The provider could not find the original task. Regenerate this segment to continue.', + 'submission_unknown': 'The provider may have received the request. Check that submission before retrying.', 'execution_file_link': 'Execution files must not have hard links.', 'kling_model': 'This Kling protocol does not support the selected model.', 'kling_mode': 'Kling currently supports first/last frames and image-reference generation.', @@ -188,6 +212,96 @@ def localized_error_for_language( return specific if not wants_english_language(language): return chinese + run_messages = { + '只能通过发布命令创建 Run。': 'Use the Run publication command to create a published Run.', + '只能通过复制 Run 创建分段草稿。': 'Use the Run copy command to create a segmented Run draft.', + '分段草稿须从已发布的 Run 创建。': 'Create a segment draft from a published Run.', + '请先发布 Run 草稿。': 'Publish the Run draft before starting it.', + '计划已发布。请复制为草稿后再修改。': 'This Run is published. Make a draft copy to edit it.', + '计划已发布。请回到草稿后再修改。': 'This Run is published. Return it to draft before editing.', + '请选择可见且未锁定的已发布 Run。': 'Select a visible, unlocked published Run.', + '请先解锁 Run 计划节点。': 'Unlock the Run plan node first.', + '已发布片段须通过 Run 执行。': 'Start the published Run to execute its segments.', + '部署配置已变化,请发布新的 Run。': 'The model deployment configuration changed. Publish a new Run.', + '请选择未发布且未锁定的 Run 草稿。': 'Select an unlocked, visible top-level Run draft.', + '发布 Run 需要可见时间线和未使用的成片节点。': 'A Run needs a visible timeline and an unused output slot.', + '此时间线或成片节点已属于其他 Run。': 'The timeline or output slot belongs to another Run.', + 'Run 时间线须匹配帧率,并配置画面轨与原声音轨。': 'Use a timeline with the source frame rate, a video track, and an original soundtrack track.', + 'Run 原声须覆盖完整交付区间。': 'The original soundtrack must cover the full delivery range.', + '发布前须固定随机种子、清除素材覆盖并等待已有任务结束。': 'Set a sampling seed, clear asset overrides, and wait for existing jobs before publishing.', + '发布 Run 前须固定素材和肖像的引用版本。': 'Pin asset and portrait reference versions before publishing.', + '每个分段须固定一个源视频引用。': 'Pin one source video reference for each segment.', + 'Run 需要可见的片段节点。': 'Make all segment nodes visible before publishing this Run.', + '分段 Run 需要 FastH3 部署。': 'Segmented Runs require a FastH3 deployment.', + 'Run 续接片段需要支持时间线导帧的部署。': 'Continuations require a deployment that supports timeline guides.', + 'Run 帧数或帧率与实际源片不一致。': 'The frame count or frame rate does not match the source video.', + '工程在核对期间已更新,请重新发布 Run。': 'The project changed during validation. Review and publish the Run again.', + '模型配置在核对期间已更新,请重新发布 Run。': 'The model configuration changed during validation. Review and publish the Run again.', + } + if chinese in run_messages: + return run_messages[chinese] + if code == 'invalid_input': + measured = re.fullmatch(r'片段「(.*)」实测输入 (\d+) 帧,请求 (\d+) 帧。.*', chinese, re.DOTALL) + if measured: + name, actual, requested = measured.groups() + return (f'{name}: input {actual} frames, requested {requested} frames. ' + 'Both must match 17k+5 with k >= 6 (at least 107 frames).') + if re.fullmatch(r'片段「.*」无法按 24 FPS 解码数帧。', chinese, re.DOTALL): + return 'The segment input could not be decoded and counted at 24 FPS.' + if code == 'invalid_input' and chinese == '分组片段提交时必须指定来源画布节点(originItemId)。': + return 'Submitting a grouped segment requires its source canvas node (originItemId).' + if code == 'invalid_input' and chinese == '聊天引用超过数量上限,请移除部分引用。': + return 'The chat reference limit was exceeded. Remove some references and retry.' + if code == 'invalid_input' and chinese == '视频裁切需要视频来源节点。': + return 'Select a video canvas node as the source for this trim.' + if code == 'invalid_input' and chinese == '裁切结束时间超出来源视频时长。': + return 'The trim ends after the source video. Choose an end time within the source duration.' + if status == 409 and chinese == '此视频裁切正在进行,请等待结果。': + return 'This trim is already running. Wait for its result.' + if code == 'reference_invalid': + fasth3_image = re.fullmatch(r'FastH3 参考图“(.+)”的两边须为 256–5760 像素,宽高比须为 0.4–2.5。', chinese, re.DOTALL) + if fasth3_image: + return f'Each side of the FastH3 reference image “{fasth3_image[1]}” must be 256–5760 pixels and its aspect ratio must be 0.4–2.5.' + guide_plan_messages = { + '已确认的导帧计划不能取消约束、改换锚点或移除原有片段。': 'A confirmed guide plan must retain its guide requirement, anchor and existing steps.', + 'H3 分段计划必须启用时间线导帧约束。': 'Enable the timeline guide requirement for this H3 segment plan.', + '导帧计划的每个片段都必须绑定视频生成配置。': 'Bind each guide plan step to a video generation configuration.', + '导帧计划中的片段必须使用各自的生成配置。': 'Each guide plan step needs its own generation configuration.', + '已接受任务的导帧部署已变化或不再支持导帧。': 'The deployment captured by this job changed or no longer supports timeline guides.', + } + if chinese in guide_plan_messages: + return guide_plan_messages[chinese] + wrong_step = re.fullmatch(r'必须从计划中的片段节点 ([0-9a-f-]{36}) 提交。', chinese) + if wrong_step: + return f'Submit from the planned segment node {wrong_step[1]}.' + wrong_plan = re.fullmatch(r'片段「(.+)」的导帧计划与冻结任务不一致。', chinese, re.DOTALL) + if wrong_plan: + return f'The guide plan for segment “{wrong_plan[1]}” differs from the frozen job.' + wrong_source = re.fullmatch(r'片段「(.+)」的冻结导帧来源与本次采用的上游结果不一致。', chinese, re.DOTALL) + if wrong_source: + return f'The frozen guide source for segment “{wrong_source[1]}” differs from the adopted upstream result.' + unavailable_guide = re.fullmatch(r'片段「(.+)」的冻结导帧素材无法读取。', chinese, re.DOTALL) + if unavailable_guide: + return f'The frozen guide asset for segment “{unavailable_guide[1]}” could not be read.' + chat_reference = re.fullmatch(r'聊天引用 ([0-9a-f-]+) 的来源或素材版本已失效,请重新选择此引用。', chinese) + if chat_reference: + return f'Chat reference {chat_reference[1]} has a stale source or asset version. Select it again and retry.' + unknown_chat_reference = re.fullmatch(r'聊天引用 ([0-9a-f-]+) 不属于当前对话。', chinese) + if unknown_chat_reference: + return f'Chat reference {unknown_chat_reference[1]} does not belong to the current conversation.' + guide_segment = re.fullmatch(r'片段「(.+)」必须使用有效的 H3 时间线导帧。', chinese, re.DOTALL) + if guide_segment: + return f'Segment “{guide_segment[1]}” requires a valid H3 timeline guide.' + segment = re.fullmatch(r'组装片段「(.+)」的生成任务缺少来源画布节点(originItemId)。', chinese, re.DOTALL) + if segment: + return f'The generation job for assembly segment “{segment[1]}” is missing its source canvas node (originItemId).' + job = re.fullmatch( + r'生成任务「([0-9a-f-]{36})」(规格 ([0-9a-f-]{36}))缺少来源画布节点(originItemId),无法确定对应的组装片段。', + chinese, + ) + if job: + return (f'Generation job {job[1]} (spec {job[2]}) is missing its source canvas node (originItemId). ' + 'The assembly segment could not be identified.') if code == 'tool_model_missing': return missing_tool_model_message(required_capability, english=True) if code == 'model_list_http_error': diff --git a/build_backend.py b/build_backend.py index cec3032e6..83a732b92 100644 --- a/build_backend.py +++ b/build_backend.py @@ -23,7 +23,11 @@ def prepare_resources(): if bundled.exists(): shutil.rmtree(bundled) shutil.copytree(ROOT / 'dist', bundled / 'web') - shutil.copytree(ROOT / 'packages/agent/skills', bundled / 'skills') + skill_ignore = shutil.ignore_patterns('__pycache__', '*.pyc', '*.pyo') + shutil.copytree(ROOT / 'packages/agent/skills', bundled / 'skills', ignore=skill_ignore) + h3_skill = ROOT / '.agents/upstream/minimax-h3/skills/h3-prompt-writing' + if (h3_skill / 'SKILL.md').is_file(): + shutil.copytree(h3_skill, bundled / 'skills/h3-prompt-writing', ignore=skill_ignore) npm_package = ROOT / 'node_modules/opencode-ai' metadata = json.loads((npm_package / 'package.json').read_text()) if os.name == 'nt': diff --git a/docs/guides/cli.md b/docs/guides/cli.md index 87de24eb1..4f8efc6f0 100644 --- a/docs/guides/cli.md +++ b/docs/guides/cli.md @@ -66,11 +66,57 @@ CLI 输出 JSON。修改回执附带对应的 assetId、itemId、specId 及其 Agent 的 Shell 通过 PATH 使用同一个 `opendirector`。宿主提供受令牌保护的本轮连接、工程范围、编辑会话和执行目录,文件登记限制在本轮执行目录。每次调用产生业务活动及回执,供聊天与轨迹页展示。 +## 在 Agent 命令中使用聊天引用 + +在 Agent 会话中,`project show` 按消息中的顺序返回 `turnReferences`。选择画布节点时,每项记录节点 ID 和提交时选中的 `AssetRef`。直接上传到聊天的文件只携带 `AssetRef`。创建生成节点时,可重复传入 `--turn-reference` 来固定引用版本。 + +```bash +opendirector canvas create-generation --file plan.json --turn-reference IMAGE_REFERENCE_ID +``` + +### Using chat references in Agent commands + +Inside an Agent turn, `project show` returns `turnReferences` in message order. A selection from the canvas carries its source node ID and the `AssetRef` captured at submission. A file uploaded directly to chat carries only an `AssetRef`. Repeat `--turn-reference` on `canvas create-generation` to pin selected versions. + +## 分段续接的导帧约束 + +用 `group configure-assembly` 保存 H3 分段计划,设置 `requireTimelineGuides: true`。只有 `guideExemptItemId` 指定的起跑节点可以省略导帧。其余片段在 `generation submit` 时指定计划中的 `originItemId`,并提供导帧引用与两个源帧号。修改裁切范围、调整成片顺序或移动节点时,已确认的导帧规则继续生效。恢复使用提交时保存的素材版本,组装也会核对本次采用的上游版本。 + +### Timeline guides for segment continuation + +Save an H3 segment plan with `group configure-assembly` and set `requireTimelineGuides: true`. Only the starting node named by `guideExemptItemId` may omit the guide. Each other step submits with its planned `originItemId`, a guide reference and two source frame indices. Trimming, reordering and moving nodes preserve the confirmed guide policy. Recovery uses the submitted source version, and assembly checks it against the adopted upstream result. + +## 执行分段流水线 / Execute a segment Pipeline + +准备顶层分组、固定版本的生成引用和导帧依赖。默认使用 `reuse` 复用输入未变化的上游结果。需要自动组装时,用 `group configure-assembly` 保存时间线、原声和各生成段的保留区间。混合原片和生成段时,在时间线上保留原片区间。 + +Prepare a top-level group with pinned generation references and guide dependencies. The default `reuse` policy reuses upstream results when their inputs match. For automatic assembly, save the timeline, original soundtrack and generated clip ranges with `group configure-assembly`. For mixed source and generated footage, retain the original ranges on the timeline. + +```bash +opendirector query pipeline.plan --file pipeline-plan.json +opendirector --operation-id "$START_ID" pipeline start --file pipeline-start.json +opendirector query pipeline.execution.get --object-id "$EXECUTION_ID" +``` + +查询文件示例为 `{"scope":{"kind":"group","groupId":"GROUP_UUID"},"cachePolicy":"reuse"}`。启动文件将同一对象放在 `payload` 下。从回执读取 `pipelineExecutionId`,重开画布后可用同一个 ID 查询进度。 + +Use `{"scope":{"kind":"group","groupId":"GROUP_UUID"},"cachePolicy":"reuse"}` in the query file. Put the same object under `payload` in the start file. Read `pipelineExecutionId` from the receipt and query that execution after reopening the canvas. ## 检查已有生成结果 `job show` / `job wait` 在任务成功后返回 `delivery`:已登记的 AssetRef、当前采用状态及展示该素材的画布项。生成成功不等于质量验收;Agent 应检查现有素材。复制到执行目录做媒体探测、抽帧和审看不需要重新发布,也不应为同一次交付新增画布项。编辑产生的新交付文件才需要登记;独立副本展示应有用户要求。 +## 下载原始素材 + +从 `project show` 获取素材 ID 和版本,用 `asset download` 将指定版本的原始字节写入新文件。下载无需编辑租约,与项目登记分开。Agent Shell 使用当前项目,输出路径须位于本轮执行目录内。 + +```bash +opendirector --project PROJECT_UUID asset download --id ASSET_UUID --revision 1 --output ./source.mp4 +``` + +### Download original assets + +Use `project show` to get the asset ID and revision. `asset download` copies the original bytes of that revision to a new file. This read requires no editing lease or asset registration. In Agent Shell the active project is already selected, and the output path must stay inside the current execution directory. ## 更新生成配置 diff --git a/feature-assets/character-replacement/goodnight-try0089-canvas.png b/feature-assets/character-replacement/goodnight-try0089-canvas.png new file mode 100644 index 000000000..e001f7b3a Binary files /dev/null and b/feature-assets/character-replacement/goodnight-try0089-canvas.png differ diff --git a/packages/agent/skills/character-replacement/SKILL.md b/packages/agent/skills/character-replacement/SKILL.md index e3c9e0ae0..b53024845 100644 --- a/packages/agent/skills/character-replacement/SKILL.md +++ b/packages/agent/skills/character-replacement/SKILL.md @@ -1,25 +1,18 @@ --- name: character-replacement -description: Plan MiniMax-H3 character replacement, write per-segment Ref2VA prompts and configure reusable H3-04 ComfyUI workflows for generation and review. +description: Replace people in source footage with H3 in OpenDirector. Plan segments, write Ref2VA prompts, and execute a Pipeline from a visible, verified canvas plan. --- -# Character Replacement +# Character replacement -Make character replacement easy to use: the user supplies source media and a replacement request; the agent derives the segment plan, prompts and workflow parameters. Keep the input boundary as original images, source video and explicit prompts. Work only on the requested deliverable; planning or prompt edits do not start generation, restart services or introduce preprocessing. +> For Chinese requests, read [SKILL.zh.md](SKILL.zh.md) and its linked `.zh.md` guides. -For a simple one-person edit without segmented continuation, reuse the [H3-04 Character Replacement workflow](assets/character-replacement.json). For planned multi-segment work, use the Agentic Continuation template linked below; its example-specific settings must be recalculated for new footage. +**[Governing prompt principle](prompt-writing.md#governing-principle)** — Specify which source person gets which portrait and which features to replace, let the source video determine the performance, camera and scene, and describe a critical existing occlusion in one sentence about what stays in front. Define the source performer and portrait identity as separate Subjects. For every shot, record which assigned source tracks are visible and which are out of frame. At a cut from a group shot to a close-up, inspect the source crop and both frame edges before writing the shot prompt. -1. Create a 24-FPS constant-frame-rate working copy of the source video before visual inspection, segmentation and frame-index calculations, unless the user explicitly requests another FPS. Preserve the original file and playback timing. Read [video-segment.md](video-segment.md) first. Use a vision-capable model to inspect the source video, establish shot boundaries and track when each selected person appears, interacts, becomes occluded and leaves. Produce the segment plan before writing new segment prompts. -2. Read [prompt-writing.md](prompt-writing.md), then write each segment's prompt from its inspected action and explicit source-person-to-picture mappings. -3. For a single-person, single-segment edit, configure the simple workflow linked above. For segmented or multi-person work, configure a task-specific copy of the [H3-04 Agentic Continuation workflow](assets/character-replacement-continuation.json), reusing Global Control, existing nodes and one shared segment-subgraph definition. Follow [workflow.md](workflow.md) for configuration, execution and review. -4. When generation is requested, submit the executable graph through ComfyUI, monitor results, inspect segment previews and deliver the assembled video with remaining quality defects. +## Choose the path -Prompt-format dependency: read the official [MiniMax H3 prompt-writing skill](https://github.com/MiniMax-AI/MiniMax-H3/tree/main/skills/h3-prompt-writing). It can be read directly from the repository; local installation is optional. Before execution, establish the ComfyUI URL, installed node availability, effective Omni deployment settings and task output directory as described in [workflow.md](workflow.md). +- **Reuse an example group.** Read back the example group. Carry over the prompts verbatim, ordered references and asset versions, model parameters, guides, trims, and audio policy. Bind equivalent material in the target project and compare the saved configuration before starting. Surface unsupported fields before execution. +- **Edit or retry part of a group.** Read the target group, the affected segment, and its dependent joins. Follow [review and retry](workflow.md#review-and-retry-a-take) to edit its saved spec or retry a failed Pipeline step and verify the requested change. +- **Plan new footage.** [Check the project and model](workflow.md#1-select-the-project-and-model), [plan source ranges](video-segment.md), then [write Ref2VA prompts](prompt-writing.md). Keep source audio in generation references. -Resolve repository-relative references from this skill directory after resolving any global skill symlink, not from the agent's current working directory. - -Execution boundary: agent → ComfyUI execution API → existing vLLM-Omni nodes → vLLM-Omni video API. The nodes own model requests; the agent does not bypass ComfyUI with a separate generation client. - -For a prompt-only correction to an existing segment, inspect its relevant footage and existing plan; revise the plan only if the observed defect exposes an incorrect boundary or mapping. Do not invent a new segmentation for every wording edit. - -Preserve the user's model, resolution, FPS and fixed seed unless asked to change them. Report written plans and prompts separately from generation and visual acceptance. Keep Markdown paragraphs on single source lines and usage notes brief. +[Save the visible plan and check the Pipeline](workflow.md#save-the-visible-plan-and-check-the-pipeline) before generation. [Execute and review](workflow.md#3-execute-and-review) when authorized. For a plan-only or prompt-only request, stop at that deliverable. Read [failure lessons](pitfall.md) when diagnosing a regression or deciding whether to retry. diff --git a/packages/agent/skills/character-replacement/SKILL.zh.md b/packages/agent/skills/character-replacement/SKILL.zh.md new file mode 100644 index 000000000..1ad0c5a25 --- /dev/null +++ b/packages/agent/skills/character-replacement/SKILL.zh.md @@ -0,0 +1,18 @@ +--- +name: character-replacement +description: 在 OpenDirector 中用 H3 替换源片人物,规划分段、编写 Ref2VA 提示词,并按可见画布计划执行流水线。 +--- + +# 换人 + +> 英文任务请阅读 [SKILL.md](SKILL.md) 及其英文子文档。 + +**[提示词最高原则](prompt-writing.zh.md#最高原则)**:写清哪个源人物对应哪张肖像、要换哪些特征,表演、镜头和场景交给源片,关键遮挡只用一句话说明谁挡在谁前面。 原片人物和肖像目标身份必须分别定义为不同 Subject。逐镜头明确哪些待替换轨迹可见、哪些离画。从多人切到特写时,先查看原片裁切和画面两侧,再写该镜提示词。 + +## 按任务选择路径 + +- **复用示例分组。** 编辑前先读回示例的分组。逐字沿用提示词,保留引用顺序与素材版本、模型参数、导帧、裁切和音轨策略。在目标项目绑定等价素材,启动前回读保存的配置并对照。遇到不支持的字段时,先指出差异。 +- **局部修改或重试分组。** 读取目标分组、目标段及受影响的接缝。按[检查结果与重试](workflow.zh.md#检查结果与重试)修改单段已保存的规格或重试失败步骤,并核验本次要求。 +- **从新素材规划。** [检查项目和模型](workflow.zh.md#1-选择项目和模型),再[规划源片区间](video-segment.zh.md)和[编写 Ref2VA 提示词](prompt-writing.zh.md)。源片段保留原声供生成参考。 + +生成前[保存可见计划并预演流水线](workflow.zh.md#保存可见计划并预演流水线)。获得生成授权后,[启动流水线并检查输出](workflow.zh.md#3-执行并审阅)。只要求计划或提示词时,交付对应内容。排查效果退步或决定是否重试时,读[失败教训](pitfall.zh.md)。 diff --git a/packages/agent/skills/character-replacement/assets/character-replacement-continuation.json b/packages/agent/skills/character-replacement/assets/character-replacement-continuation.json deleted file mode 100644 index 66e4f6959..000000000 --- a/packages/agent/skills/character-replacement/assets/character-replacement-continuation.json +++ /dev/null @@ -1,8134 +0,0 @@ -{ - "id": "001fab76-5b80-4f68-b62f-c1f78760a75c", - "revision": 0, - "last_node_id": 10643, - "last_link_id": 17268, - "nodes": [ - { - "id": 10, - "type": "MarkdownNote", - "pos": [ - -863, - 222 - ], - "size": [ - 771, - 992 - ], - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [], - "outputs": [], - "title": "Character Replacement Guide", - "properties": {}, - "widgets_values": [ - "1. This continuation example is scene-specific, not a universal workflow.\n2. Use the character-replacement skill to inspect new footage, plan segments and update each segment prompt and frame settings.\n3. Configure Global Control, review segment previews, then assemble. Current frame settings assume 24 FPS." - ], - "widgets_values_named": { - "text": "1. Enable the case you want to run; mute the others.\n2. Replace its character images and source video(s).\n3. Update the prompt to say which source person each picture replaces. Keep the existing prompt structure.\n4. In Global Control, set mode, service URL, model, LoRA paths, width, height and fps.\n5. Run and check the preview.\n\nCase03: when changing source clips, update each segment's prompt, duration and guide/trim frames. Its current frame settings use 24 FPS." - }, - "color": "#333", - "bgcolor": "#535353" - }, - { - "id": 10001, - "type": "LoadImage", - "pos": [ - 100, - 2904 - ], - "size": [ - 250, - 314 - ], - "flags": {}, - "order": 8, - "mode": 0, - "inputs": [ - { - "localized_name": "image", - "name": "image", - "type": "COMBO", - "widget": { - "name": "image" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "IMAGE", - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 17222, - 17227, - 17228, - 17233, - 17234 - ] - }, - { - "localized_name": "MASK", - "name": "MASK", - "type": "MASK", - "links": [] - } - ], - "title": "Picture1 · center", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "0_jensen_huang.jpeg", - "image" - ], - "widgets_values_named": { - "image": "0_jensen_huang.jpeg", - "upload": "image" - } - }, - { - "id": 10002, - "type": "LoadImage", - "pos": [ - 380, - 2904 - ], - "size": [ - 250, - 314 - ], - "flags": {}, - "order": 9, - "mode": 0, - "inputs": [ - { - "localized_name": "image", - "name": "image", - "type": "COMBO", - "widget": { - "name": "image" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "IMAGE", - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 17223, - 17229 - ] - }, - { - "localized_name": "MASK", - "name": "MASK", - "type": "MASK", - "links": [] - } - ], - "title": "Picture2 · right front", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "02_sun_wukong.png", - "image" - ], - "widgets_values_named": { - "image": "02_sun_wukong.png", - "upload": "image" - } - }, - { - "id": 10003, - "type": "LoadImage", - "pos": [ - 660, - 2904 - ], - "size": [ - 250, - 314 - ], - "flags": {}, - "order": 10, - "mode": 0, - "inputs": [ - { - "localized_name": "image", - "name": "image", - "type": "COMBO", - "widget": { - "name": "image" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "IMAGE", - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 17224, - 17230 - ] - }, - { - "localized_name": "MASK", - "name": "MASK", - "type": "MASK", - "links": [] - } - ], - "title": "Picture3 · left back", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "03_zhu_bajie.png", - "image" - ], - "widgets_values_named": { - "image": "03_zhu_bajie.png", - "upload": "image" - } - }, - { - "id": 10004, - "type": "LoadImage", - "pos": [ - 940, - 2904 - ], - "size": [ - 250, - 314 - ], - "flags": {}, - "order": 11, - "mode": 0, - "inputs": [ - { - "localized_name": "image", - "name": "image", - "type": "COMBO", - "widget": { - "name": "image" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "IMAGE", - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 17225, - 17231 - ] - }, - { - "localized_name": "MASK", - "name": "MASK", - "type": "MASK", - "links": [] - } - ], - "title": "Picture4 · left front", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "04_sha_seng.png", - "image" - ], - "widgets_values_named": { - "image": "04_sha_seng.png", - "upload": "image" - } - }, - { - "id": 10005, - "type": "LoadImage", - "pos": [ - 1220, - 2904 - ], - "size": [ - 250, - 314 - ], - "flags": {}, - "order": 12, - "mode": 0, - "inputs": [ - { - "localized_name": "image", - "name": "image", - "type": "COMBO", - "widget": { - "name": "image" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "IMAGE", - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 17226, - 17232 - ] - }, - { - "localized_name": "MASK", - "name": "MASK", - "type": "MASK", - "links": [] - } - ], - "title": "Picture5 · right back", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "05_bai_long_ma (1).png", - "image" - ], - "widgets_values_named": { - "image": "05_bai_long_ma (1).png", - "upload": "image" - } - }, - { - "id": 10006, - "type": "LoadVideo", - "pos": [ - 880, - 3384 - ], - "size": [ - 550, - 460 - ], - "flags": {}, - "order": 13, - "mode": 0, - "inputs": [ - { - "localized_name": "file", - "name": "file", - "type": "COMBO", - "widget": { - "name": "file" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "VIDEO", - "name": "VIDEO", - "type": "VIDEO", - "links": [ - 10025 - ] - } - ], - "title": "A · source context", - "properties": { - "Node name for S&R": "LoadVideo" - }, - "widgets_values": [ - "h3-checkpoint3-A-reference.mp4", - "image" - ], - "widgets_values_named": { - "file": "h3-checkpoint3-A-reference.mp4", - "upload": "image" - } - }, - { - "id": 10007, - "type": "LoadVideo", - "pos": [ - 100, - 3384 - ], - "size": [ - 550, - 460 - ], - "flags": {}, - "order": 14, - "mode": 0, - "inputs": [ - { - "localized_name": "file", - "name": "file", - "type": "COMBO", - "widget": { - "name": "file" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "VIDEO", - "name": "VIDEO", - "type": "VIDEO", - "links": [ - 10001 - ] - } - ], - "title": "B · source context", - "properties": { - "Node name for S&R": "LoadVideo" - }, - "widgets_values": [ - "h3-checkpoint3-B-reference.mp4", - "image" - ], - "widgets_values_named": { - "file": "h3-checkpoint3-B-reference.mp4", - "upload": "image" - } - }, - { - "id": 10008, - "type": "LoadVideo", - "pos": [ - 1660, - 3384 - ], - "size": [ - 550, - 460 - ], - "flags": {}, - "order": 15, - "mode": 0, - "inputs": [ - { - "localized_name": "file", - "name": "file", - "type": "COMBO", - "widget": { - "name": "file" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "VIDEO", - "name": "VIDEO", - "type": "VIDEO", - "links": [ - 10044 - ] - } - ], - "title": "C · source context", - "properties": { - "Node name for S&R": "LoadVideo" - }, - "widgets_values": [ - "h3-checkpoint3-C-reference.mp4", - "image" - ], - "widgets_values_named": { - "file": "h3-checkpoint3-C-reference.mp4", - "upload": "image" - } - }, - { - "id": 10009, - "type": "LoadVideo", - "pos": [ - 2440, - 3384 - ], - "size": [ - 550, - 460 - ], - "flags": {}, - "order": 16, - "mode": 0, - "inputs": [ - { - "localized_name": "file", - "name": "file", - "type": "COMBO", - "widget": { - "name": "file" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "VIDEO", - "name": "VIDEO", - "type": "VIDEO", - "links": [ - 10065 - ] - } - ], - "title": "D · source context", - "properties": { - "Node name for S&R": "LoadVideo" - }, - "widgets_values": [ - "h3-checkpoint3-D-reference.mp4", - "image" - ], - "widgets_values_named": { - "file": "h3-checkpoint3-D-reference.mp4", - "upload": "image" - } - }, - { - "id": 10010, - "type": "LoadVideo", - "pos": [ - 3220, - 3384 - ], - "size": [ - 550, - 460 - ], - "flags": {}, - "order": 17, - "mode": 0, - "inputs": [ - { - "localized_name": "file", - "name": "file", - "type": "COMBO", - "widget": { - "name": "file" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "IMAGEUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "VIDEO", - "name": "VIDEO", - "type": "VIDEO", - "links": [ - 10082 - ] - } - ], - "title": "E · source context", - "properties": { - "Node name for S&R": "LoadVideo" - }, - "widgets_values": [ - "h3-checkpoint3-E-reference.mp4", - "image" - ], - "widgets_values_named": { - "file": "h3-checkpoint3-E-reference.mp4", - "upload": "image" - } - }, - { - "id": 10016, - "type": "LoadAudio", - "pos": [ - 1550, - 2904 - ], - "size": [ - 440, - 200 - ], - "flags": {}, - "order": 18, - "mode": 0, - "inputs": [ - { - "localized_name": "audio", - "name": "audio", - "type": "COMBO", - "widget": { - "name": "audio" - }, - "link": null - }, - { - "localized_name": "audioUI", - "name": "audioUI", - "type": "AUDIO_UI", - "widget": { - "name": "audioUI" - }, - "link": null - }, - { - "localized_name": "choose file to upload", - "name": "upload", - "type": "AUDIOUPLOAD", - "widget": { - "name": "upload" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "AUDIO", - "name": "AUDIO", - "type": "AUDIO", - "links": [ - 10099 - ] - } - ], - "title": "Original 27s soundtrack", - "properties": { - "Node name for S&R": "LoadAudio" - }, - "widgets_values": [ - "h3-checkpoint3-source.m4a", - "" - ], - "widgets_values_named": { - "audio": "h3-checkpoint3-source.m4a", - "upload": "" - } - }, - { - "id": 10070, - "type": "ConcatenateVideo", - "pos": [ - 1350, - 6114 - ], - "size": [ - 430, - 260 - ], - "flags": {}, - "order": 53, - "mode": 0, - "inputs": [ - { - "localized_name": "video0", - "name": "videos.video0", - "type": "VIDEO", - "link": 10094 - }, - { - "localized_name": "video1", - "name": "videos.video1", - "shape": 7, - "type": "VIDEO", - "link": 10095 - }, - { - "localized_name": "video2", - "name": "videos.video2", - "shape": 7, - "type": "VIDEO", - "link": 10096 - }, - { - "localized_name": "video3", - "name": "videos.video3", - "shape": 7, - "type": "VIDEO", - "link": 10097 - }, - { - "localized_name": "video4", - "name": "videos.video4", - "shape": 7, - "type": "VIDEO", - "link": 10098 - }, - { - "localized_name": "video5", - "name": "videos.video5", - "shape": 7, - "type": "VIDEO", - "link": null - }, - { - "localized_name": "complete_audio", - "name": "complete_audio", - "shape": 7, - "type": "AUDIO", - "link": 10099 - }, - { - "localized_name": "codec", - "name": "codec", - "type": "COMBO", - "widget": { - "name": "codec" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "VIDEO", - "name": "VIDEO", - "type": "VIDEO", - "links": [ - 10100 - ] - } - ], - "properties": { - "Node name for S&R": "ConcatenateVideo" - }, - "widgets_values": [ - "h264" - ], - "widgets_values_named": { - "codec": "h264" - } - }, - { - "id": 10071, - "type": "SaveVideo", - "pos": [ - 1830, - 6114 - ], - "size": [ - 760, - 529 - ], - "flags": {}, - "order": 54, - "mode": 0, - "inputs": [ - { - "localized_name": "video", - "name": "video", - "type": "VIDEO", - "link": 10100 - }, - { - "localized_name": "filename_prefix", - "name": "filename_prefix", - "type": "STRING", - "widget": { - "name": "filename_prefix" - }, - "link": null - }, - { - "localized_name": "format", - "name": "format", - "type": "COMFY_DYNAMICCOMBO_V3", - "widget": { - "name": "format" - }, - "link": null - }, - { - "localized_name": "codec", - "name": "format.codec", - "type": "COMFY_DYNAMICCOMBO_V3", - "widget": { - "name": "format.codec" - }, - "link": null - }, - { - "localized_name": "codec", - "name": "codec", - "shape": 7, - "type": "COMFY_DYNAMICCOMBO_V3", - "widget": { - "name": "codec" - }, - "link": null - } - ], - "outputs": [ - { - "localized_name": "video", - "name": "video", - "type": "VIDEO", - "links": [] - } - ], - "title": "Final · 27s", - "properties": { - "Node name for S&R": "SaveVideo" - }, - "widgets_values": [ - "vllm-omni/MiniMax-H3-Character-Replacement/complete-27s", - "mp4", - "auto", - "auto" - ], - "widgets_values_named": { - "filename_prefix": "vllm-omni/MiniMax-H3-Character-Replacement/complete-27s", - "format": "mp4", - "format.codec": "auto", - "codec": "auto" - }, - "color": "#322", - "bgcolor": "#533" - }, - { - "id": 10078, - "type": "5c86a69e-989e-46c5-88f7-54c95d4da8d3", - "pos": [ - 100, - 4144 - ], - "size": [ - 550, - 1240 - ], - "flags": {}, - "order": 41, - "mode": 0, - "inputs": [ - { - "name": "picture_1", - "shape": 7, - "type": "IMAGE", - "link": 10002 - }, - { - "name": "picture_2", - "shape": 7, - "type": "IMAGE", - "link": 10003 - }, - { - "name": "picture_3", - "shape": 7, - "type": "IMAGE", - "link": 10004 - }, - { - "name": "picture_4", - "shape": 7, - "type": "IMAGE", - "link": 10005 - }, - { - "name": "picture_5", - "shape": 7, - "type": "IMAGE", - "link": 10006 - }, - { - "name": "picture_6", - "shape": 7, - "type": "IMAGE", - "link": null - }, - { - "name": "picture_7", - "shape": 7, - "type": "IMAGE", - "link": null - }, - { - "name": "picture_8", - "shape": 7, - "type": "IMAGE", - "link": null - }, - { - "name": "picture_9", - "shape": 7, - "type": "IMAGE", - "link": null - }, - { - "name": "audio_1", - "shape": 7, - "type": "AUDIO", - "link": null - }, - { - "name": "audio_2", - "shape": 7, - "type": "AUDIO", - "link": null - }, - { - "name": "audio_3", - "shape": 7, - "type": "AUDIO", - "link": null - }, - { - "name": "video_1", - "shape": 7, - "type": "VIDEO", - "link": 10001 - }, - { - "name": "video_2", - "shape": 7, - "type": "VIDEO", - "link": null - }, - { - "name": "video_3", - "shape": 7, - "type": "VIDEO", - "link": null - }, - { - "name": "previous_frames", - "shape": 7, - "type": "IMAGE", - "link": null - }, - { - "name": "url", - "type": "STRING", - "widget": { - "name": "url" - }, - "link": 10007 - }, - { - "name": "model", - "type": "STRING", - "widget": { - "name": "model" - }, - "link": 10008 - }, - { - "name": "prompt", - "type": "STRING", - "widget": { - "name": "prompt" - }, - "link": null - }, - { - "name": "sampling_params", - "shape": 7, - "type": "SAMPLING_PARAMS", - "link": 10011 - }, - { - "name": "model_params", - "shape": 7, - "type": "VIDEO_PARAMS", - "link": 10012 - }, - { - "name": "lora", - "shape": 7, - "type": "REMOTE_LORA", - "link": 10108 - }, - { - "name": "fast_h3", - "shape": 7, - "type": "FASTH3_DEPLOYMENT", - "link": 10109 - }, - { - "name": "use_guides", - "type": "BOOLEAN", - "widget": { - "name": "use_guides" - }, - "link": null - }, - { - "name": "guide_first_frame", - "type": "INT", - "widget": { - "name": "guide_first_frame" - }, - "link": null - }, - { - "name": "guide_last_frame", - "type": "INT", - "widget": { - "name": "guide_last_frame" - }, - "link": null - }, - { - "name": "duration", - "type": "FLOAT", - "widget": { - "name": "duration" - }, - "link": null - }, - { - "name": "raw_frames", - "type": "INT", - "widget": { - "name": "raw_frames" - }, - "link": null - }, - { - "name": "reverse_output", - "type": "BOOLEAN", - "widget": { - "name": "reverse_output" - }, - "link": null - }, - { - "name": "trim_start", - "type": "INT", - "widget": { - "name": "trim_start" - }, - "link": null - }, - { - "name": "keep_frames", - "type": "INT", - "widget": { - "name": "keep_frames" - }, - "link": null - }, - { - "name": "width", - "type": "INT", - "widget": { - "name": "width" - }, - "link": 17250 - }, - { - "name": "height", - "type": "INT", - "widget": { - "name": "height" - }, - "link": 17257 - }, - { - "name": "fps", - "type": "INT", - "widget": { - "name": "fps" - }, - "link": 17264 - } - ], - "outputs": [ - { - "name": "raw_frames", - "type": "IMAGE", - "links": [ - 10020 - ] - }, - { - "name": "frames", - "type": "IMAGE", - "links": [ - 10039 - ] - }, - { - "name": "video", - "type": "VIDEO", - "links": [ - 10118 - ] - } - ], - "properties": { - "Node name for S&R": "5c86a69e-989e-46c5-88f7-54c95d4da8d3", - "previewExposures": [] - }, - "widgets_values": [ - "http://localhost:8000/v1", - "Wan-AI/Wan2.2-T2V-A14B-Diffusers", - "subject_definitions:\n: The person defined by , replacing the central performer originally wearing a pale suit in