Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion schemas/imagetovideoasset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ImageToVideoAsset:
description: |
**Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
with `prompt`, a `model` that accepts a starting image, and that image in
`options.inputSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
`options.startSrc` — for example `seedance-2.0-image-to-video`.** This type continues to
function and is internally rewritten to VideoAsset; no behaviour change for
existing integrations.

Expand Down
6 changes: 4 additions & 2 deletions schemas/videoasset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
- **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
- **Generated:** set `prompt` to describe the motion. Choose a generator
with `model` and configure it with model-specific `options`. Models that
animate a starting image take it as `options.inputSrc`; the default model
animate an image take it as `options.startSrc` (the original
image-to-video models use `options.inputSrc`); the default model
generates from the prompt alone. The generated `src` is filled in
automatically.
- **Both:** `src` acts as a preview placeholder while `prompt` drives
Expand Down Expand Up @@ -35,7 +36,8 @@
at render time and fills `src` automatically; an existing `src` is
treated as a preview placeholder and replaced. Use `model` to choose
the generator and `options` to configure it. A starting image goes in
`options.inputSrc`, on the models that accept one.
`options.startSrc` — or `options.inputSrc` on the original
image-to-video models — on the models that accept one.
type: string
maxLength: 4000
example: Slowly zoom out and orbit left around the object.
Expand Down
8 changes: 4 additions & 4 deletions tests/smoke.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ async function run() {
assert.strictEqual(result.model, "flux-schnell");
});

check("Parse videoAsset with prompt + options.inputSrc", () => {
check("Parse videoAsset with prompt + options.startSrc", () => {
const result = zodCjs.videoAssetSchema.parse({
type: "video",
prompt: "Slowly zoom out and orbit left around the object",
options: { inputSrc: "https://example.com/input-image.jpg" },
options: { startSrc: "https://example.com/input-image.jpg" },
});
assert.strictEqual(result.prompt, "Slowly zoom out and orbit left around the object");
assert.strictEqual(result.options.inputSrc, "https://example.com/input-image.jpg");
assert.strictEqual(result.options.startSrc, "https://example.com/input-image.jpg");
});

check("Parse videoAsset with prompt + model + options", () => {
Expand Down Expand Up @@ -389,7 +389,7 @@ async function run() {

check("REJECT video with only options and no src/prompt (options never satisfies the rule)", () => {
assert.throws(() =>
zodCjs.videoAssetSchema.parse({ type: "video", options: { inputSrc: "https://example.com/input.jpg" } })
zodCjs.videoAssetSchema.parse({ type: "video", options: { startSrc: "https://example.com/input.jpg" } })
);
});

Expand Down
Loading