from diffusers import StableDiffusionPipeline | |
DEVICE = 'mps' | |
pipe = StableDiffusionPipeline.from_pretrained( | |
"CompVis/stable-diffusion-v1-4", | |
use_auth_token=True | |
).to(DEVICE) | |
prompt = "Synthwave moonlight" | |
image = pipe(prompt).images[0] | |
image.save("pictures/Synthwave.png") | |