Created
August 30, 2022 18:15
-
-
Save fragmede/ff94d6d1795441a4c72f5c47b0343c59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from diffusers import StableDiffusionPipeline | |
pipe = StableDiffusionPipeline.from_pretrained( | |
"CompVis/stable-diffusion-v1-4", | |
use_auth_token=True | |
).to("mps") | |
prompt = "a photo of an astronaut riding a horse on mars" | |
image = pipe(prompt)["sample"][0] | |
image.save("astronaut_rides_horse.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment