InpaintでAI美女にオリジナルTシャツを着てもらう方法を検証

スポンサーリンク
Stable Diffusion
スポンサーリンク

Stable DiffusionでオリジナルTシャツをAI美女に着せた画像の生成を検証してみます。ControlNetを通して、Tシャツに模様を転写することで、比較的自然なプリントシャツができます。

検証内容

手順は以下の通りです。

1.Tシャツのデザイン原案を好きなモデルで作成する。
2.白Tシャツの美女を作成する。
3.Inpanitでデザイン原案をのせて、reference_adain+attnとshuffleで画像要素をミックスさせる。
4.何枚か生成させて、良いデザインを選択する。

デザイン原案を作成する

好きなモデルでデザイン原案を作成します。今回はcheckpointにAnthing4.5を使い、「火の鳥風のイラスト」を作成しました。アニメプリント風に仕上げるためにflat LoRAを使っています。

flat LoRAの参考記事:ウエイトで微調整するLoRAを使ってみる

icon, fire bird, phoenix, flying up volcano, <lora:flat1:2>
Negative prompt: EasyNegative, nsfw, (worst quality, low quality:1.4), (depth of field, blurry, bokeh:1.5)

元画像はこんな感じ。そのまま使うのではなくControlNetのベースとして使います。

白Tシャツの美女を作成

美女画像のcheckpoinstにはBracingEvoMix_v1を使っています。プロンプトはいろいろ無駄に長いですが、気に入っていつもこれを使っています。

1girl, solo, t-shirt, embressed, (RAW photo, best quality), (realistic, photo-realistic:1.3), masterpiece, an extremely delicate and beautiful, extremely detailed, CG, unity , 2k wallpaper, finely detail, light smile, extremely detailed CG unity 8k wallpaper, huge filesize, ultra-detailed, highres, outdoor, street
Negative prompt: EasyNegative, bad-image-v2-39000, badhandv4, ulzzang-6500-v1.1, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans, extra fingers, fewer fingers, ((watermark:2)), (white letters:1), (multi nipples), bad anatomy, bad hands, text, error, missing fingers, missing arms, missing legs, extra digit, fewer digits, cropped, worst quality, jpeg artifacts, signature, watermark, username, bad feet, {Multiple people}, blurry, poorly drawn hands, poorly drawn face, mutation, deformed, extra limbs, extra arms, extra legs, malformed limbs, fused fingers, too many fingers, long neck, cross-eyed, mutated hands, polar lowres, bad body, bad proportions, gross proportions, wrong feet bottom render, abdominal stretch, briefs, knickers, kecks, thong, {{fused fingers}}, {{bad body}}, bad-picture-chill-75v, ng_deepnegative_v1_75t, EasyNegative, bad proportion body to legs, wrong toes, extra toes, missing toes, weird toes, 2 body, 2 pussy, 2 upper, 2 lower, 2 head, 3 hand, 3 feet, extra long leg, super long leg, mirrored image, mirrored noise, (bad_prompt_version2:0.8), aged up, old, ((mosaic))

Inpaintを使ってTシャツにプリント

Tシャツへのプリントはimg2imgのinpaintを使います。下のような感じでプリントを印刷したいところにマークをします。

プロンプトはプリントする部分の情報をごくシンプルに記述。inpaintの設定は下の通りです。

icon, fire bird, phoenix, flying up volcano

ポイントはcontrolnetで、referenceの中で最も強いreference_adaom+attnでfidelity(忠実度)をmaxで行います。shuffleは使わなくても良いですが、入れるほうが、全体的なカラーバランスが反映されやすくなります。ある程度ばらつきはあるので、seedを変えて、ガチャでいいのが出るまで生成してください。

ControlNet Unit 0

ControlNet Unit 1

ギャラリー

こんなこともできます。モナリザ風Tシャツを着た美女。

This image is generated for research purposes.

クレジット:ルーブル美術館 公式Web公開画像
face, recto, avers, avant ; détail © 2011 RMN-Grand Palais (musée du Louvre) / Michel Urtado
Portrait de Lisa Gherardini, épouse de Francesco del Giocondo, dit La Joconde ou Monna Lisa

Stable Diffusion
スポンサーリンク
鷹の目週末プログラマー

コメント