layer-video

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Layer Video Generation

Layer 视频生成

Overview

概述

Video models take a prompt the way a director takes a shot list, not the way an illustrator takes a brief. A video prompt describes what changes over the clip. A prompt that only describes the scene yields a near-still image with drifting artefacts, which is the most common failure here.
Pick the use case first:
text_to_video
from nothing,
image_to_video
to animate an existing frame,
video_extend
to continue a clip,
video_editing
to alter one. The loop and spend gate are in the
layer
skill. Assembling finished clips into one deliverable is
layer-video-timeline
.
If a sibling skill named here is missing from your available skills, ask the user to install it (
npx skills add layerai/skills --skill <name>
); unattended, proceed from tool schemas and flag the gap.
视频模型接收提示词的方式更像导演接收镜头清单,而不是插画师接收创作简报。视频提示词描述的是片段中会发生什么变化。如果提示词只描述场景,生成结果往往会变成一张近乎静止、且带有漂移伪影的图像,这是这里最常见的故障。
先选择用例:从零开始生成使用
text_to_video
,为现有帧添加动画使用
image_to_video
,延续片段使用
video_extend
,修改片段使用
video_editing
。
loop
筛选和消耗确认机制位于
layer
skill 中。将完成的片段组装成单个交付物则使用
layer-video-timeline
。
如果此处提到的同级 skill 不在可用 skill 列表中,请让用户安装(
npx skills add layerai/skills --skill <name>
);在无人值守的情况下,则依据工具 schema 继续执行,并标记这一缺失。

Anchor on an image whenever one exists

只要存在图像,就以图像为锚点

image_to_video
beats
text_to_video
almost every time a look has already been approved. The first frame fixes the character design, palette, and composition, so the model spends its capacity on motion instead of re-inventing the subject. Attach the still as
init_image
or
first_frame
depending on what the model accepts, and where a model takes both
first_frame
and
last_frame
, supplying both is the most reliable way to control where a shot ends up.
Generate the key frame with
layer-image
, approve it, then animate it.
当视觉风格已经获得认可时,几乎总是应该优先使用
image_to_video
,而不是
text_to_video
。第一帧能够确定角色设计、色板和构图,让模型将能力集中在运动上,而不是重新设计主体。根据模型支持的参数,将静态图像作为
init_image
或
first_frame
传入;当模型同时接受
first_frame
和
last_frame
时,同时提供二者是控制镜头最终位置最可靠的方法。
使用
layer-image
生成关键帧,确认无误后,再为其添加动画。

Writing the motion

编写运动描述

Name three things, in this order:
  1. Subject motion: what moves, in what direction, at what speed. "The banner snaps taut in a gust, then settles" is a shot. "A banner" is a photograph.
  2. Camera: static, slow push in, orbit, handheld drift, crane down. State "locked-off camera" when the camera must not move, because models add drift by default.
  3. Rate: slow, deliberate, sudden, gradual over the full clip. Models otherwise pick a middling pace that reads as neither.
Model families disagree about conventions, so read
get_base_model
for the one you picked rather than reusing phrasing that worked on another family. Where a model exposes structured
video_effects
(entries with an uppercase
type
such as
ORBIT_360
or
DOLLY_IN
, plus an optional
weight
from 0 to 100), prefer that over describing the same move in prose: it is the parameter the model was tuned on.
按以下顺序说明三件事:
  1. 主体运动:什么在移动、朝哪个方向移动,以及移动速度。“横幅在阵风中猛然绷紧,随后逐渐静止”描述的是一段镜头;“一面横幅”描述的是一张照片。
  2. 镜头:固定机位(static)、缓慢推进(slow push in)、环绕(orbit)、手持漂移(handheld drift)或摇臂下降(crane down)。当镜头必须保持不动时,明确写出“locked-off camera”,因为模型默认会加入漂移。
  3. 节奏:缓慢、从容、突然,或贯穿整个片段逐渐变化。否则,模型通常会自行选择不慢不快的节奏,无法呈现出上述任何一种效果。
不同模型系列对提示词约定有所不同,因此应针对所选模型读取
get_base_model
,而不是直接复用其他模型系列中有效的表述。如果模型提供结构化的
video_effects
(条目包含大写的
type
,如
ORBIT_360
或
DOLLY_IN
,并可选提供 0 到 100 的
weight
),应优先使用该参数,而不是用自然语言描述相同的镜头运动,因为这是模型专门调优过的参数。

Duration, audio, and lip sync

时长、音频与唇形同步

Clip length is per-model and short, usually a handful of seconds. Do not plan a 30-second piece as one generation without confirming a model supports it.
Some models choose their own length and ignore
duration_seconds
entirely. When the clip has to land on an exact length, filter for
fixed_duration
, which excludes them. Without it a model may simply hand back a different length, and nothing in the response reads as an error.
generate_audio
is a capability, so filter for it when the clip needs native sound rather than assuming silence can be fixed later.
lipsync
is a separate capability for dialogue on a character.
filter.capabilities
is an object of booleans, not a list of names:
{generate_audio: true}
.
Video runs count against a tighter rate limit than images: 60 generations per minute per user, of which at most 30 may be video.
片段长度取决于具体模型,而且通常很短,往往只有几秒钟。在确认模型支持之前,不要将 30 秒的内容规划为一次生成。
有些模型会自行选择长度,并完全忽略
duration_seconds
。当片段必须达到精确时长时,应按
fixed_duration
筛选,这会排除上述模型。否则,模型可能只是返回不同时长的片段,而响应中不会有任何内容表明这是错误。
generate_audio
是一项能力,因此当片段需要原生声音时应按该能力筛选,而不要假设之后可以再修复静音问题。
lipsync
是为角色对白提供的独立能力。
filter.capabilities
是一个由布尔值组成的对象,而不是名称列表:
{generate_audio: true}
。
视频任务比图像任务受到更严格的速率限制:每位用户每分钟最多生成 60 次,其中最多可有 30 次为视频生成。

Multi-shot pieces

多镜头作品

An ad, trailer, or cutscene is several shots. Before assembling, check whether a model can render the whole thing in one generation, because one generation holds its own continuity and assembly does not. When assembly is genuinely needed:
  1. Lock the look with one approved still.
  2. Generate each shot as
    image_to_video
    from a frame consistent with that still.
  3. Cut them together with
    layer-video-timeline
    .
Storyboard it first if there are more than three shots: see
layer-art-direction
.
广告、预告片或过场动画通常由多个镜头组成。在开始组装之前,应先检查模型是否能够在一次生成中渲染整个作品,因为单次生成本身能够保持连续性,而后期组装不能。确实需要组装时:
  1. 使用一张已确认的静态图像锁定视觉风格。
  2. 使用
    image_to_video
    ,从与该静态图像保持一致的帧生成每个镜头。
  3. 使用
    layer-video-timeline
    将这些镜头剪辑到一起。
如果镜头超过三个,应先制作分镜脚本;参见
layer-art-direction
。

Loops

循环

Filter for the
loop
capability first. It selects models that compose a seam-free loop rather than merely describing one, which is a different thing from a model that will accept the word "looping" in a prompt and return a clip that jumps at the cut. Pair it with
fixed_duration
when the loop has to be a specific length.
Failing that, generate the anchor frame and use it as both
first_frame
and
last_frame
where the model accepts both, so the motion at least returns to where it started.
Either way, keep the motion cyclical by nature (a flag in wind, a torch flicker, a hovering idle) and avoid one-way motion such as a character walking out of frame, which cannot be made to loop by any amount of prompting.
首先按
loop
能力筛选。它会选择能够生成无接缝循环的模型,而不是仅接受提示词中的“looping”一词,却返回在剪辑点发生跳变的片段的模型。如果循环必须达到特定长度,应同时按
fixed_duration
筛选。
如果无法做到这一点,则生成锚点帧,并在模型接受
first_frame
和
last_frame
的情况下,将同一图像同时作为二者传入,使运动至少能够回到起点。
无论采用哪种方法,都应让运动在本质上具有周期性,例如风中飘动的旗帜、火炬的闪烁或悬停时的待机动作。避免使用角色走出画面等单向运动,因为无论怎样调整提示词,都无法将其制作成循环。

Worked example

实例

"Animate this approved character key frame into a 5-second idle loop."
  1. The frame exists from a previous run, so it already has a
    file_id
    .
  2. list_base_models
    with
    filter.use_case: "image_to_video"
    and
    filter.capabilities: {loop: true, fixed_duration: true}
    , since this has to loop seamlessly and land on five seconds. Take the first result, then
    get_base_model
    to see whether it accepts
    last_frame
    and structured
    video_effects
    .
  3. Prompt the motion only: "The character breathes slowly, cloak drifting in a light breeze, weight shifting subtly between feet. Locked-off camera. Gentle, continuous, no change in pose by the end of the clip."
  4. Pass the same file as
    first_frame
    and
    last_frame
    so the loop closes.
  5. Estimate. Video is priced well above images, so this will often clear 20 CUs and need an explicit yes.
  6. Execute, poll at
    poll_interval_seconds
    , and check the seam by watching the end run into the start before calling it a loop.
“将这个已确认的角色关键帧制作成 5 秒的待机循环动画。”
  1. 该帧来自上一次运行,因此已经拥有
    file_id
    。
  2. 调用
    list_base_models
    ,设置
    filter.use_case: "image_to_video"
    和
    filter.capabilities: {loop: true, fixed_duration: true}
    ,因为该动画必须无缝循环并精确达到 5 秒。取第一个结果,然后调用
    get_base_model
    ,确认模型是否接受
    last_frame
    以及结构化的
    video_effects
    。
  3. 只提示运动内容:“角色缓慢呼吸,斗篷在微风中飘动,重心在双脚之间细微转换。锁定机位(locked-off camera)。动作轻柔、连续,到片段结束时姿势保持不变。”
  4. 将同一个文件同时作为
    first_frame
    和
    last_frame
    传入,使循环闭合。
  5. 估算消耗。视频的计费远高于图像,因此消耗经常会超过 20 CUs,需要明确确认。
  6. 执行任务,按
    poll_interval_seconds
    轮询,并观看片段结尾衔接到开头的效果,确认接缝没有问题后,才能将其称为循环动画。

Common mistakes

常见错误

  • Prompting the scene instead of the motion, then reporting the model "barely moved".
  • Using
    text_to_video
    when an approved still already exists.
  • Leaving the camera unspecified, then fighting drift the model added by default.
  • Describing a camera move in prose when the model exposes
    video_effects
    .
  • Planning a long piece as one clip without checking a model's duration limit.
  • Assuming audio can be added later on a model that could have generated it natively.
  • Prompting for a loop instead of filtering for the
    loop
    capability.
  • Leaving
    fixed_duration
    off when the clip has to land on an exact length.
  • Calling a clip a loop without watching the seam.
  • 提示词只描述场景而不描述运动,随后报告模型“几乎没有移动”。
  • 已经存在获得确认的静态图像,却仍然使用
    text_to_video
    。
  • 不指定镜头运动,随后又试图消除模型默认加入的漂移。
  • 模型已经提供
    video_effects
    ,却仍使用自然语言描述镜头运动。
  • 未检查模型的时长限制,就将长内容规划为一个片段。
  • 没有筛选原本能够生成原生音频的模型,却假设音频可以之后再添加。
  • 仅仅在提示词中要求循环,而没有按
    loop
    能力筛选模型。
  • 片段必须达到精确长度,却没有使用
    fixed_duration
    筛选。
  • 没有观看片段接缝,就直接将其称为循环动画。