import torch from diffusers import DiffusionPipeline from google.colab import files # 1. 海外で大人気の最高画質モデル(SDXLベース)を読み込む model_id = "Lykon/anylora-XL-v1.0" # アニメに非常に強いモデル pipe = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, use_safetensors=True) pipe.to("cuda") # 高速なGPU処理を有効化 # 2. お腹の脂肪(肉感)と横へそを指示する英語プロンプト prompt = ( "anime style, ultra detailed, masterpiece, a girl with blonde hair, white cropped top, green pleated skirt, " "showing soft chubby tummy, horizontal belly button, plump healthy skin, soft lighting, upper body focus" ) # 3. 作画崩壊を防ぐためのネガティブプロンプト negative_prompt = ( "bad anatomy, deformed, extra limbs, blurred, low quality, bad hands, distorted belly, ugly, flat stomach" ) # 4. 画像生成の実行 print("海外AIモデルでお腹のイラストを生成中...(約20秒かかります)") image = pipe( prompt=prompt, negative_prompt=negative_prompt, num_inference_steps=30, # 描き込み回数 guidance_scale=7.5, # 呪文への忠実度 width=768, # お腹が写りやすい縦長サイズ height=1024 ).images[0] # 5. 画像の保存とダウンロード filename = "overseas_ai_tummy.png" image.save(filename) print("生成完了!ダウンロードを開始します...") files.download(filename) Mostra altro