Spaces:
Sleeping
Sleeping
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) | |