Spaces:
Sleeping
Sleeping
File size: 550 Bytes
4944c37 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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)
|