Anonymous941 commited on
Commit
db85c6e
·
1 Parent(s): a9c17e5

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +0 -12
main.py DELETED
@@ -1,12 +0,0 @@
1
- from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
2
- import torch
3
-
4
- repo_id = "stabilityai/stable-diffusion-2-base"
5
- pipe = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.float16, revision="fp16")
6
-
7
- pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
8
- pipe = pipe.to("cuda")
9
-
10
- prompt = "High quality photo of an astronaut riding a horse in space"
11
- image = pipe(prompt, num_inference_steps=25).images[0]
12
- image.save("astronaut.png")