Stable Diffusion / リアリティのあるモデル

AI画像で使用できるモデルを調べてみました
モデルMeichidark_Mix
NeverEnding Dream (NED)
majicMIX realistic
Stable Diffusion / 参考になるプロンプトを調べる方法

Stable Diffusionで使えるプロンプト、ネガティブプロンプトは他の人が作った画像のプロンプトを見るとわかります
CivitaiCivitaiはモデルデータだけでなく画像データも大量にアップロードされています。そ ...
Stable Diffusion (Diffusers) / DiffusersでLoRA の読み込みの高速化、LoRA 融合

ダウンロードしたA1111 形式の CivitAI LoRA チェックポイントをロードできるようになりましたが高速化も対応されました
pipe.load_lora_weights(state_dict ...バッチ処理で複数のOpenPose、DWposeを作成する

今回はダウンロードしたモデルデータを使用できるように対応しました
コード# -*- coding: utf-8 -*-import requestsfrom PIL import Imagefrom io import Byte ...DW OpenPose[DWpose](棒人間)を作成する

DWposeはOpenpose fullより詳細に顔や指を表現できる全身用プリプロセッサです
DWposeControlNet auxiliary modelsを使って作成します
pip install contro ...Stable Diffusion (Diffusers) / DiffusersでVAE,Lora,textual_inversion,を使用する

Stable Diffusion (Diffusers) / Diffusersで77トークンを超えるプロンプトを使用する

通常では77トークンを超えるプロンプトを使用すると切り捨てされてしまいます。それを回避する方法を説明します
The following part of your input was truncated because CL ...
Stable Diffusion (Diffusers) / DiffusersでcontrolnetをCPUだけで動かす

GPU固定でプログラムをされているとCPUでは動きません
/usr/local/lib/python3.10/dist-packages/torch/cuda/init.py in _lazy_init()
245 ...
Stable Diffusion で作ったpng画像のpng画像のプロンプトをWindowsパソコンのアプリで表示する

png画像にはメタ情報があり呪文がそこに書かれています。それを見ることができるWindowsユーティリティーを紹介します。
TweakPNGtEXt パラメーターのところを見ますTweakPNG は、PNG 画像ファイルを ...
OpenPose(棒人間)を作成したり入手する

Stable DiffusionのControlNetで使えるOpenPose画像をあらかじめ用意することを考えます
controlnet_auxannotator
Pythonを使用します。モデルは自動的にダ ...