跳到正文
DEV Community· Deep Variance·· 2 小時前AI 評分57

DV4 如何以提示詞和程式碼製作動態圖像影片

Motion graphics from a prompt, written as code

AI 導讀

Deep Variance 介紹 DV4 如何根據提示詞以程式碼逐場景設計動態圖像影片,而不是套用固定模板。模型會渲染草稿、檢視畫面並修正;程式會檢查片尾以外超過半秒的靜止片段、貼近邊緣的文字及黑畫面。用戶可加入圖片和音樂,統計數字只會在用戶提供數值時出現;功能適用於任何付費方案,影片不支援旁白。

正文

Some videos should not be filmed. A sale that starts on Friday, a product that launches next week, a bakery that opens on Saturday: the message is a few words, a date and maybe a picture. What makes it work is how the words move. That is motion graphics: designed type, shapes and pictures, animated to music.

DV4 makes motion graphics from a prompt. This post explains how, because the method is unusual. There is no template behind it.

Where motion graphics beat footage

Filmed shots are good at people, places and things in light. Motion graphics are good at messages: a launch date, three reasons to buy, a before and after, an opening announcement. They read clearly on a phone with the sound off, and every word is exact, because every word is set as type.

In DV4 a motion graphics video is designed motion with your pictures and music. No footage is generated. It is on the paid plans, in landscape or vertical.

No template: a film written for this request

A common way to make an animated video from a prompt is a template: a set of layouts and moves with your words dropped in. It is fast, and every customer gets the same moves.

DV4 has no templates. A model writes each film as code: the layout of every scene, the type, the colours, the way each element enters and leaves, the cuts. It works the way a motion designer who writes code would, with a file of its own that it edits, renders and edits again.

So that two requests do not get the same film, there is no house style. No default palette, no default easing, no end card that every video shares. Each job draws its own style direction and its own references, and the model commits to them unless your prompt or your pictures say otherwise.

How the rest of DV4 works, the planning, the checks and the assembly, is in From one line to a finished video.

The model looks at its own drafts

Writing code for a film without seeing it is like setting type with your eyes closed. So the model renders a draft, looks at frames from it and fixes what it sees: a title that is too small, a scene that crowds the edge, a transition that hides the next line before you can read it.

It cannot skip that step. The model can only finish once the version it is finishing has rendered and been looked at.

What the checks catch

The model is not the only one looking. Code checks every render and hands the findings back before the film can be finished:

  • Frozen stretches. If nothing on screen moves for longer than half a second outside the final moment, the model is told where, so it can keep something moving.
  • Words at the edge. Text recognition reads the frames. A word that touches the edge of the frame, or crowds it, is reported with its time.
  • Black frames. A flash of black between scenes is caught and named.

Before you see the finished film, its words and its frames go through DV4's safety checks, as every video does. The code itself is scanned before it ever runs, may not call the network, and runs only in a headless browser on our own workers.

It will not invent your numbers

Animated statistics are a motion graphics favourite, and a liability. A model that is asked for "three big numbers" will happily make some up.

DV4's plan is checked for exactly that. A statistic appears only when the figure came from you. A quote appears only when you wrote the words in quotation marks. If you want "40% off" on screen, put "40% off" in your prompt.

Your pictures, your music

You can add your own pictures, of the product, the shop or the team, and the film is designed around them rather than around stock shapes. For sound, DV4 composes music for the film, and the scenes are cut to its beats. If you have a track you want to use, upload it as your soundtrack instead.

Motion graphics play over music, not over speech. A motion graphics video does not take a voice recording.

How to write the prompt

Say what the film is for, what it must say and how it should feel:

A 15-second vertical announcement for Bloom Bakery's grand opening this Saturday at 9 am. Warm and lively. Show the date big. End with the address: 12 Elm Street.

A few habits help:

  • Put every exact word in the prompt. Names, dates, prices and addresses appear as you wrote them.
  • Give the length and the format. Vertical for reels and stories, landscape for the web.
  • Name a feeling, not a font. "Calm and premium" or "loud and fast" gives the model room to design.
  • Add your pictures when the film is about something real.

What it does not do yet

Motion graphics in DV4 are not narrated: there is no voice-over. The film does not use a brand kit yet, so give your colours in the prompt if they matter. It does not edit a video you already have. And when a film fails, which can happen with a model writing code, the job is refunded and you can run it again.

Try it

Write the announcement you have been putting off, in one paragraph, and watch DV4 design it, look at its own drafts and finish it. You can make motion graphics in DV4 on any paid plan.

Every draft is rendered and every frame is checked, and all of it runs on GPUs and CPUs that cost money by the second. Making that work faster and cheaper is the other half of what we do at Deep Variance: we build the auto-tuning inference stack for open-source diffusion models, and DV4 runs on the stack.


Originally published on the Deep Variance blog.

來源:DEV Community · dev.to