SamSuka
海賊ラビィ
海賊ラビィ

fanbox


【検証】オリキャラ男の娘NSFW画像生成(LoRA作成)

# 1.はじめに

 この記事では、オリキャラ男の娘画像生成用のLoRAモデルを作成し、そこからキャラクター一貫性のある形でのNSFW画像を生成するアプローチを検証していきます。

 画像生成AIにおいて、オリキャラ画像を一貫性のある形で複数生成するのは、一つの鬼門です。Controlnetの「Reference Only」又は「IP Adapter」等でサンプル画像を参照してもらいながら生成するアプローチもありますが、私的には画像がノイジーになりがちな印象でピンと来ていません。

 その為、動画生成AIを利用するアプローチを試してみます。動画は、複数画像から構成されるものであり、それを分解すれば画像セットとなり得ます。

 そのアプローチは、具体的には次のものです。


```

① キャラクターの立ち絵を画像生成AI(Illustrious系等ターゲットの画像生成モデル)で生成します。※要画像生成用プロンプト

https://civitai.com/models/376130?modelVersionId=1738204

② ①の画像を素材として、動画生成AI(lllyasviel/FramePack等)で対象キャラクターの360度水平回転モーションを生成します。※要動画生成用プロンプト

https://github.com/lllyasviel/FramePack

③ ②の各フレームをFFmpegで画像出力(png形式)します。※要コマンド

https://www.ffmpeg.org/

④ ③の各フレームを高解像度化(ControlNet 852_a_clone_xlを用いてのimg2img。サイズ:2048px × 2048px)します。

https://civitai.com/models/463436?modelVersionId=515749

⑤ 高解像度化により細部まで描写された各画像を、Stable Diffusion Web UIのExtra機能で、SDXL標準サイズ(サイズ:1024px × 1024px)にします。

https://github.com/AUTOMATIC1111/stable-diffusion-webui

⑥ ⑤の画像を教師画像(LoRAモデルとしてキャラクターデザインを画像生成AIに覚えて貰う為のサンプル画像)として選抜します。(一例として100枚程度を想定。正面からの全身画像を多めにする。ただ、他のアングルのものや上半身フォーカスのものも一部含める)

⑦ ⑥の各画像ごとにwd14-taggerでタグをまとめたテキストファイルを用意します。この際、各タグファイルにトリガーワードを配置する為のオプション「Additional tags」も使用しています。(トリガーワードはオリジナルなものにします。例:aaa1)

https://github.com/toriato/stable-diffusion-webui-wd14-tagger

⑧ toshiaki1729/stable-diffusion-webui-dataset-tag-editorで、⑦のタグファイルから対象キャラクターのキャラ属性を表すタグを"除外"します。※このタグファイルには、指定のキャラクターを表すトリガーワードと、そのキャラクターのキャラ属性以外のタグを含めます。例えば「aaa1, 1boy, closed eyes, heart」のようになります。この例だとaaa1にキャラ属性を集約する意図です。

https://github.com/toshiaki1729/stable-diffusion-webui-dataset-tag-editor

⑨ bmaltais/kohya_ssで、 ⑥の画像と⑧のタグファイルを基にLoRAモデルを作成します。

https://github.com/bmaltais/kohya_ss

```


 ちなみに、LLM(例:Gemini)で、上の文章の各手順をstep-by-step詳細解説させる事も可能です。(ハルシネーションの発生リスクはあります)

 また、それ以降のチャットでQAもできるようです。(同じくハルシネーションの発生リスクはあります)

 その為、それで解決できるようなら、以下の記事を読む必要性はそこまでありません。


 この記事では、上の各手順について、ポイントを絞って解説していきます。


# 2.前提条件

【画像生成用モデル】

■Nova Anime XL - IL v7.0 [by Crody]

https://civitai.com/models/376130?modelVersionId=1738204

civitai.com
https://civitai.com/models/376130?modelVersionId=1738204


【画像アップスケール用ControlNetモデル】

■ControlNet 852_a_clone_xl [by hakoniwa]

https://civitai.com/models/463436/controlnet-852aclonexl

civitai.com
https://civitai.com/models/463436/controlnet-852aclonexl


【動画生成用ツール】

■Zuntan03/EasyWanVideo

https://github.com/Zuntan03/EasyWanVideo

(frame embed)



# 3.生成例


 ※ポーチ(pouch)をプロンプトに含めない。また、ミニハット(mini hat)はオレンジ色になるように調整している。


## 01:前後

```

1boy, solo, otoko no ko, multiple views, front and back,

comic, 2koma, crossdressing,

skirt lift, lifting own clothes,

spoken blush,

bulge, testicles, white panties, bow panties,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

red bow, red bowtie, orange dress, white gloves, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 02:ローアングル

```

1boy, solo, otoko no ko,

from below,

panty pull, white panties, bow panties,

flaccid,

spoken squiggle,

blush,

small penis, testicles, foreskin,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(mini hat:0.5), red bow, red bowtie, orange dress, white gloves, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 03:ハイアングル(2人、POV)

```

2boys, otoko no ko, male focus,

pov hands, face, close-up,

finger in another's mouth, drooling, kneeling,

blush,

interracial, dark-skinned male,

clothed female nude male,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(mini hat:0.5), red bow, red bowtie, orange dress, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 04:ハイアングル(2人、POV)

```

2boys, otoko no ko,

pov hands, face, close-up,

oral, imminent fellatio, drooling, kneeling, hand on another's head,

blush, open mouth, spoken question mark,

huge penis, testicles, veiny penis,

interracial, dark-skinned male,

clothed female nude male,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(mini hat:0.5), red bow, red bowtie, orange dress, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 05:ハイアングル(2人、POV)

```

2boys, otoko no ko,

pov hands, face, close-up,

oral, fellatio, cheek bulge, drooling, kneeling, head grab,

blush, tears, wince, open mouth, spoken exclamation mark, motion lines, speed lines, sound effects,

huge penis, testicles, veiny penis,

interracial, dark-skinned male,

clothed female nude male,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(mini hat:0.5), red bow, red bowtie, orange dress, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

faceless male,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 06:ハイアングル(2人、POV)

```

2boys, otoko no ko,

pov hands, face, close-up,

oral, after fellatio, kneeling, tongue out,

cum on tongue, cumdrip, cum string,

wince, one eye closed, tears, blush, open mouth, heavy breathing, sound effects,

huge penis, testicles, veiny penis,

interracial, dark-skinned male,

clothed female nude male,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

red bow, red bowtie, orange dress, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

faceless male,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 07:背面

```

1boy, solo, otoko no ko,

from above, from behind,

top-down bottom-up, spread anus, spoken sweatdrop, trembling,

blush, embarrassed, wince,

small penis, testicles, tucked penis, anus,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

red bow, red bowtie, orange dress, white gloves, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 08:背面(2人、POV)

```

2boys, otoko no ko,

from behind, pov hands,

anal fingering, top-down bottom-up,

anal fluid,

tucked penis, ass,

blush, closed eyes, trembling,

penis size difference,

small penis, testicles,

huge penis,

interracial, dark-skinned male,

clothed female nude male,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(mini hat:0.5), red bow, red bowtie, orange dress, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

faceless male,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 09:下半身フォーカス

```

2boys, otoko no ko,

pov, from above, lower body, ass focus, close-up, head out of frame, out of frame,

imminent anal, doggystyle, top-down bottom-up, penis on ass, penis grab, grabbing another's ass,

tucked penis, ass, perineum,

trembling,

penis size difference,

small penis, testicles,

huge penis, veiny penis,

interracial, dark-skinned male,

clothed female nude male,

orange dress, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

faceless male, muscular male,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 10:サイドビュー(2人)

```

2boys, otoko no ko,

three quarter view,

implied yaoi, doggystyle, all fours, grabbing another's ass,

precum,

screaming, tears, speech bubble,

huge penis, testicles,

interracial, dark-skinned male,

clothed female nude male,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(mini hat:0.5), red bow, red bowtie, orange dress, white gloves, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

faceless male, muscular male,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 11:サイドビュー(2人)

```

2boys, yaoi, otoko no ko,

three quarter view,

anal, doggystyle, sex from behind, leaning back, kneeling, holding another's wrist,

precum,

fucked silly, screaming, tears, speech bubble, motion lines, motion blur, trembling, sound effects,

penis size difference,

small penis, testicles,

huge penis,

interracial, dark-skinned male,

clothed female nude male,

height difference,

giant, petite,

age difference,

mature male, <年齢タグL>,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(mini hat:0.5), red bow, red bowtie, orange dress, white gloves, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

faceless male, muscular male,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 12:正面(2人)

```

2boys, yaoi, otoko no ko,

straight-on,

anal, reverse suspended congress, full nelson, standing sex, spread legs,

anal fluid, precum,

fucked silly, screaming, tears, speech bubble, speed lines, motion blur, trembling, sound effects,

penis size difference,

small penis, testicles,

huge penis,

height difference,

giant, petite,

age difference,

mature male, <年齢タグL>,

interracial, dark-skinned male,

clothed female nude male,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

orange hat, (mini hat:0.5), red bow, red bowtie, orange dress, white gloves, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

faceless male, muscular male,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 13:ローアングル(2人)

```

2boys, yaoi, otoko no ko,

from below, ass focus,

anal, reverse suspended congress, full nelson, standing sex, spread legs,

perineum,

cum in ass, handsfree ejaculation, cum overflow, excessive cum,

ahegao, screaming, tears, spoken exclamation mark, motion lines, motion blur, trembling, sound effects,

penis size difference,

small penis, testicles,

huge penis,

height difference,

giant, petite,

age difference,

mature male, <年齢タグL>,

interracial, dark-skinned male,

clothed female nude male,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

orange hat, (mini hat:0.5), red bow, red bowtie, orange dress, white gloves, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

faceless male, muscular male,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


## 14:上下逆転

```

1boy, solo, otoko no ko,

from above, upside-down,

after anal, top-down bottom-up, spoken heart,

gaping, anal, perineum,

cum in ass, handsfree ejaculation, cumdrip,

blush, tears, heavy breathing, open mouth, sweat, trembling,

small penis, testicles, tucked penis, anus,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

orange hat, (mini hat:0.5), red bow, red bowtie, orange dress, white gloves, frilled skirt, socks, kneehighs, white legwear, boots, orange footwear,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```


# 4.解説


## ① キャラクターの立ち絵を画像生成AI(Illustrious系等ターゲットの画像生成モデル)で生成します。※要画像生成用プロンプト

https://civitai.com/models/376130?modelVersionId=1738204

```

1boy, solo, otoko no ko, androgynous, crossdressing,

2koma, comic, front and back, tachi-e, full body,

standing,

magical boy, <年齢タグL>, cosplay,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

frills, red bow, red bowtie, white gloves, frilled skirt, socks, kneehighs, white legwear, boots, pink footwear,

grey background, simple background

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```

 ※上の画像は前後のものですが、正面のみで構いません。


 この時、キャラクターの立ち絵画像をランダムに生成する事で、キャラデザを探ります。


 キャラクターの立ち絵画像の生成でポイントになるDanbooruタグは、次のものです。

```

solo

←1人のみ

tachi-e

←立ち絵

full body

←全身

straight-on

←正面

white background

←白色の背景

grey background

←灰色の背景

simple background

←シンプルな背景

```


 これにキャラ属性用のタグを追加していきますが、ベースとなるタグは次のものです。

```

otoko no ko

←男の娘

```


 好みで次のようなタグも含めていきます。

```

androgynous

←中性的

bishounen

←美少年

crossdressing

←女装

<年齢タグL>

←□'/

<年齢タグS>

←=/₃夕

male focus

←男性をフォーカス ※パス度下げ効果がある印象

```


 更にキャラの方向性を決める為のタグ(例:magical boy)を含ませる事もできます。

 そのタグのアイデアを得る方法として、プロンプト自体をランダムに生成するアプローチもあります。


■KohakuBlueleaf/z-tipo-extension: A sd-webui extension for utilizing DanTagGen to "upsample prompts".

https://github.com/KohakuBlueleaf/z-tipo-extension?tab=readme-ov-file

(frame embed)



 なお、この画像は全年齢対象にした方が良いです。

 次の手順で、この画像を基にLLMサービス(例:ChatGPT)で動画生成用プロンプト自体を生成しています。



## ② ①の画像を素材として、動画生成AI(lllyasviel/FramePack等)で対象キャラクターの360度水平回転モーションを生成します。※要動画生成用プロンプト

https://github.com/lllyasviel/FramePack

250505_085347_681_4684_batch1_64

```

a 360-degree horizontal rotation animation of the character standing in place. The character should maintain a natural standing pose and rotate slowly in a clockwise direction. Ensure the entire body remains visible within the frame, and all angles (front, side, and back) are clearly shown.

The character’s outfit includes:

A bright orange, idol-style dress

A frilled yellow and white skirt

A red bow on the chest

A pink heart-shaped accessory on the waist

White gloves and orange boots

A small pink top hat

A large red bow on the back

```

○和訳

キャラクターがその場に立ったまま360度水平回転するアニメーション。キャラクターは自然な立ちポーズを保ち、時計回りにゆっくりと回転するようにします。フレーム内で全身が見えるようにし、すべてのアングル(前、横、後ろ)がはっきりと映るようにしてください。

キャラクターの衣装は以下の通り:

鮮やかなオレンジ色のアイドル風ドレス

黄色と白のフリルスカート

胸元の赤いリボン

腰のピンクのハート型アクセサリー

白い手袋とオレンジのブーツ

小さなピンクのトップハット

背中に大きな赤いリボン


250505_093637_525_6713_batch1_46

```

a close-up animation of the character, focusing on the upper body (chest up). The character should maintain a neutral standing pose, without changing expression or movement. The camera should gently pan from left to right and back, or zoom slightly in/out to create subtle motion while keeping the character’s face and costume details clearly visible.

The character’s outfit includes:

A bright orange, idol-style dress

A red bow on the chest

A small pink top hat

```

○和訳

キャラクターのクローズアップ・アニメーションで、上半身(胸から上)に焦点を当てる。キャラクターは表情や動きを変えずに、ニュートラルな立ちポーズを維持すること。カメラは、キャラクターの顔や衣装のディテールがはっきりと見えるようにしながらも、微妙な動きを作り出すために、左から右へ、そして後ろへとゆるやかにパンするか、わずかにズームイン/ズームアウトすること。

キャラクターの衣装は以下の通り:

鮮やかなオレンジ色のアイドル風ドレス

胸元の赤いリボン

小さなピンクのトップハット


 この時、画像認識機能を持っているLLMサービスであれば、その画像を添付しながら"添付のキャラクター画像を動画生成AI「{AI名}」で横に360度回転させる為のプロンプトを書いて"貰うようなアプローチが取れます。

 なお、FramePackはHunyuan Videoの派生との話なので、AI名は「Hunyuan Video」とすれば良いと思います。

 ただし、生成されたプロンプト自体をそのまま使用するのではなく、不要な箇所(例:please generate ~)もあると思うので、編集した方が良いです。加えて、容姿・服装もプロンプトで言及して貰った方が、見えない箇所(例:背面のリボン)の固定もできる印象です。



## ③ ②の各フレームをFFmpegで画像出力(png形式)します。※要コマンド

https://www.ffmpeg.org/


 この時、FFmpegのインストールが必要ですが、次のようなWindowsコマンドでの対応が考えられます。

```

ffmpeg -i input_video.mp4 -q:v 1 frame_%04d.png

```

 ※mp4ファイルの各フレームをpngファイルとして出力する。


 実際に発行するコマンドは、各人の環境に合わせて変更する必要があります。ただ、その環境に合わせたコマンドもLLMで生成して貰えそうな感触があります。

 ※LLMでの生成物には誤りが含まれる可能性があります。その為、注意が必要です。また、LLMでの生成物を使用して何らかの損害を負ったとしても、使用者自身の責任となります。



## ④ ③の各フレームを高解像度化(ControlNet 852_a_clone_xlを用いてのimg2img。サイズ:2048px × 2048px)します。

https://civitai.com/models/463436?modelVersionId=515749


 この時、細部の描写を強化する為に高解像度化を行ったのですが、ここではControlNet 852_a_clone_xlを使用させて頂きました。このControlNetモデルでは、元画像よりも高解像度を指定してのimg2imgをする際、元画像との差異を少なくできるらしいです。(通常のimg2imgでも元画像に似た画像が生成されますが、更に元画像に似た画像を生成できるとの事です)


 なお、1枚1枚処理するのは手間なので、バッチ機能を使用しました。


■参考記事:【Stable Diffusion】img2imgのバッチ機能で画像を一括高画質化する方法 - イクログ

https://ikuriblog.com/how-to-use-img2imgs-batch-function/

(frame embed)




## ⑤ 高解像度化により細部まで描写された各画像を、Stable Diffusion Web UIのExtra機能で、SDXL標準サイズ(サイズ:1024px × 1024px)にします。

https://github.com/AUTOMATIC1111/stable-diffusion-webui


 この時、④の画像をSDXL標準サイズに圧縮したいだけなので、特に上記機能である必要性はありません。ただ、バッチ機能の利便性が使えます。


■参考記事:Stable Diffusion Web UIのExtrasで簡単に画像を高画質化!! - 株式会社オウルソウ

https://www.owlso.co.jp/try-to-use-stable-diffusion-web-ui-extras-upscale/

(frame embed)




## ⑥ ⑤の画像を教師画像(キャラクターデザインを画像生成AIに覚えて貰う為のサンプル画像)として選抜します。(一例として100枚程度を想定。正面からの全身画像を多めにする。ただ、他のアングルのものや上半身フォーカスのものも一部含める)


 この時、選抜基準としては上記のものにしましたが、これには複数の説があるので一例になります。


■参考記事:【Stable Diffusion SDXL】Kohya LoRA GUIでSDXL用LoRA学習してみた!★15,000文字超え/キャプチャ豊富に徹底解説!|エルティアナ

https://note.com/eruthiana/n/n4499175b6117

(frame embed)




## ⑦ ⑥の各画像ごとにwd14-taggerでタグをまとめたテキストファイルを用意します。この際、各タグファイルにトリガーワードを配置する為のオプション「Additional tags」も使用しています。(トリガーワードはオリジナルなものにします。例:aaa1)

https://github.com/toriato/stable-diffusion-webui-wd14-tagger


## ⑧ toshiaki1729/stable-diffusion-webui-dataset-tag-editorで、⑦のタグファイルから対象キャラクターのキャラ属性を表すタグを"除外"します。※このタグファイルには、指定のキャラクターを表すトリガーワードと、そのキャラクターのキャラ属性以外のタグを含めます。例えば「aaa1, 1boy, closed eyes, heart」のようになります。この例だとaaa1にキャラ属性を集約する意図です。

https://github.com/toshiaki1729/stable-diffusion-webui-dataset-tag-editor


 ⑦と⑧の両方で、次の記事の手順で処理しました。


■参考記事:自作LoRAならこれ一択!「Kohya」の丁寧すぎる使い方解説【Windows版】 - AIの島

https://ai-island-media.com/2024/01/11/lora-kohya-windows/

(frame embed)




## ⑨ bmaltais/kohya_ssで、 ⑥の画像と⑧のタグファイルを基にLoRAモデルを作成します。

https://github.com/bmaltais/kohya_ss


 この時は、基本的には上の記事の通りWindowsでも処理できるはずなのですが、インストールエラーになったので、Google Colab(Googleが提供するPython実行環境で、現時点ではGPUを無料でも利用できる)を使用しました。


 下記が、Google ColabでLoRAモデルを作成する環境を整えられている方々のページです。

 2025年5月初旬使用時には動作しましたが、現時点で動作するかは不明です。説明文は英語なので、自動翻訳しながら使いました。

 パラメータに関しては理解が及ばない所があるので、デフォルトの設定があるものはデフォルトのままにしました。


■hollowstrawberry/kohya-colab

https://github.com/hollowstrawberry/kohya-colab?tab=readme-ov-file

(frame embed)



■XL Lora Trainer by Hollowstrawberry

https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Lora_Trainer_XL.ipynb

(frame embed)



 また日本語記事としては、SDXLではなくSD1.5前提ですが、次の記事を参考にさせて頂きました。


■自作LoRA(2) Google Colabでのkohya-ss - はちみつブログ

https://hunny-hachimitsu.hatenablog.com/entry/2025/03/11/220143

(frame embed)



↓ 結果

```

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```

 これらの結果として、効果のあるLoRAモデルの作成はできました。

 ある程度のキャラ再現性は確保できたようです。また、LoRAモデルはベースの画像生成AIと教師画像との差分をパターンとして学習するので、背景がシンプルなものになっています。

 ただし、トリガーワードのみでの再現性は限定的なようなので、補助として容姿・服装のタグを追記した方が良さそうでした。


```

aaa1 ,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(pink hat, mini hat:0.5), red bow, red bowtie, orange dress, white gloves, frilled skirt, pouch, star \(symbol\), socks, kneehighs, white legwear, boots, orange footwear

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```



# 5.おわりに

 生成AIの進化で、キャラクター創作は今までにない自由度と表現力を手に入れました。


 画像生成AIで魅力的なキャラデザを作り、動画生成AIで360度ぐるりと回るモーションを生み出し、そこからそのキャラデザを自在に呼び出せるLoRAモデルを作る。

 一貫したビジュアル表現が可能になった事で、画像生成AIも新しいステージに上がったように感じます。


 まるで自分がアニメスタジオの監督になったような体験が、個人でもできる時代。まさに“創作の民主化”と言えるでしょう。


 今やあなたも、小さなアニメスタジオのディレクターになれる時代です。あなたの素敵な作品をお待ちしております。


```

3boys, yaoi, otoko no ko,

from side,

spitroast, anal, oral, deep penetration, all fours, hand on another's head, torso grab,

cum in mouth, cum in ass, handsfree ejaculation, cum overflow, excessive cum,

fucked silly, tears, open mouth,

motion lines, motion blur,

penis size difference,

small penis, testicles,

huge penis,

interracial, dark-skinned male,

clothed female nude male,

height difference,

giant, petite,

age difference,

mature male, <年齢タグL>,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(pink hat, mini hat:0.5), red bow, red bowtie, orange dress, white gloves, frilled skirt, pouch, star \(symbol\), socks, kneehighs, white legwear, boots, orange footwear,

faceless male, muscular male,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated

```

```

3boys, yaoi, otoko no ko,

from below,

sandwiched, double anal, double penetration, standing sex, arms around neck,

cum in ass, handsfree ejaculation, cum overflow, excessive cum,

ahegao, fucked silly, tears, open mouth,

motion lines, motion blur,

penis size difference,

small penis, testicles,

huge penis,

interracial, dark-skinned male,

clothed female nude male,

height difference,

giant, petite,

age difference,

mature male, <年齢タグL>,

blue hair, short hair, hair between eyes, blue eyes, eyelashes,

(pink hat, mini hat:0.5), red bow, red bowtie, orange dress, white gloves, frilled skirt, pouch, star \(symbol\), socks, kneehighs, white legwear, boots, orange footwear,

faceless male, muscular male, bald,

dark background

aaa1

Negative prompt: modern, recent, old, oldest, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured, long body, lowres, bad anatomy, bad hands, missing fingers, extra fingers, extra digits, fewer digits, cropped, very displeasing, (worst quality, bad quality:1.2), sketch, jpeg artifacts, signature, watermark, username, (censored, bar_censor, mosaic_censor:1.2), simple background, conjoined, bad ai-generated, hetero, pussy, vaginal, vagina, cameltoe, breasts, female, woman, girl, she, uterus, cervix, impregnation

```


(おわり)

【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成)
【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成) 【検証】オリキャラ男の娘NSFW画像生成(LoRA作成)

More Creators