今回は画像生成AIを使った表現方法に関する話題で
AIで「アニメキャラ+実写背景」な画像を作る方法
を分かりやすく・丁寧に解説するという内容になっております。
海外の掲示板「Reddit」の画像生成AIコミュニティでは、時々「リアルな背景の中にアニメキャラを違和感なく配置した画像」が投稿されて話題になることがあります。
この「アニメキャラ+実写背景」と呼べるような画像はとても雰囲気がよく個人的に気に入ったので、私もそういう画像を生成できないかなと思いました。
そこでここではそのような画像をどのようにしたら生成できるか?という点を具体的に解説していきますね。
私が生成した「アニメキャラ+実写背景」の画像の例(プロンプトつき)
ではまずは私が実際に生成したアニメキャラ+実写背景のサンプル画像をプロンプトつきでご覧いただこうと思います。
例1:紅葉した森で黒熊の親子と一緒に自撮りしている女の子

プロンプト:
This is a polished, anime-style illustration featuring a young girl in the foreground.
A girl with short black hair is wearing a black hoodie—with the hood pulled up—and a black skirt. The hood features a pair of black bear ears, while her own ears remain hidden beneath her hair. She is taking a selfie, holding a black bear cub, with her mouth wide open in an expression of excitement; her gaze is fixed on the camera.
The character is rendered with clean, anime-style line art, soft shading, and vibrant colors.
The scene is set in a stunningly realistic autumn forest. Sunlight filters through the dense, colorful foliage, and the ground is covered with fallen leaves. Both the bear cub in the girl’s arms and the black mother bear visible in the background are rendered with photographic realism. The cub looks toward the camera with an expression of curiosity, while the mother bear, positioned just behind the girl, gazes at the camera in a relaxed, laid-back posture.
The background is depicted with the realistic lighting, depth, and intricate detail characteristic of an actual outdoor photograph.
Soft, natural light illuminates the entire scene, creating a striking contrast between the anime-style character and the photorealistic landscape.
ネガティブプロンプト:
nsfw, worst quality, bad anatomy, watermark, jpeg artifact
プロンプトの日本語訳(参考):
本作は、手前に少女を配した、洗練されたアニメ調のイラストです。
黒髪のショートヘアの少女は、フードを被った黒いパーカーと黒いスカートを身にまとっています。フードには黒いクマの耳があしらわれており、少女自身の耳は髪に隠れて見えません。彼女は黒い子グマを抱きかかえて自撮りをしており、興奮した様子で口を大きく開け、カメラをしっかりと見つめています。
キャラクターは、すっきりとしたアニメ調の線画と柔らかな陰影、そして鮮やかな色彩で描かれています。
舞台は、驚くほどリアルな秋の森です。色づいた木々の隙間から木漏れ日が差し込み、地面には落ち葉が敷き詰められています。少女が抱える子グマや、背景にいる母グマは、写真のように写実的なタッチで描かれています。子グマは好奇心に満ちた表情でカメラの方を向き、少女のすぐ後ろにいる母グマは、リラックスした様子でカメラを見つめています。
背景は、実際の屋外写真に見られるような、リアルな光の表現、奥行き、そして緻密なディテールで構成されています。
全体を柔らかな自然光が照らし出しており、アニメ調のキャラクターと写真のようにリアルな風景との間で、鮮やかな対比が生まれています。
例2:花が咲き乱れる神秘的な高原に佇む美少女

プロンプト:
This is a polished, anime-style illustration featuring a young girl in the foreground.
The girl wears a beautiful, pure-white dress; she has long, lovely blonde hair and striking, radiant blue eyes. Holding a bouquet, she stands amidst a field of flowers, her gaze directed toward the viewer.
The character is rendered with clean, anime-style line art, soft shading, and vibrant colors.
The setting is a vast, breathtaking highland, lush with incredibly realistic, blooming flowers. In the distance, rugged mountains tower, shrouded in a mysterious mist. Beams of light filter through gaps in the overcast sky, illuminating the ground below. Petals drift through the air, creating an ethereal, dreamlike atmosphere.
The background is depicted with the realistic lighting, depth, and intricate detail characteristic of an actual outdoor photograph.
Soft, natural light illuminates the entire scene, creating a striking contrast between the anime-style character and the photorealistic landscape.
ネガティブプロンプト:
(例1と同じ)
プロンプトの日本語訳(参考):
これは、手前に少女を配した、洗練されたアニメ調のイラストです。
少女は美しい純白のドレスを纏い、長く愛らしい金髪と、ひときわ目を引く輝くような青い瞳をしています。花束を手に花畑の中に立ち、その視線は見る側へと向けられています。
キャラクターは、すっきりとしたアニメ調の線画と柔らかな陰影、そして鮮やかな色彩で描かれています。
舞台は、息をのむほど広大な高地であり、そこには極めてリアルに描かれた花々が咲き誇っています。遠方には険しい山々がそびえ立ち、神秘的な霧に包まれています。曇り空の隙間からは光が差し込み、眼の大地を照らし出しています。空を舞う花びらが、幻想的で夢のような雰囲気を醸し出しています。
背景は、実際の屋外写真に見られるような、リアルな光の表現、奥行き、そして緻密なディテールで描かれています。
全体を柔らかな自然光が照らし出し、アニメ調のキャラクターと写実的な風景との間に、鮮やかな対比を生み出しています。
例3:恐竜の前で自撮りしている女の子たち

プロンプト:
This is a polished, anime-style illustration featuring two young girls in the foreground.
The girls are taking a selfie. Dressed like adventurers, they are wearing hats and carrying backpacks. Both girls strike poses with joyful expressions, looking toward the viewer.
The character is rendered with clean, anime-style line art, soft shading, and vibrant colors.
The background is a highly realistic jungle, featuring a massive, lifelike dinosaur that is turning to look toward the viewer. In the distance, rugged, photorealistic mountains are bathed in the glow of the sunset, taking on a beautiful orange hue.
The background is depicted with the realistic lighting, depth, and intricate detail characteristic of an actual outdoor photograph.
Soft, natural light illuminates the entire scene, creating a striking contrast between the anime-style character and the photorealistic landscape.
ネガティブプロンプト:
(例1と同じ)
プロンプトの日本語訳(参考):
これは、手前に2人の少女を配した、洗練されたアニメ調のイラストです。
少女たちは冒険者のような装いで、帽子をかぶり、バックパックを背負って自撮りをしています。2人とも楽しそうな表情でポーズをとり、こちらを見つめています。
キャラクターは、すっきりとしたアニメ調の線画と柔らかな陰影、そして鮮やかな色彩で描かれています。
背景には非常にリアルなジャングルが広がり、そこにはこちらを振り返る巨大で写実的な恐竜の姿があります。遠方には険しい山々がそびえ、夕日に照らされて美しいオレンジ色に染まっています。
背景は、実際の屋外写真に見られるような、リアルな光の表現、奥行き、そして緻密なディテールで描かれています。
全体を柔らかな自然光が照らし出しており、アニメ調のキャラクターと写実的な風景との間に、際立った対比を生み出しています。
結論:「実写とアニメの両方に対応した画像生成モデル」を使ってローカル生成!
まず結論を言うと、今回のような「アニメキャラ+実写背景」な画像は
「実写とアニメの両方に対応した画像生成モデル」を使ってローカル生成
することでいい感じに生成することができました。後述するように(執筆時点で私が試した限りでは)オンラインの画像生成サービスだとなかなかうまくいかなかったので結局いつも通りローカル生成で解決することになりました。
「アニメキャラ+実写背景」な画像の作り方
ではここからが本題で、「アニメキャラ+実写背景」な画像の作り方を具体的に解説します。
使用する画像生成AIの選定
まず今回のような「ある意味特殊な画像」を生成するためには使用する画像生成AIを選定する必要があります。候補となる画像生成AIをザっとリストアップすると下記のようなものが挙げられます。
- オンラインの画像生成サービスを使う
- ローカル生成可能な画像生成AIを使う
- アニメキャラ+実写背景を実現できるLoRAを使う
- 実写にもアニメにも対応したモデルを工夫して使う(←今回はコレ)
一番手っ取り早そうなのはオンラインの画像生成サービス(対話型AIの画像生成機能など)を使うことですが、残念ながら私が試した限りでは思った通りのアニメキャラ+実写画像になりませんでした。
となるとローカル環境で使えるモデルを選定するか、アニメキャラ+実写用のLoRAを使うことになります。LoRAに関しては既にアニメ+実写用のものがCivitai等にあるようです。ただしよさそうなものは有料だったりしたので残念ながら候補からは除外しました。
結局、ここでは消去法で実写とアニメの両方に対応したモデルを工夫して使うという流れになりました。
選定した画像生成モデル:MOSS-Image
次に、いまご説明した通り「アニメキャラ+実写背景」な画像を生成するには実写にもアニメにも対応した画像生成AIが必要です。この要件を満たす良質なモデルは実はあまりないのですが、先日公開されたばかりの「MOSS-Image」というモデルが丁度良さそうだったのでここではこのモデルを使うことにしました。
MOSS-Imageの導入方法や使い方は前回の記事で詳しくご紹介していますので、そちらも併せてご覧いただければと思います。
「アニメキャラ+実写背景」を実現するためのプロンプトのテンプレート
さて「アニメキャラ+実写背景」をMOSS-Imageで実現するためにはプロンプトを工夫する必要があります。そこでRedditに投稿されたプロンプトを参考にして私なりに色々工夫した結果、下記のようなプロンプトのテンプレートができあがりました。
プロンプトテンプレート:
This is a polished, anime-style illustration featuring a young girl in the foreground.
(ここにアニメキャラの説明をなるべく詳しく書く)
The character is rendered with clean, anime-style line art, soft shading, and vibrant colors.
The background is depicted with the realistic lighting, depth, and intricate detail characteristic of an actual outdoor photograph.
(ここに実写背景の説明をなるべく詳しく書く)
Soft, natural light illuminates the entire scene, creating a striking contrast between the anime-style character and the photorealistic landscape.
これを元にしてプロンプトを組み立てるとアニメキャラ+実写背景の画像生成がかなりうまくいくと思います。
アニメキャラのプロンプトの書き方
まずアニメキャラのプロンプトは、「どういう見た目のキャラクターなのか」「どんなポーズや表情をしているか」といったことをなるべく具体的に書きましょう!この辺は美少女イラストの生成に慣れている方なら簡単だと思いますのでいつも通り記述してください。
キャラクターのプロンプトの例(サンプル画像の例1の一部を抜粋):
A girl with short black hair is wearing a black hoodie—with the hood pulled up—and a black skirt. The hood features a pair of black bear ears, while her own ears remain hidden beneath her hair. She is taking a selfie, holding a black bear cub, with her mouth wide open in an expression of excitement; her gaze is fixed on the camera.
実写背景のプロンプトの書き方
次に実写背景のプロンプトは現実的な風景をなるべく具体的に記述するとよいです。ここでいう「現実的な風景」とは、あまりにもファンタジーやSF的なものを直接指定するのではなく、実際に存在するものを組み合わせて考えた風景です。今回の場合はリアルな背景を出す必要があり、ファンタジー・SF的なものを直接指定するとどうしても嘘っぽいというかCGっぽさが出てしまって雰囲気が台無しになってしまいますので気をつけましょう。
背景のプロンプトの例(サンプル画像の例1の一部を抜粋):
The scene is set in a stunningly realistic autumn forest. Sunlight filters through the dense, colorful foliage, and the ground is covered with fallen leaves. Both the bear cub in the girl’s arms and the black mother bear visible in the background are rendered with photographic realism. The cub looks toward the camera with an expression of curiosity, while the mother bear, positioned just behind the girl, gazes at the camera in a relaxed, laid-back posture.
おわりに
以上、「アニメキャラ+実写背景」な画像を生成する具体的な方法を解説しました。今回のような画像は独特の雰囲気があって生成するのがとても楽しいので、ぜひ皆さんも試してみてください。
この記事が画像生成のお役に立てば幸いです。


