話題のお絵かき画像生成AI『Stable Diffusion』の体験・インストール方法・プロンプトのコツ・関連情報のまとめ覚書(Win/Mac/Colab)

画像はイメージです

はじめに

Stable Diffusionの一般公開により、楽しく遊ばせていただいています。
公開以降、多くのフォーク(ブランチ)が公開され、手元の関連情報のブックマークが溢れてしまいそうですので、備忘録+自分用のブックマークメモとしてリストアップします。
詳しい導入方法はレポジトリに記載されているREADMEをご参照ください。
備忘録として記載しているため最新情報ではない場合もあります。
ローカル環境にインストールされる際は自己責任で、悪意あるコードが含まれる場合もありますのでくれぐれもご注意ください。

まず読んで欲しい記事

DIAMOND SIGNAL

【CEO直撃】THE GUILD深津氏が画像生成AI「Stable Diffusion」開発元に聞く、AIビジネスの“新時代” | DIAMOND SIGNAL

8月に突如登場し、瞬く間にネットユーザーの注目の的となった画像生成AIの「Stable Diffusion」。開発元である英国のスタートアップ・Stability AIのCEOであるエマード・モスターク氏が、初めて日本のメディアのインタビューに応じた。Stable Diffusionが与えるインパクトや事業としての展開、そしてStability AIの掲げる「AIの民主化」などについて聞いた。…

signal.diamond.jp

Stable Diffusionを体験してみる

Memeplex

  • まずはWEBでStable Diffusionが体験できるMemeplexで画像を生成してみるのがオススメ
  • 日本語で生成が可能
  • 有志で運営されているサービスなので常識の範囲内で連投などはせず負荷のかからないように暖かい心で
undefined

Memeplex.app

誰でも無料で、日本語で使えるAI作画サービス…

memeplex.app

LINEで体験

  • LINEで友だち追加をし、文章を送ると画像生成をしてくれるbotサービス

iPhoneで体験『AIピカソ』

StableDiffusion API『compute(r)ender』

ローカルPCにStable Diffusion導入

メインリポジトリ(CompVis)

  • 本家のGit
  • README.mdにて概要・規約等を把握

モデルの入手

  • モデルのダウンロードにはアカウント登録・規約への承諾が必要
huggingface(CompVis/stable-diffusion)
undefined

CompVis/stable-diffusion · Hugging Face

We’re on a journey to advance and democratize artificial intelligence through open source and open science.…

huggingface.co

2次元が得意なモデル(trinart_stable_diffusion_epoch3)
undefined

naclbit/trinart_stable_diffusion · Hugging Face

We’re on a journey to advance and democratize artificial intelligence through open source and open science.…

huggingface.co

2次元が得意なモデル(trinart_stable_diffusion_v2)
undefined

naclbit/trinart_stable_diffusion_v2 · Hugging Face

We’re on a journey to advance and democratize artificial intelligence through open source and open science.…

huggingface.co

2次元が得意なモデル(waifu-diffusion)
undefined

hakurei/waifu-diffusion · Hugging Face

We’re on a journey to advance and democratize artificial intelligence through open source and open science.…

huggingface.co

モデルをマージできるPythonスクリプト
  • waifuモデルとtrinartモデルを指定したパーセントでマージができるスクリプト

メモリサイズのスペックが低くても動くフォーク

  • VRAMが不足している環境などでも動くフォーク
Optimized Stable Diffusion(basujindal)

多機能フォーク(AUTOMATIC1111)

  • txt2img・img2img動作
  • Outpainting 外塗りを追加できる
  • Inpainting 塗り潰して補正
  • X/Y plot 表状に画像を生成し見比べができる
AUTOMATIC1111のDocker対応(AbdBarho)

Windowsに比較的簡単にインストールできる

NMKD Stable Diffusion GUI
  • 詳しいインストール方法はgigazine.netを参照するのがオススメ

M1 Macで動作するフォーク(magnusviri/lstein)

lstein
  • M1・M2のGPU(MPS)でも動作するようにフォークされている
  • README-Mac-MPS.mdを参照しインストール
  • セットアップに関するスレッド
AUTOMATIC1111
Birch-san
M1 Mac(Intel Mac)にワンクリックでインストール可能(DiffusionBee)

Diffusion Bee is the easiest way to run Stable Diffusion locally on your M1 Mac. Comes with a one-click installer. No dependencies or technical knowledge needed.

CPUで動作するフォーク(darkhemic)

darkhemic

a fork that installs runs on pytorch cpu-only

プロンプトをバッチ化できるフォーク

lowfuel(M1 Macも動作)
  • 大量に画像を生成したい人向けのフォーク
  • “A <castle|inn|mansion|shop> in New York”のように<>に指定したワードをバッチ処理しながら生成できる
  • Macユーザー向けにmac-environment.yamlもあり

Stable Diffusion with some Proggy Enhancements

元絵から似た画像を生成するフォーク(justinpinkney)

justinpinkney
  • インプットした画像を元にバリエーションを生成してくれる
  • HuggingfaceColabでも試せる

長いプロンプト入力に対応したフォーク(sharonzhou)

Long-form text-to-images generation, using a pipeline of deep generative models (GPT-3 and Stable Diffusion)

異なるプロンプトを『Compositional Diffusion Models』で構成するフォーク(Slickytail)

日本語に対応(rinnakk)

Japanese Stable Diffusion is a Japanese specific latent text-to-image diffusion model capable of generating photo-realistic images given any text input.

Windows,macOS,Linux全対応のGUI

Google Colab上で動作

ローカルに環境を構築する前に、Google Colab上で動作を体験してみるのがオススメ

日本語の丁寧な解説がある(fladdict)

Stable Diffusion Helper
  • まずこのipynbを使用してみるのがオススメ
  • 必ず注意事項を一読の上使用する
  • fladdictさんが公開して下さった日本語解説ありのipynb
  • タイル状に画像が生成する機能があり、テクスチャーやマテリアル生成目的の人に最適

多機能+WEB UIで動作する(AUTOMATIC1111)

  • txt2img・img2img動作
  • Outpainting 外塗りを追加できる
  • Inpainting 塗り潰して補正
  • X/Y plot 表状に画像を生成し見比べができる

プロンプトを日本語で指示できる(StableDiffusionGenerator)

アニメ特化でチューニングしたWaifu Diffusion(harubaru)

  • Danbooru(アニメ画などが多い)掲示板でチューニングしたフォーク

stable diffusion finetuned on danbooru

生成した画像から動画を作成(Deforum)

プロンプト・画像生成のキーワードのコツなど

プロンプトをキーワードから探せる

Lexica
Lexica

Lexica

The Stable Diffusion prompt search engine…

lexica.art

KERA
undefined

KREA — create better prompts.

Explore millions of AI generated images and create collections of prompts.…

www.krea.ai

AIが英語のプロンプトの生成を助けてくれる『Catchy』

見本画像を見ながらプロンプトの生成を助けてくれる

Prompts search
undefined

Phraser — a better way to generate prompts

AI-powered service that helps you to write better prompts for DALLE 2, Midjourney, Craiyon, Stable Diffusion, and other neural networks…

phraser.tech

Prompt Builder
undefined

promptoMANIA:: prompt builder

A human friendly prompt builder for AI visual art generators like Midjourney, Stable Diffusion, DALL-E 2 or any other diffusion model.…

promptomania.com

Stable Diffusion Prompt Builder
undefined

promptoMANIA:: Stable Diffusion prompt builder

Start using the best prompt builder for Stable Diffusion – it’s free and easy to use.…

promptomania.com

Phase

Phase

Create the perfect prompt…

画像からプロンプトを生成してくれる『img2prompt』

methexis-inc/img2prompt – Run with an API on Replicate

Get an approximate text prompt, with style, matching an image. (Optimized for stable-diffusion (clip ViT-L/14))…

モデルのデータ元からプロンプトを推測

laion-aesthetic-6pls
Clip front
Have I Been Trained?
danbooruのタグランキング

Tags | Danbooru

Search thousands of tags on Danbooru.…

プロンプトに関するチュートリアル記事

総合記事
2次元系
写真系

Quest for ultimate photorealism : StableDiffusion

166 votes, 56 comments. Hi guys, I think i could define myself as an advance hobby photographer, but on the other side I am also an actuary and ……

ファインチューニング(Textual Inversion)

reddit

[Tutorial] “Fine Tuning” Stable Diffusion using only 5 Images Using Textual Inversion. : StableDiffusion

170 votes, 113 comments. Hello everyone! I see img2img getting a lot of attention, and deservedly so, but textual_inversion is an amazing way to ……

www.reddit.com

rinongal

Google Colabで学習

nicolai256
  • README.md中程のcolab notebook for training if your gpu is not good enough to train. (free colab version works)からGoogle Colabに遷移
Hugging Face

学習済みデータのサンプルライブラリ

undefined

sd-concepts-library (Stable Diffusion concepts library)

We’re on a journey to advance and democratize artificial intelligence through open source and open science.…

huggingface.co

ファインチューニング(Stable Diffusion Dreambooth)

Stable Diffusion Dreambooth Concepts Library

undefined

sd-dreambooth-library (Stable Diffusion Dreambooth Concepts Library)

We’re on a journey to advance and democratize artificial intelligence through open source and open science.…

huggingface.co

[記事公開日]
[最終更新日]