layer-video-fixes
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLayer Video Fixes
Layer 视频修复
Overview
概述
A clip that is 90 percent right is worth more than a fresh roll. Rerolling throws away the motion,
the timing and the performance that already work, and buys a new set of problems. Layer exposes a
use case for most single defects, so the job is to name the defect, pick the use case that fixes only
that, and leave everything else as it was.
Generating a clip from scratch is ; cutting finished clips together is
. The loop, the spend gate and polling are in the skill.
layer-videolayer-video-timelinelayerIf a sibling skill named here is missing from your available skills, ask the user to install it
(); unattended, proceed from tool schemas and flag the
gap.
npx skills add layerai/skills --skill <name>一个完成度已达 90% 的片段,远比重新生成的结果更有价值。重新生成会丢弃已经奏效的动作、节奏和表演,却换来的只是一批新问题。Layer 针对大多数单一缺陷都提供相应的 use case,因此关键是准确指出缺陷,选择只修复该缺陷的 use case,并让其他部分保持原样。
从零生成片段使用 ;将完成的片段剪辑在一起使用 。循环、支出控制和轮询逻辑位于 skill 中。
layer-videolayer-video-timelinelayer如果此处提到的某个同级 skill 不在可用 skill 列表中,请让用户安装();在无人值守模式下,则依据 tool schema 继续执行,并标记这一缺失。
npx skills add layerai/skills --skill <name>Quick reference
快速参考
Each route is with set as below; take the first result.
list_base_modelsfilter.use_case| Symptom | |
|---|---|
| Clip ends too soon, action is cut off | |
| A moment is missing in the middle | |
| One element is wrong (colour, prop, background) | |
| The wrong object is in shot | |
| The wrong character, or an off-model one | |
| Right performance, wrong subject | |
| Lighting fights the scene it is cut into | |
| Motion stutters, or the shot needs slow motion | |
| Too small for delivery | |
| Grain or compression noise | |
| Soft or motion-blurred | |
| Standard range master needed as HDR | |
每条修复路径都是调用 ,并将 设为下表所示的值;取第一个结果。
list_base_modelsfilter.use_case| 症状 | |
|---|---|
| 片段结束得太早,动作被截断 | |
| 中间缺少某个时刻 | |
| 某个元素有误(颜色、道具、背景) | |
| 镜头中的物体错误 | |
| 角色错误,或出现了偏离设定的角色 | |
| 表演正确,但主体错误 | |
| 光照与所在场景不协调 | |
| 动作卡顿,或镜头需要制作慢动作 | |
| 尺寸太小,无法交付 | |
| 存在颗粒或压缩噪声 | |
| 画面偏糊或因运动产生模糊 | |
| 需要将标准动态范围母版转换为 HDR | |
Read the model before the first call
首次调用前读取模型
These models disagree about inputs more than generation models do. The schema does not fix which
guidance slot a repair model reads the source clip from ( or ), nor
where a replacement subject goes (, , or an type). Call
on the chosen model and use the slots it lists; never assume one because another
model took it. When a fix needs two inputs at once, narrow the search with
, for example , which keeps only
models that accept both.
init_videoreference_videoreference_imagefaceelement_*get_base_modelfilter.guidance_file_types["init_video", "reference_image"]Guidance files are objects in . A clip from an earlier run already
has a ; pass it directly. Upload only footage that is local, with .
{file_id, type}guidance_filesfile_idrequest_file_upload_url这些模型对输入的约定比生成模型之间差异更大。schema 并不能确定修复模型会从哪个 guidance 槽位读取源片段( 或 ),也不能确定替换主体应放在哪个槽位(、 或某种 类型)。对选定模型调用 ,并使用其中列出的槽位;绝不能因为另一个模型接受某种输入,就假定当前模型也接受。修复需要同时使用两种输入时,通过 收窄搜索范围,例如 ,这样只会保留同时接受两种输入的模型。
init_videoreference_videoreference_imagefaceelement_*get_base_modelfilter.guidance_file_types["init_video", "reference_image"]guidance_files{file_id, type}file_idrequest_file_upload_urlRepair from the original
基于原始素材进行修复
Every pass through a model costs detail. Three fixes chained on each other look worse than three
fixes each made from the source, and the losses compound in faces and fine texture first. Keep the
original as the master, apply each fix to the master where the fixes are independent, and
chain only when a later fix genuinely needs the earlier result (upscale last, after the content is
settled, since an upscale of a clip you then edit is wasted).
file_idTo fix only part of a clip (slow motion on the last two seconds), cut that span out first with a
edit ( and , ),
then repair the cut file.
render_video_timelinestart_from_in_secondsduration_in_frameslayer-video-timeline每次让模型处理一遍都会损失细节。让三个修复相互串联的结果,比分别从源片段完成三次修复更差;损失会首先在人脸和精细纹理上不断累积。保留原始 作为母版;如果各项修复彼此独立,应分别基于母版应用。只有后一项修复确实需要前一项结果时才串联(放大必须放在最后,在内容确定后进行,因为先放大、之后再编辑会白做)。
file_id如果只需修复片段的一部分(例如最后两秒制作慢动作),先用 编辑功能裁出该片段( 和 ,),然后修复裁剪后的文件。
render_video_timelinestart_from_in_secondsduration_in_frameslayer-video-timelineSound, length and frame rate
声音、时长和帧率
- Sound. Set to carry the source's audio through a fix. Without it, assume the output may be silent, and check before delivering.
keep_audio: true - Length. Extensions, inserts and interpolation change a clip's duration, and some swaps do too. Report the new length to the user, especially when the clip sits in an edit cut to music. An interpolated slow-motion shot is longer by design; a swap that came back shorter is a defect.
- Frame rate. is honoured only by the models that take it (
fpssays so). Ask for interpolation to reach a target rate rather than generating at one the model ignores.get_base_model - Size. For a reframe, pass both and
width. With either one missing and a source attached, the output geometry is taken from the source file.height
For an upscale, sets the factor (2.0, 4.0). and trade
invented detail against fidelity; keep resemblance high on footage with faces or text.
upscale_ratiocreativityresemblance- 声音。 设置 ,让源音频在修复后继续保留。如果不设置,应假定输出可能没有声音,并在交付前检查。
keep_audio: true - 时长。 扩展、插入和插帧会改变片段时长,部分替换操作也会改变时长。将新时长告知用户,尤其是在片段位于按音乐剪辑的成片中时。经过插帧的慢动作镜头按设计会更长;替换后的片段如果变短,则属于缺陷。
- 帧率。 只有接受 参数的模型才会遵循该设置(
fps会注明)。如果需要达到目标帧率,应要求进行 interpolation,而不要直接按模型会忽略的帧率生成。get_base_model - 尺寸。 进行 reframe 时,同时传入 和
width。如果缺少其中任何一个参数且已附加源文件,则输出画幅取自源文件。height
对于放大操作, 设置放大倍数(2.0、4.0)。 和 用于在凭空生成的细节与保真度之间取舍;对于包含人脸或文字的素材,应保持较高的 。
upscale_ratiocreativityresemblanceresemblancePricing
定价
The forge guide prices a video edit by its source's length and an upscale by its source's
dimensions. An estimate without the source attached prices a different run, so pass
exactly the inputs will get. Several fixes on clips of
different lengths are several estimates, never the first one multiplied. Sum the job and ask before
spending above 20 CUs.
estimate_forge_priceexecute_forgeforge 定价指南会根据源片段的时长为视频编辑定价,并根据源片段的尺寸为放大操作定价。如果未附加源文件,估价对应的是另一次运行,因此应向 传入与 完全相同的输入。对时长不同的片段进行多项修复,需要分别估价,绝不能将第一次估价直接乘以修复次数。汇总任务费用;预计支出超过 20 CUs 时,先征得用户同意。
estimate_forge_priceexecute_forgeWorked example
实例
"The hero's 6-second clip is perfect except the sword turned into a staff halfway through. Also make
it 4K for the trailer."
- The clip is a previous run's output, so it has a . Keep it as the master.
file_id - Defect one is a wrong object: with
list_base_models. Take the first result and callfilter.use_case: "video_object_swap"for its source slot and replacement slot.get_base_model - Defect two is size: with
list_base_modelsandfilter.use_case: "upscaling";filter.modality: "video"for its slot and ratio limits.get_base_model - Price both before running either: for the swap with the master attached in its listed slot, the approved sword still as the replacement,
estimate_forge_price, and a prompt naming only the change: "Replace the staff in the hero's right hand with the approved longsword. Keep the motion, the timing and everything else unchanged." Then estimate the upscale withkeep_audio: trueagainst a 6-second source. Present the total; above 20 CUs wait for a yes.upscale_ratio: 2.0 - the swap; poll
execute_forgeatget_forge_run. Check the length is still 6 seconds and the sword holds across every frame.poll_interval_seconds - Upscale the swap's output (from step 5), the one fix that must come last. Poll, then report both
file_idvalues and any change in length.file_id
“主角的 6 秒片段除了中途剑变成了法杖之外,其他部分都很完美。另外还要为预告片把它做成 4K。”
- 该片段是先前运行的输出,因此已经有 。将其保留为母版。
file_id - 第一个缺陷是物体错误:调用 ,并设置
list_base_models。取第一个结果,再调用filter.use_case: "video_object_swap"查看其源片段槽位和替换内容槽位。get_base_model - 第二个缺陷是尺寸:调用 ,并设置
list_base_models和filter.use_case: "upscaling";再调用filter.modality: "video"查看其槽位和倍数限制。get_base_model - 在运行任一修复前,先分别定价:调用 估算对象替换,将母版放入模型列出的源片段槽位,以已批准的剑作为替换内容,设置
estimate_forge_price,并提供一条只描述改动内容的 prompt:“将主角右手中的法杖替换为已批准的长剑。保持动作、时间点及其他一切不变。”然后针对 6 秒源片段,以keep_audio: true估算放大费用。给出总费用;超过 20 CUs 时,等待用户确认。upscale_ratio: 2.0 - 调用 执行替换;按
execute_forge轮询poll_interval_seconds。检查时长是否仍为 6 秒,以及剑是否在所有帧中都保持正确形态。get_forge_run - 对替换结果(步骤 5 中的 )进行放大;这是唯一必须最后执行的修复。轮询完成后,报告两个
file_id以及任何时长变化。file_id
Common mistakes
常见错误
- Rerolling a clip whose only defect a single use case could fix.
- Assuming the source slot instead of reading it from .
get_base_model - Chaining independent fixes off each other instead of each off the master.
- Upscaling first, then editing the upscaled clip.
- Losing the soundtrack by leaving unset.
keep_audio - Delivering a fixed clip without saying its length changed.
- Pricing several fixes from one estimate when their sources differ in length or size.
- Prompting a repair with a full scene description instead of only the change.
- 重新生成一个仅存在某种单一 use case 可修复缺陷的片段。
- 不读取 ,而是想当然地假定源片段槽位。
get_base_model - 让彼此独立的修复相互串联,而不是分别基于母版执行。
- 先放大,再编辑已放大的片段。
- 未设置 ,导致音轨丢失。
keep_audio - 交付修复后的片段,却未说明其时长已变化。
- 当各项修复所用源片段的时长或尺寸不同时,仍使用一次估价为所有修复定价。
- 用完整场景描述来提示修复,而不是只描述改动。