メインコンテンツへスキップ
見出し画像

【画像生成AI】CharTurnerLoRAとControlNetを併用してキャラシートを安定して出力させる方法

    ローカル環境を作ったときに使ってみたかった機能にCharTurnerLoRA(同一キャラを複数視点で出力するLoRA)があったので早速使ってみたものの、出力が安定していなかったのでControlNetを併用する方法を考えてみた。
    さらにランダム要素を加えてキャラクターデザインをいろいろさせてみよう計画に成功したのでnoteにまとめてみる。

    下準備:CharTurnerとControlNetとwildcardsを用意する

    拡張機能の準備

    基本設定

    モデルなどはお好みで! 自分はプロンプトの効き具合などから今回は
    7th anime v3 Bを使用

    出力サイズ
    ControlNetのサイズに合わせて1024 * 512で生成して好みのアップスケーラーを使用を推奨。
    キャラデザの回数をこなしたいならアップスケーラーなしでもOK
    サイズ以外の設定はお好みでどうぞ!

    画像

    wildcards

    __yo__:年齢
    __color__:色
    __hair__:髪
    __oppai__:胸サイズ
    __skirt__:スカートサイズ

    お好みで! promptの該当部分は普通に指定でもOK!
    今回は最終的にはランダムでいろんなキャラを出力したいのでwildcardsを使用してます。

    Negative prompt:

    Negative prompt:
    (EasyNegative:0.6),(bad_prompt:0.8),(worst quality, low quality:1.4),bad anatomy,

    CharTurnerを試してみる

    prompt:
    (masterpiece, best quality: 1.2), detailed face, detailed eye, 1girl,__yo__, A photographic style character turnaround of a an girl, __color__ hair, __hair__, __color__ eyes, __oppai__,(__color__ dress:1.2),(__skirt__:1.2),(white background:1.3),Multiple views of the same character in the same outfit, <lora:mw_charturn3:0.3>

    服の指定はお好みで!
    スカートの長さを指定しているのは複数構図のスカートの長さを一致させたいので気持ち指定してます。

    画像
    画像

    これはこれで良いけど、CharTurnerだけではキャラシートに統一感はないことがわかる。

    ControlNetのopenposeを試してみる

    poseのデータは
    https://twitter.com/DiffusionPics/status/1627990713546813443?s=20
    こちらのデータを使わせていただきました。

    画像
    画像

    prompt:
    (masterpiece, best quality: 1.2), detailed face, detailed eye, 1girl,__yolow__, __color__ hair, __hair__, __color__ eyes, __oppailow__,(__color__ dress:1.2),(__skirt__:1.2),(white background:1.3),

    さっそく出力してみる!

    画像
    画像

    ……別にこれだけでも十分な気はする?
    ControlNet強し!!!
    けどまあ背景に変なものが入りやすいかも? モデル依存?

    CharTurnerとopenposeを併用する

    prompt:
    (masterpiece, best quality: 1.2), detailed face, detailed eye, 1girl,__yo__, A photographic style character turnaround of a an girl, __color__ hair, __hair__, __color__ eyes, __oppai__,(__color__ dress:1.2),(__skirt__:1.2),(white background:1.3),Multiple views of the same character in the same outfit, <lora:mw_charturn3:0.3>

    画像
    画像

    これで比較的安定して出力できるように!
    あとはお好みでクォリティタグ付けたり服装指定をしてみたりでどうぞ!

    画像
    画像
    画像
    画像

    あなたへのおすすめ