xnetba commited on
Commit
4bb4982
·
1 Parent(s): 3f8f1c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -1,11 +1,9 @@
1
  from diffusers import StableDiffusionPipeline
2
- import torch
3
 
4
  model_id = "runwayml/stable-diffusion-v1-5"
5
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
6
- pipe = pipe.to("cuda")
7
 
8
  prompt = "a photo of an astronaut riding a horse on mars"
9
- image = pipe(prompt).images[0]
10
-
11
- image.save("astronaut_rides_horse.png")
 
1
  from diffusers import StableDiffusionPipeline
 
2
 
3
  model_id = "runwayml/stable-diffusion-v1-5"
4
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
 
5
 
6
  prompt = "a photo of an astronaut riding a horse on mars"
7
+ image = pipe(prompt).images[0]
8
+
9
+ image.save("astronaut_rides_horse.png")