cosmicaether commited on
Commit
66246e3
·
verified ·
1 Parent(s): 46c2795

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -9,4 +9,18 @@ demo = gr.Interface(
9
  outputs=gr.Textbox(label="Greeting"),
10
  )
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  demo.launch()
 
9
  outputs=gr.Textbox(label="Greeting"),
10
  )
11
 
12
+ from diffusers import StableDiffusionPipeline, EulerAncestralDiscreteScheduler
13
+ import torch
14
+
15
+ pipe = StableDiffusionPipeline.from_pretrained(
16
+ "stabilityai/stable-diffusion-2-1",
17
+ torch_dtype=torch.float16
18
+ )
19
+
20
+ pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(
21
+ pipe.scheduler.config
22
+ )
23
+
24
+ pipe = pipe.to("cuda")
25
+
26
  demo.launch()