0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

WindowsPC に 簡単プロンプトアニメ(EasyPromptAnime)をインストールしAI動画を作成する方法

Last updated at Posted at 2023-10-03

1. はじめに

今回は、自分自身への備忘録を兼ねて、WindowsPC に 簡単プロンプトアニメ(EasyPromptAnime)をインストールしAI動画を作成する方法を、お伝えしたいと思います。

2. この記事を読んでできること

  • WindowsPC に 簡単プロンプトアニメ(EasyPromptAnime) をインストールできるようになる
  • 簡単プロンプトアニメ(EasyPromptAnime) を使ってプロンプトからAI動画を作成できるようになる

3. 注意事項

  • 18歳以上であること

4. 前提条件

  • NVIDIA Geforce RTX VRAM 8BG 以上
  • Windows 10 以降(Update済み、管理者権限あり)の PC で、/Windows/System32 にパスが通っていること
  • Python 3.10.6 がインストールされていること
  • Git for Windows がインストールされていること
  • Civitai サイトがダウンしていないこと

5. 必要なもの

  • WindowsPC(この記事では Windows11 を利用)
  • グラフィックボード(NVIDIAの「GeForce RTX20」シリーズ以降、VRAM8GB以上)
  • HDD または SSD(十分なディスク容量があること)
  • インターネット環境(有線LAN推奨)
  • キーボード
  • マウス
  • HDMIディスプレイ

# 6. Setup-EasyPromptAnime.bat (セットアップバッチファイル)のダウンロード

image.png

# 7. セットアップバッチファイル(Setup-EasyPromptAnime.bat)の実行(所要時間:10分)

  • ダウンロードした Setup-EasyPromptAnime.bat バッチファイルをダブルクリックし、セットアップを開始する
  • 保護ウィンドウが表示されたら、「詳細情報」をクリック後「実行」ボタンをクリックする

image.png

image.png

image.png

  • 補足:およそ10分経過し、コマンドプロンプト待機の黒画面が表示されればセットアップは完了です、黒画面(DOSコマンドプロンプト画面)は閉じても大丈夫です

image.png

8. 簡単プロンプトアニメエディタ(OpenClabEditor.bat)の起動

  • セットアップバッチファイル(Setup-EasyPromptAnime.bat)の実行が完了すると、ブラウザに Google Colab 簡単プロンプトアニメエディタ が起動します
  • 別途手動で起動したい場合は、OpenClabEditor.bat バッチファルをダブルクリックし「簡単プロンプトアニメエディタ」を起動します

image.png

9. サンプルAI動画の作成(所要時間:15分)

  • sample/UpscaleGacha.bat バッチファイルをダブルクリックすると、12秒のサンプルAI動画が作成されます

image.png

image.png

  • サンプルAI動画の作成が完了すると、同一フォルダ内に.mp4拡張子のAI動画が出力されるので、動画再生してみましょう

image.png

10. プロンプトAI動画の設定

  • Google Colab 簡単プロンプトアニメエディタ 画面にて、左上にある1つ目の三角マークをクリックしコードを表示する
  • プロンプト説明を参考に、任意のプロンプトを指定する
  • 画面下の編集設定から、画面サイズ、モデルファイルを指定することも可能
  • カスタムモデルから、任意のモデルファイルを選択することも可能
プロンプトの説明
H:ヘッダープロンプト・・・変化しない固定プロンプト
F:フッタープロンプト・・・変化しない固定プロンプト
数字:フレームプロンプト・・・フレーム毎に変化するプロンプト

H:ヘッダープロンプト(例:秋葉原、人ごみ)
 0:立っている、怒る
10:手を振る、驚く
20:手を振る、笑う
F:フッタープロンプト(少女、メイド)

プロンプトの変更例
H: 1girl,universe

 0: upset
20: smile
100: surprised

F: astronaut,space suit

image.png

image.png

11. プロンプトAI動画の作成

  • 左にある2つ目の三角ボタンをクリックし、JSONファイルを 任意の作業フォルダ EasyPromptAnime\EPA_work\004 内にダウンロードします
  • 補足:先に左にある1つ目の三角ボタンをクリックしておかないと、JSONダウンロードが実行されない場合がるかもしれません

image.png

image.png

  • ダウンロードしたJSONファイルを、EasyPromptAnimeフォルダ内の Generate.bat バッチファイルへドラッグする
  • 技術補足:この操作で、バッチファイルにJSONファイルを第一引数として受け渡し、バッチファイルを実行します

image.png

  • うまくいけば、オリジナルのAI動画が完成します(所要時間:15分)

image.png

1007_0728_31-L30-C16-W448-H512-T1024.json
{
  "name": "1007_0728_31",
  "path": "models/sd/nadenadesitai_v10.safetensors",
  "motion_module": "models/motion-module/mm_sd_v15_v2.ckpt",
  "compile": false,
  "seed": [-1],
  "scheduler": "k_dpmpp_sde",
  "steps": 20,
  "guidance_scale": 8,
  "clip_skip": 2,
  "prompt_fixed_ratio": 0.2,
  "head_prompt": "crowds, akihabara",
  "prompt_map": {
    "0": "standing, upset",
    "10": "waving at viewer, surprised",
    "20": "waving at viewer, smile"
  },
  "tail_prompt": "1girl, maid outfit",
  "n_prompt": ["(worst quality, low quality:1.4)"],
  "lora_map": {

  },
  "upscale_config": {
    "scheduler": "k_dpmpp_sde",
    "steps": 15,
    "strength": 0.5,
    "upscale_guidance_scale": 8,
    "controlnet_tile": {
      "enable": true,
      "use_preprocessor": false,
      "controlnet_conditioning_scale": 1.0,
      "guess_mode": false,
      "control_guidance_start": 0.0,
      "control_guidance_end": 1.0
    }
  },
  "output": {
    "format": "mp4",
    "fps": 10,
    "encode_param": {
      "crf": 20
    }
  }
}

12. おわりに

いかがでしたでしょうか?WindowsPC に 簡単プロンプトアニメ(EasyPromptAnime)をインストールしAI動画を作成することができたのではないかと思います
今回の記事が、みなさまの学習の参考になれば幸いです

2023/10/03 TAKAHIRO NISHIZONO


13. 追記その1:動画や GIF アニメのフレームレートを倍増させる!「Flowframes」。

  • Flowframes
  • 簡単プロンプトアニメ(EasyPromptAnime)でAI動画を作成すると10フレーム(FPS)で作成されるため、フレーム数アップの手段として無理に.JSONファイル編集してフレーム数(FPS数)をアップする方法もあるかと思いますが、別ソフトのFlowframesを用いたほうが簡単にフレーム数アップでき動画変換時間もものの数秒で完成できておすすめです

14. 追記その2:LoRAを適用させた.JSONサンプル

1003_2011_33-L40-C16-W448-H512-T1024.json
{
  "name": "1003_2011_33",
  "path": "models/sd/meichidarkMix_meichidarkV45.safetensors",
  "motion_module": "models/motion-module/mm_sd_v15_v2.ckpt",
  "compile": false,
  "seed": [-1],
  "scheduler": "k_dpmpp_sde",
  "steps": 20,
  "guidance_scale": 8,
  "clip_skip": 2,
  "prompt_fixed_ratio": 0.2,
  "head_prompt": "Show from the hips to the shoulders,breasts, black shirt, cleavage, beautiful detailed skin, (cute:1.2), (black hair), ((jpop idol)), (upper thigh:0.6), (depth of field),soft light, Lens Glow,looking at viewer,(Drooping eyes:1.2),straight teeth,smile,floating hair, (blond hair:1.2),brown eyes",
  "prompt_map": {
    "0": "upset,(pitch black background:1.5),bouncing breasts,unaligned breasts,motion lines,motion blur",
    "10": "waving at viewer, surprised,(pitch black background:1.5),bouncing breasts,unaligned breasts,motion lines,motion blur",
    "20": "waving at viewer, smile,(pitch black background:1.5),bouncing breasts,unaligned breasts,motion lines,motion blur"
  },
  "tail_prompt": "movie scene, cinematic, full colors, 4k, 8k, 16k, RAW photo, masterpiece, professionally color graded, professional photography,cleavage,high school girl, hair up, consider,(sweat,sigh)1.2,(blush,open mouth)1.3,soft clean focus, realistic lighting and shading, (an extremely delicate and beautiful art)1.3, elegant,active angle,dynamism pose,(masterpiece), (best quality:1.0), (ultra highres:1.0), detailed illustration, detailed beautiful skin, (front focus), (in the dark:1.6), 1girl, solo, (gigantic_breasts:1.0), standing, black hair, (white leotard:1.2), looking at viewer, purple eyes, portrait, face focus, bow, blunt bangs, (makeup:1.2), sleeveless",
  "n_prompt": ["(worst quality:1.8),(nipple:1.2),nsfw, painting, sketches, (low quality, worst quality:1.5), deformed, bad anatomy, lowres, monochrome, grayscale, ugly face, half-open eyes, deformed eyes, long body, inaccurate limb, bad hands, mutated hands, mutated legs, missing fingers, extra fingers, extra arms, text, error, cropped, jpeg artifacts, signature, watermark, username, artist name, out of focus, make-up, (mascara), rouge, face paint, infant, toddler, large breasts, cleavage, chest open, multiple angles"],
  "lora_map": {"lora/BouncingBreastsV2.safetensors":0.8
  },
  "upscale_config": {
    "scheduler": "k_dpmpp_sde",
    "steps": 15,
    "strength": 0.5,
    "upscale_guidance_scale": 8,
    "controlnet_tile": {
      "enable": true,
      "use_preprocessor": false,
      "controlnet_conditioning_scale": 1.0,
      "guess_mode": false,
      "control_guidance_start": 0.0,
      "control_guidance_end": 1.0
    }
  },
  "output": {
    "format": "mp4",
    "fps": 10,
    "encode_param": {
      "crf": 20
    }
  }
}
0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?