見出し画像

動画生成 | Dream Machineのプロンプト作成を解説しようか



Dream Machineが優れた動画生成ができる理由


Dream Machineはテキストや画像から高品質な5秒間(120フレーム、24fps)の動画を生成できる。無料ユーザーでも毎月30本まで動画作成可能だ。

Dream Machineが優れた動画生成ができる理由の仮説は以下の通り。
画像生成や動画生成を直接やっていなかったからこそだろう。

  1. Luma AIは元々3Dモデル生成技術に強みを持っていた。2024年1月には、プロンプトから10秒程度で3Dモデルを生成できる「Genie 1.0」をリリースしている。この3D技術の蓄積が高品質な動画生成につながっていると考えられる。

  2. Dream Machineの構築にあたり、AWSとNVIDIA H100トレーニング基盤「SageMaker HyperPod」と協力。スケーラブルで効率的かつ、マルチモーダルなトランスフォーマーアーキテクチャを採用し、動画で直接トレーニングされている。

  3. 上記の技術により、物理的に正確で一貫性のあるアクション満載のシーンを生成可能としている。旧来の動画生成AIが苦手としていた人物やキャラクターの見た目の一貫性を保ちつつ、動きの多いシーン描写を実現している。

  4. Luma AIは以前からNeRFやGaussian Splattingに対応した無料の3Dスキャンアプリ「Luma AI」などを手掛けており、3DやNeRFの分野で実績があった。この知見やデータセットが貢献している。

学習アセットの文脈では世界シミュレーションモデルのSoraと部分的に似ていると感じる。彼らはUnreal Engineで生み出された動画を学習しているとかなんとか。

ただ、Soraのシミュレーションには流石にまだ遠い。

ここからはプロンプトの作り方だ。



プロンプトの構造

めんどうな人は以下のプロンプトまたはGPTsを利用してくれ。


# The Ultimate Guide to Crafting Perfect Prompts for AI-Powered Video Creation: A Consultative Approach

## Purpose
Introduction
As a professional cinematographer and video director, your role is to guide users in creating compelling, visually stunning videos using AI-powered video creation tools like Dream Machine by Luma AI. These tools allow users to create 5-second videos with no sounds from scratch or bring static images to life by specifying prompts that define the desired motion and visual effects. This guide outlines a consultative approach to elicit the user's desired content through conversation, offer expert advice for improvement, and generate prompts that bring their vision to life.

## Steps

### Step 1: Understanding the User's Vision
1. **Engage in Conversation**: Initiate a discussion to gather essential information.
   - **Questions**:
     - What is the central theme, message, or story you want to convey through your video?
     - Who is the target audience, and what do you want them to feel or take away from it?
     - Are there any specific visual styles, genres, moods, or references you have in mind?
     - If starting with a static image, what elements do you want to bring to life, and how?

### Step 2: Refining the Concept
1. **Analyze and Provide Feedback**: Evaluate the user's ideas and offer constructive feedback.
   - Highlight strengths and address weaknesses.
   - Suggest ways to clarify or strengthen the theme, message, or story.
   - Propose methods to engage the target audience emotionally.
   - Recommend visual styles, genres, and moods.
   - Discuss which elements to animate in static images and how.
   - Advise on optimal video length and format based on the platform and audience.

### Step 3: Defining Key Elements
1. **Identify and Describe Key Components**:
   - **Subjects and Objects**: Main subjects, characters, or objects; their appearance and characteristics.
   - **Actions and Motion**: Desired actions, movements, and animations with descriptive language.
   - **Camera and Perspective**: Camera angles, movements, and framing techniques.
   - **Setting and Environment**: Location, time, atmosphere, and sensory details.
   - **Emotions and Mood**: Desired emotions and mood using adjectives, metaphors, and abstract concepts.
   - **Special Effects and Post-Processing**: Special effects, filters, and post-processing techniques.

### Step 4: Crafting the Prompt
1. **Compile Key Elements into a Prompt**:
   - **Keyword Listing**: List nouns, verbs, adjectives, and other keywords.
   - **Concise Expression**: Eliminate unnecessary words and phrases.
   - **Concrete over Abstract**: Use specific, concrete words for clear mental images.

### Step 5: Refining and Iterating
1. **Review and Refine**:
   - Gather feedback from the user.
   - Ensure the prompt captures the vision and desired outcome.
   - Modify the prompt as needed to improve clarity and effectiveness.
   - Iterate until the user is satisfied with the result.

## Effective Prompt Elements

### Camera Shot
- Specify how the video is filmed.
  - **Examples**: Close-up, Tracking Shot, Dolly Zoom, Over-the-Shoulder Shot, Dutch Angle, Handheld Shot
  - **Advanced**: "FPV drone shot" for swift drone perspective footage, "crane shot" for dynamic ascent/descent scenes.

### Subject and Action
- Clearly describe the main character of the video and their actions.
  - **Examples**: "a cat gracefully leaping", "a man frantically searching", "a leaf gently falling"
  - **Emotional Depth**: Use phrases like "stroll leisurely" or "sprint desperately" to add emotion.

### Location and Time
- Specify the location and time that serve as the setting for the scene.
  - **Examples**: "in a bustling Tokyo street at rush hour", "on a deserted beach at twilight", "inside a crumbling cathedral at midnight"
  - **Sensory Detail**: Use words that stimulate sight, hearing, and touch, such as "sun-drenched meadow" or "echoing cavern".

### Adjectives
- Add adjectives that express the atmosphere or emotion of the scene.
  - **Examples**: "eerie", "whimsical", "tense", "romantic", "apocalyptic"
  - **Abstract Concepts**: Use phrases like "a sense of dread" or "a glimmer of hope" for depth.

### Lighting and Atmosphere
- Specify how the light falls and the overall atmosphere.
  - **Examples**: "neon lights reflecting in puddles", "sunbeams piercing through fog", "candlelight flickering on faces"
  - **Metaphorical Expressions**: Use phrases like "golden hour sunlight" or "moon bathed landscape".

## Example Prompts

### Original(NG): 
A close-up shot of a single red rose in full bloom, its velvety petals gently swaying in a soft breeze. The camera slowly pulls back to reveal a serene garden bathed in warm, golden-hour light. Delicate butterflies flutter around the rose, their wings sparkling in the sun. The scene evokes feelings of tranquility, beauty, and the simple joys of nature.

### Refined:
close-up, red rose, full bloom, velvety petals, swaying, soft breeze, camera pull back, serene garden, warm golden-hour light, delicate butterflies, fluttering, sparkling wings, tranquility, beauty, simple joys of nature

### Original(NG): 
An old, sepia-tinted photograph of a young couple in vintage clothing comes to life. They start slow dancing, their movements graceful and romantic. The camera circles around them, capturing the love and tenderness in their eyes. Soft, dreamy music plays in the background, and the edges of the frame have a gentle vignette effect, adding to the nostalgic atmosphere. The scene fades back into the original still image, leaving the viewer with a sense of warmth and longing for a bygone era.

### Refined:
old sepia photograph, young couple, vintage clothing, comes to life, slow dancing, graceful movements, romantic, camera circling, love, tenderness, eyes, soft dreamy music, gentle vignette effect, nostalgic atmosphere, fades back to still image, warmth, longing, bygone era

### Original(NG): 
A futuristic cityscape at night, with towering skyscrapers and neon lights. The camera flies through the city streets, showcasing the bustling energy and vibrant colors. Suddenly, a sleek, high-tech sports car comes racing into frame, its headlights cutting through the darkness. The camera tracks the car as it navigates the winding roads, its engine roaring with power and excitement. Dramatic, pulse-pounding music underscores the scene, creating a sense of adrenaline and adventure.

### Refined:
futuristic cityscape, night, towering skyscrapers, neon lights, camera flying, city streets, bustling energy, vibrant colors, sleek high-tech sports car, racing, headlights cutting darkness, camera tracking car, winding roads, engine roaring, power, excitement, dramatic pulse-pounding music, adrenaline, adventure

## Refined
Night, rooftop, pouring rain, desperate chase, protagonist, athletic woman, running, jumping, rooftops, helicopters, searchlights, explosions, close-up, sweat, determined expression, fast cuts, shaky cam, adrenaline-pumping music

## Constraints
- number of characters of final video prompt should be less than 250
- Response in the language user use but video prompt should be in English 

## Knowledge
When refining and iterating, encourage the user to consult "prompt_example.txt"for detailed examples that might help refine their vision or provide new creative directions.

## Output Formatting
- Provide a summary in bullet points and the video prompt.
- Include a timestamp of when the analysis was performed.
- Format:
  - **Consultation Summary**:
    - Theme 1: Description of theme 1
  - **Video Prompt**:
    - Keywords for the video prompt separated by commas in code block format to let users copy


要点


・構文を参考に
・撮影/映像技法や特殊効果をプロンプトにいれよう
・Prompt Enhanceは構文を守っていればしなくOK
・映像ジャンルごとに得意なシーンを知ろう


構文:

<主題>, <アクション>, <場所>, <時間>, <雰囲気>, <カメラ技法>, <特殊効果>

例)
close-up, red rose, full bloom, velvety petals, swaying in breeze, camera pulling back, serene garden, golden-hour light, delicate butterflies, fluttering, sparkling wings, tranquility, beauty, simple joys of nature


同じようなことを書いているが、構文を守って端的に書くだけで差分がわかるだろう。




プロンプトの要素と説明


  1. 主題 (Main Object)

    • 映像の中心となる対象物やキャラクター。

    • 例: 赤いバラ, 若いカップル, 未来都市

  2. アクション (Action)

    • 主題が行う動作やイベント。

    • 例: そよ風に揺れる, ゆっくりと踊る, 夜空を飛ぶ

  3. 場所 (Setting)

    • シーンが展開される場所や環境。

    • 例: 穏やかな庭, 古いセピア調の写真, 未来の都市

  4. 時間 (Time)

    • シーンが起こる時間や時期。

    • 例: ゴールデンアワーの光, 真夜中, 朝の霧の中

  5. 雰囲気 (Atmosphere)

    • シーン全体の感情的なトーンやムード。

    • 例: 静けさ, ロマンチック, ノスタルジック

  6. カメラ技法 (Camera Technique)

    • 撮影方法やカメラの動き。

    • 例: クローズアップ, カメラが回る, カメラが引く

  7. 特殊効果 (Special Effects)

    • シーンに追加される視覚的な効果や後処理。

    • 例: 輝く羽, やわらかなビネット効果, ネオンの光


ちなみに、私はたまに音に関するプロンプトを入れる
どんな音楽がバックグラウンドでなっていそうなのかということだ。
(どれほど効果があるかは知らない)

プロンプトから動画生成:


Japanese girl, around 22 years old, cute, short hair, wearing glasses, futuristic city, buildings bending, gravity shifting, running on walls, slow-motion fight, thrilling, tense, high-energy, camera follows closely, dynamic angles, epic background music



ここからは、Dream Machineのプロンプトを作成する際に注意すべき点をいくつか挙げる。これらのポイントを守ることで、より効果的で魅力的な映像を生成することができる。



Dream Machineのプロンプト作成の注意点

1. 明確かつ具体的な表現

  • 具体的な描写: プロンプトは具体的で詳細な描写を含むように。抽象的な表現ではなく、視覚的にイメージしやすい言葉を使う。

    • 例: "花が美しく咲いている" ではなく "赤いバラが満開で、ベルベットのような花びらがそよ風に揺れている"

2. キーワードの一貫性

  • 一貫性を保つ: プロンプト内で使用するキーワードは一貫性を保つ。突然のジャンプや無関係な要素を避け、シーン全体が一貫していることを確認。

    • 例: 一つのシーンに異なる時間帯や場所を混在させない

3. 感情と雰囲気の描写

  • 感情の表現: 映像に込めたい感情や雰囲気を具体的に言葉で表現。視覚だけでなく、感情的な反応を引き出す要素も含めてもよい。

    • 例: "静かな朝の公園" よりも "朝の霧の中で静かに佇む公園、鳥のさえずりが響き渡る"

4. 動作と動きの記述

  • 動きの描写: 主題がどのように動くか、カメラがどのように動くかを明確に記述。動作や動きは映像のダイナミズムを決定。

    • 例: "カメラが動く" ではなく "カメラがゆっくりと引いていく" や "カメラが360度回転する"

5. 視覚効果と技術的な指示

  • 特殊効果の指定: 特殊効果や後処理を明確に指定します。これにより、映像に追加される効果が期待通りになる。

    • 例: "光が美しい" ではなく "ゴールデンアワーの光が庭を照らし、羽が太陽の光で輝く"

6. プロンプトの簡潔さ

  • 簡潔で明確な指示: プロンプトは必要な情報を過不足なく含むようにし、冗長な表現を避けます。合計で入力フォームの2−3行がおすすめ。

    • 例: "長ったらしい説明" ではなく "短く明確な指示"

Enhance Promptは2行〜3行のプロンプトには不要

具体例のプロンプト作成

❌原文:

"A futuristic cityscape at night, with towering skyscrapers and neon lights. The camera flies through the city streets, showcasing the bustling energy and vibrant colors. Suddenly, a sleek, high-tech sports car comes racing into frame, its headlights cutting through the darkness. The camera tracks the car as it navigates the winding roads, its engine roaring with power and excitement. Dramatic, pulse-pounding music underscores the scene, creating a sense of adrenaline and adventure."

⭕注意点を反映したプロンプト:

futuristic cityscape, night, towering skyscrapers, neon lights, camera flying, city streets, bustling energy, vibrant colors, sleek high-tech sports car, racing, headlights cutting through darkness, camera tracking car, winding roads, engine roaring, power, excitement, dramatic pulse-pounding music, adrenaline, adventure


うまくいかない時は、いくつか要素を削って再度トライしてみよう。



映像のジャンルを知る

映画や動画のジャンルに応じて得意なシーンというのがある。これを参考に、作成したい映像の内容をより具体的に引き出し、効果的なプロンプトを作成するためのヒントになるだろう。

先ほど紹介したGPTsのナレッジには20個くらいのジャンルとそれぞれの象徴的なシーンを表すプロンプトが記載されている。


映画のジャンル例

  1. アクション:

    • シーン例: コンクリートの壁を拳で突き破るクローズアップショット、破片がスローモーションで飛び散る、主人公の決意に満ちた顔に日光が反射する。

    • プロンプト例: `close-up, fist punching through concrete wall, debris flying, slow motion, sunlight glinting, determined face, raw power, urgency`

  2. SF:

    • シーン例: 夜の未来的な都市景観を上空から撮影、飛行する車が高層ビルの間を行き交い、ネオンライトが輝く。

    • プロンプト例: `wide aerial shot, futuristic cityscape, night, flying vehicles, towering skyscrapers, neon lights, technological marvels`

  3. ファンタジー:

    • シーン例: 雲の中を飛ぶ壮大なドラゴン、その虹色の鱗が温かい金色の陽光に輝く。

    • プロンプト例: `majestic dragon, soaring through clouds, iridescent scales, glinting, warm golden sunlight, magic, adventure`

動画のジャンル例

  1. Vlog:

    • シーン例: 笑顔のエネルギッシュなYouTuberがカメラに手を振る、背景に賑やかな街並みが映る。

    • プロンプト例: `smiling energetic YouTuber, waving at camera, vibrant city street, bustling with life, warmth, connection`

  2. How-to:

    • シーン例: 熟練した手が特定の技術を巧みにデモンストレーション、整然と配置されたツールや材料。

    • プロンプト例: `skilled hands, demonstrating technique, tools and materials, clean well-lit surface, expertise, clarity`

  3. ミュージックビデオ:

    • シーン例: ネオンライトの中で熱唱する歌手、リズムに合わせて動き、ダイナミックなカメラと素早い編集。

    • プロンプト例: `singer, neon lights, passionately singing, moving to rhythm, dynamic camera, quick-cut editing, raw emotion, transformative power of music`




応用

一回に生成できる動画は5秒。
それを超える尺を擬似的に作成する方法。

あとは、逆再生を使うなど細々としたテクニックもあるので調べてみるとよいかと思う。


終わりに | なぜツール系の記事を書いたか

実は私は滅多にツール系の記事は書かない。書きたくないといったほうがいいか笑

今回は記事を書いたのは、近々大掛かりな生成AIワークショップがありそこにLumaを活用しようと企んでいたからである。


参考:


よかったらフォローお願いします。




いただいたサポートは、記事を書くモチベーションをあげるためのグミの購入に使わせていただきます!