CyberRealistic V4.1

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: 925bd947d7, Model: CyberRealistic_V4.1_FP32, Version: v1.7.0

とりあえず子どものGaming PCでやっていたStable Diffusionの画像生成はできるようになりました。上の画像は前回の”29 years old beautiful female Japanese IT Professional”のプロンプトをCyberRealisticというモデルで処理してみたものです。悪くないけどやや目を強調しすぎ(プリクラの影響?)かな?512×512のイメージだと1枚1秒くらいで生成するので楽勝です。


すぐにバージョンが変わって情報が古くなるので、ちゃんとしたセットアップ・ガイドを提供するつもりはないんですが、いちおうやったことの概略をここにメモしておきます。

  1. Ubuntu 24.04.3 LTSをインストールする。英語でインストールしました。設定のほとんどはデフォルトのままですが、”Install third-party software for graphics and WiFi hardware and additional media formats”というのにはチェックを入れました。
  2. リブートして、ターミナルで nvidia-smi コマンドというのをたたいてやると、ドライバーのバージョンが出る。ここで、ぼくの場合、ディスプレイドライバーのバージョンが”535″、CUDAのバージョンが”12.2″と表示されました。きょう現在(2024-02-17) CUDAのバージョンが12.1以下じゃないと、パッケージ済みのPyTorch(これがStable DiffusionのUIとなるwebuiというやつを動かすのに必要)をインストールできないので、これをダウングレードしなければいけない。
  3. そんなわけで、ここのページに紹介されている手順でいったんインストールしたドライバーをアンインストールする。
  4. 先のステップの最後で ubuntu-drivers devices というコマンドでおすすめのドライバーのバージョンを表示させて、そのおすすめバージョンをインストールしろということになっているけど、それは無視して、”525″というバージョンをインストールする。つまり、
    sudo apt install libnvidia-common-525 libnvidia-gl-525 nvidia-driver-525 -y
  5. インストールが終了したら、リブートして、また nvidia-smi コマンドを打つ。ここで、ディスプレイドライバーのバージョンが”525″、CUDAのバージョンが”12.0″と表示されていればOK。
  6. つぎのステップの準備として西川和久さんが紹介されている方法でMinicondaをインストールしてPython 3.10.6のconda環境をつくってactivateしておく。
  7. Ubuntuにはデフォルトで git がインストールされないようなので、sudo apt install git でインストールする。
  8. ワークディレクトリをつくって、git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git でwebui のリポジトリをcloneする。
  9. なにかモデルがないといかんので、とりあえずStable Diffusion 2.1のベースモデル v2-1_512-nonema-pruned.safetensors というのをHugging Face からダウンロードして、webuiをcloneしたディレクトリの下のmodels/Stable-diffusionにmoveする。
  10. ここでwebuiをcloneしたディレクトリにあるwebui.shを動かしてやる ( ./webui.sh )と必要なライブラリ(PyTorchとか)をダウンロードして、webuiが立ち上がる(はず)。うまく行ったら、
    Calculating sha256 for /home/tami/git/AUTOMATIC1111/stable-diffusion-webui/models/Stable-diffusion/v2-1_512-nonema-pruned.safetensors: Running on local URL: http://127.0.0.1:7860
    というようなメッセージが出る。
  11. で、ブラウザで http://127.0.0.1:7860 を開けたら Stable Diffusionがつかえるようになっているはず。
  12. このままでも動くんですが、Cannot find TCMalloc (improves CPU memory usage) というメッセージが赤色で表示されてちょっと気になるので、しらべてみたら、 sudo apt-get install google-perftools でメッセージが消えるみたいです。
  13. あと前にWSLで動かしたときに見たページにあったシェルスクリプトをStable Diffusion立ち上げ用に作っておくと便利です。こんな感じ:
#!/bin/bash

# Function to handle cleanup actions
cleanup() {
    # Perform cleanup actions here
    echo "Performing cleanup..."
    # Remove files named tmp*.png in /tmp folder
    rm -f /tmp/tmp*.png
    # Remove files named tmp*.jpg in /tmp folder
    rm -f /tmp/tmp*.jpg
    # Remove gradio folder if it exists
    rm -rf /tmp/gradio
    # Remove tmp* folders within /tmp directory
    rm -rf /tmp/tmp*
}

# Trap SIGINT signal (Ctrl+C) and call cleanup function
trap cleanup SIGINT

# Change directory
cd /home/tami/git/AUTOMATIC1111/stable-diffusion-webui 

# Run webui.sh script
./webui.sh

# Cleanup actions after Python script termination
cleanup

以上です。インストールをやり直したりしてちゃんとこの手順だけでインストールできるかどうか確認してないので、必要なステップが抜けてたらすみません。


Seedを固定していくつか他のモデルも試してみたので載せておきます。個人的にはRealisticVisionが好きですが、けっこうベースモデルもいいのではないかとおもいます。あんまり美人・美少女に特化しちゃうとリアリティが失われてしまう、ということかな。


Stable Diffusion 2.1ベースモデル

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: fc4f9fe752, Model: v2-1_512-nonema-pruned, Version: v1.7.0

BeautifulRealistic

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: 1a17bcd93d, Model: beautifulRealistic_v7, Version: v1.7.0

majicmixRealistic

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: 33c9f6dfcb, Model: majicmixRealistic_v5, Version: v1.7.0

RealisticVision (前回のやつ)

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: 00445494c8, Model: Realistic_Vision_V5.1, Version: v1.7.0

Agelesnate (これも前回のやつ)

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: 870d7132aa, Model: agelesnate_v3, Version: v1.7.0

MeinaMix

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: eac6c08a19, Model: Meina V9 – baked VAE, Version: v1.7.0

Stable Diffusion 2.0ベースモデル

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: ab800444cd, Model: 512-base-ema, Version: v1.7.0

AbsoluteReality

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: 463d6a9fe8, Model: absolutereality_v181, Version: v1.7.0

epiCRealism

29 years old beautiful female Japanese IT Professional in a plain beige oversized T shirt with light brown short choppy hair at a coffee shop, high quality, pink tiny lips, small nose, full body, holding a cup, along counter, dim light, thin arms, looking straight, sister
Negative prompt: low quality, big breast
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1757170746, Size: 512×512, Model hash: 84d76a0328, Model: epicrealism_naturalSinRC1VAE, Version: v1.7.0

3 thoughts on “CyberRealistic V4.1

  1. 久しぶりに訪問したら、「beautiful female Japanese」の写真がいっぱいありびっくりです。
    beautifulの部分を変えたら、なにか変わるのでしょうか?
    最近10年ぐらい使っているWindows7が不調(たまにOperating System not foundでBOOTしない)で、新しいPCでも買おうかと思案中です。
    最近はほとんどの事務作業は2万円ぐらいで買ったHPのChrome Bookで済むので、Windowsの必要性は感じないのですが...

    Like

    1. プロンプトよりもシード(乱数生成のシードだとおもいます)の値でぜんぜん違う絵が出るのですが、シードを一定にすると、たぶん各モデルが使っているベースモデルが同じみたいなので、似たような絵が出て、それでも微妙に違うのがおもしろいです。

      最近はオンラインで画像生成もできるようですが、いろいろ制限があるようなので、自前のゲーミングPCで画像生成AIを動かすのは自由な気分がしていいですよ。

      Like

      1. AI生成の人物絵もだんだん本物と見分けがつかなくなりますね。

        今晩のドラマ「相棒」は、右京さんがFAKE動画を流されてしまうというお題です。

        WIN7は、2TBのSSDが¥12Kで手に入ったので、2016年のIMAGE BACKUPから復元してみました。

        Like

Leave a comment