sdart commited on
Commit
627164f
·
1 Parent(s): 96d24c8
Files changed (1) hide show
  1. model.py +4 -4
model.py CHANGED
@@ -12,10 +12,10 @@ device = "cpu"
12
  class Model:
13
  def __init__(self):
14
  modelID = "runwayml/stable-diffusion-v1-5"
15
- pipe = StableDiffusionPipeline.from_pretrained(modelID, torch_dtype=torch.float16)
16
- pipe = pipe.to(device)
17
- pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
18
-
19
  #self.pipe = StableDiffusionPipeline.from_pretrained(modelID)
20
  #prompt = "a photo of an astronaut riding a horse on mars"
21
  #n_prompt = "deformed, disfigured"
 
12
  class Model:
13
  def __init__(self):
14
  modelID = "runwayml/stable-diffusion-v1-5"
15
+ self.pipe = StableDiffusionPipeline.from_pretrained(modelID, torch_dtype=torch.float16)
16
+ self.pipe = self.pipe.to(device)
17
+ self.pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
18
+
19
  #self.pipe = StableDiffusionPipeline.from_pretrained(modelID)
20
  #prompt = "a photo of an astronaut riding a horse on mars"
21
  #n_prompt = "deformed, disfigured"