
「いい絵が生成できたけど画像の縦横比が気に食わない」ということがある。
img2imgのインペイントを使って、存在しないキャンバスサイズを広げる方法を紹介する。
一応、AIで画像生成した画像でなくてもこれは可能である。
(別途プロンプトを記載する必要がある)
もくじ
存在しないキャンバスサイズを広げる

この画像の横幅を広げる。
プロンプト
((((masterpiece)))), high quality, very_high_resolution, large_filesize,
full body shot, lying in coffin,
1girl,solo, dark hair,
A girl surrounded by a large number of beautiful colorful flowers,
Her eyes are closed and she is sleeping peacefully.
bust shot,
dress, lace,
high detailed ornament,
dark, small breast
expressionless,
low-visibility clothing
hdr, [[lens flare]], dynamic angle, colorful refraction,
(sharp focus), (cinematic lighting), (overexposure), (dark intense shadow), caustics,
beautiful detailed deep eyes,
long shot
(an extremely delicate and beautiful),
best quality,highres,official art,extremely detailed CG unity 8k wallpaper, star river, Holy, noble, ((oil painting)) , ((wallpaper 8k CG)), Concept Art, intricate light, dynamic hair, haircut, dynamic fuzziness, beautiful and aesthetic, intricate light, manga and anime
Negative prompt: lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts,signature, watermark, username, blurry, artist name, multiple legs, malformation, close up,
breasts, blush, looking at viewer, over shoulder, faceless, NFSW,
Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 689346454, Size: 512x1024, Model hash: 6569e224, Hypernet: yabuki kentarou, Hypernet strength: 0.3, Denoising strength: 0.35, Clip skip: 2, ENSD: 31337, First pass size: 0x0
キャンバスサイズの下絵を作る
インペイントでマスクして実行する

上画像のように編集画面のブラシで大雑把にマスクしてもいいが、ペイントアプリで正確に作ったマスク画像も利用できる。
生成結果
