from diffusers import StableDiffusionPipeline import torch def generate_ghibli(prompt: str): model_id = "nitrosocke/Ghibli-Diffusion" pipe = StableDiffusionPipeline.from_pretrained( model_id, torch_dtype=torch.float16, use_safetensors=True ).to("cuda") image = pipe(prompt=prompt).images[0] image.save("output_ghibli.png") print("✅ 저장 완료: output_ghibli.png") return image if __name__ == "__main__": prompt = "그녀를 바라보는 한 남자의 야망" generate_ghibli(prompt)