今回はAIで生成したイラストのキャラクターの手を修正したり、ポーズをしているできるControlNetの拡張機能、Depth map library and poserのインストール方法について解説します。
「せっかく気に入ったイラストが生成できたのに手の部分だけがおかしい!」ということはよくあるかと思います。そんな時に手の部分だけを修正することができますので、ぜひ活用してみてください。
また、当ブログのStable Diffusionに関する記事を以下のページでまとめていますので、あわせてご覧ください。

Stable Diffusionの導入方法から応用テクニックまでを動画を使って習得する方法についても以下のページで紹介しています。

Stable Diffusionとは
Stable Diffusion(ステーブル・ディフュージョン)は2022年8月に無償公開された描画AIです。ユーザーがテキストでキーワードを指定することで、それに応じた画像が自動生成される仕組みとなっています。
NVIDIAのGPUを搭載していれば、ユーザ自身でStable Diffusionをインストールし、ローカル環境で実行することも可能です。
(出典:wikipedia)
Stable DiffusionのWeb UI AUTOMATIC1111
AUTOMATIC1111はStable Diffusionをブラウザから利用するためのWebアプリケーションです。
AUTOMATIC1111を使用することで、プログラミングを一切必要とせずにStable Diffusionで画像生成を行うことが可能になります。
Web UI AUTOMATIC1111のインストール方法
Web UIであるAUTOMATIC1111を実行する環境は、ローカル環境(自宅のゲーミングPCなど)を使用するか、クラウドコンピューティングサービスを利用する2通りの方法があります。
以下の記事ではそれぞれの環境構築方法について詳し解説していますので、合わせてご覧ください。

Depth map library and poserとは
Depth map library and poserはControlNetの拡張機能として使える深度ライブラリです。
Lu:Na:ClockさんがTwitterで分かりやすく解説されています。
Depth map library and poserは、AIで生成したらイストのキャラクターの手を綺麗に修正したり、手のポーズを指定して生成することが可能になります。
以下がDepth map library and poserの公式リポジトリとなります。


Depth map library and poserのインストール
ここからは実際にDepth map library and poserをインストールする手順を解説します。
AUTOMATIC1111のWebUIを起動起動します。
UIが表示されたら、「Extensions」のタブをクリックします。

「Install from URL」のタブをクリックします。

「URL for extension’s git repository」の欄に以下のGitHubのアドレスを入力します。
https://github.com/jexom/sd-webui-depth-lib.git
入力したら「Install」をクリックします。

以下のインストール完了のメッセージが出たら正常に完了しています。

「Apply and restart UI」をクリックしてUIを再起動します。

もしインストール時にエラーが発生する場合は、以下のページでエラーの対策について解説にしていますので、参考にしてみてください。

動作確認
UIが再起動すると、「Depth Library」のタブが追加されていますのでクリックします。

以下のように手のモデルをが表示されていれば正常に動作しています。

Depth map library and poserイラストの手を修正する
今回インストールしたDepth map library and poserを使って、AIに描かせたイラストの失敗した手を修正することができます。手順は以下のページで解説しています。


Stable Diffusionのテクニックを効率よく学ぶには?

Stable Diffusionを使ってみたいけど、ネットで調べた情報を試してもうまくいかない…



そんな時は、操作方法の説明が動画で見られるUdemyがおすすめだよ!
動画学習プラットフォームUdemyでは、画像生成AIで高品質なイラストを生成する方法や、AIの内部で使われているアルゴリズムについて学べる講座が用意されています。
Udemyは講座単体で購入できるため安価で(セール時1500円くらいから購入できます)、PCが無くてもスマホでいつでもどこでも手軽に学習できます。
Stable Diffusionに特化して学ぶ
Stable Diffusionに特化し、クラウドコンピューティングサービスPaperspaceでの環境構築方法から、モデルのマージ方法、ControlNetを使った構図のコントロールなど、中級者以上のレベルを目指したい方に最適な講座です。


画像生成AIの仕組みを学ぶ
画像生成AIの仕組みについて学びたい方には、以下の講座がおすすめです。
画像生成AIで使用される変分オートエンコーダやGANのアーキテクチャを理解することで、よりクオリティの高いイラストを生成することができます。


まとめ
今回はControlNetの拡張機能であるDepth map library and poserのインストール方法を解説しました。Depth map library and poserを使って手を描画する方法は何種類かあるため、順次別の記事で解説していきたいと思います。
また、以下の記事で効率的にPythonのプログラミングスキルを学べるプログラミングスクールの選び方について解説しています。最近ではほとんどのスクールがオンラインで授業を受けられるようになり、仕事をしながらでも自宅で自分のペースで学習できるようになりました。
スキルアップや副業にぜひ活用してみてください。


スクールではなく、自分でPythonを習得したい方には、いつでもどこでも学べる動画学習プラットフォームのUdemyがおすすめです。
講座単位で購入できるため、スクールに比べ非常に安価(セール時1200円程度~)に学ぶことができます。私も受講しているおすすめの講座を以下の記事でまとめていますので、ぜひ参考にしてみてください。


それでは、また次の記事でお会いしましょう。






コメント