![へたれ](https://fps.ww3.jp/wp-content/uploads/2021/05/マイビデオ11.gif)
お絵かきが下手だよぉ~
![ラビ](https://fps.ww3.jp/wp-content/uploads/2021/05/マイビデオ3.gif)
もはやAIで十分だぞ
時代はAIお絵かき
筆者はipadやPC版クリスタ・SAI・photoshopなどを使用してアニメ絵を描くのが好きだ。が画才はないので「うーん、微妙(笑)」とツイッターでも❤が数個しかつかないなんともツッコミどころのない絵しかかけないのが現状である。
しかし、昨今話題になっているAIにて「ビビっと来るエモいアニメ絵が描ける」という噂をきき使用したところ、マジで高クオリティなアニメ絵が出力できてビビった。
筆者がAIで出力したアニメ絵だ。「mahou shoujo」というキーワードで生成したら出てきた絵だが、あまりに高クオリティさに「もはやこれは俺がアニメ絵を描く必要ねーな・・・」と落胆した反面、顔はかなり崩れており「うーん、修正技術はいるなぁ」という感じで、修正してみた。
今後アニメ絵はこういった描き方が主流になっていくのは、もはや間違いないだろう。
ツイッターなどでは絵師がハバを効かせているが、これももはや時代の流れ。かつて電気が来たときにローソク売りが仕事を失ったように、絵師もなかなかつらい時代になっていくことはもはや間違いないだろう。
参考にしたサイト様
![](https://fps.ww3.jp/wp-content/uploads/cocoon-resources/blog-card-cache/5adfd0cfbc1143ee0255fc0cea601d75.jpeg)
Stable Diffusion
筆者はマイニングをやっていた関係上、グラボが大量に余っている(笑)
今回はGP66というRTX3080 LaptopGPUが搭載されている超ハイスペックノートパソコンで試していく。
ugging faceのアカウント作成
使用には ugging faceのアカウントが必要なので作成だ。
![](https://fps.ww3.jp/wp-content/uploads/cocoon-resources/blog-card-cache/e69efb74f14426eef16cd4b87c2d6af1.png)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-2-1024x422.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-4.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-5.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-6.jpg)
Access tokenの作成
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-9-1024x204.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-10-1024x546.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-8-1024x291.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-12-1024x324.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-7.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-13-1024x367.jpg)
メール認証されていないと、ここがクリックできないぞ
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-14.jpg)
pythonのインストール
次にPythonをインストールする
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-15-1024x346.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-20.jpg)
忘れたら、一度アンインストールしてもう一度インストールだ
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-18.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-19.jpg)
正常にインストールできたか確認する
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-21.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-22.jpg)
上記のように反応があれば正常だ
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-23.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-24.jpg)
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
上の文字を入力すればOKだ
これは一度行えばいい
NVIDIA最新ドライバ
次に最新のNVIDIAドライバーに対応させる
![](https://fps.ww3.jp/wp-content/uploads/cocoon-resources/blog-card-cache/4de38714942b0ab19332227fbcf8cdf2.jpg)
最新のドライバーをメーカーサイト上から選ぶか、
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-25.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-26-1024x220.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-27.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-29.jpg)
CUDA Toolkitインストール
![](https://fps.ww3.jp/wp-content/uploads/cocoon-resources/blog-card-cache/7ab44af368dbef457ca8fca10377ff37.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-28-1024x347.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-30.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-31.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-32.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-33.jpg)
途中、GPUを使用している別ソフトが動いている際にインストールが続行できないことがある。その場合は、そのソフトを終了してインストールしよう。
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-34.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-35.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-36.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-37-1024x572.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-38.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-39.jpg)
cuDNNインストール
![](https://fps.ww3.jp/wp-content/uploads/cocoon-resources/blog-card-cache/7ab44af368dbef457ca8fca10377ff37.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-40-1024x411.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-41.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-42.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-43.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-44.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-45.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-46.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-47.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-49.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-50.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-51-1024x579.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-52-1024x312.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-53-1024x316.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-54.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-55.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-56.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-61-1024x548.jpg)
OKを押したあとは再起動が必要かもしれない。
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-63.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-62.jpg)
きちんと場所が帰って来ればok
PyTorch
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-67.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-68.jpg)
Anacondaインストール
![](https://fps.ww3.jp/wp-content/uploads/cocoon-resources/blog-card-cache/ade0bd68cc9e80550d1cb0971edbaa7b.png)
ここを参考にしました
![](https://www.anaconda.com/wp-content/uploads/2023/11/Screenshot-2023-11-27-at-2.21.22-PM.png)
このページの下の方
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-71.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-72.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-73.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-74.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-75.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-76.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-77.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-78.jpg)
Anacondaの実行
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-79.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-80-1024x535.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-84.jpg)
を実行
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-86.jpg)
conda create -n pytorch python=3.7
実行
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-87.jpg)
conda activate pytorch
実行
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-85-1024x640.jpg)
PowerShellの実行
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-81.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-82.jpg)
を実行
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-69.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-70.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-64-1024x458.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-88.jpg)
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
を実行
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-90-1024x535.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-91.jpg)
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-92.jpg)
import torch
torch.cuda.is_available()
実行
trueになればGPUが認識!
でもワイの環境はなぜかfalse・・・なぜだ!
![](https://fps.ww3.jp/wp-content/uploads/2022/08/image-94-1024x221.jpg)
import torch
torch.cuda.is_available()
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained(“CompVis/stable-diffusion-v1-4″, revision=”fp16″, torch_dtype=torch.float16, use_auth_token=”トークン”)”
といれていこう
トークンは前でつくったやつをいれる
コメント