Manjushri commited on
Commit
acfacdd
1 Parent(s): b6d0217

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -3,12 +3,11 @@ import torch
3
  import numpy as np
4
  import modin.pandas as pd
5
  from PIL import Image
6
- from diffusers import DiffusionPipeline #EulerDiscreteScheduler
7
 
8
  device = "cuda" if torch.cuda.is_available() else "cpu"
9
-
10
- #scheduler = EulerDiscreteScheduler.from_pretrained("stabilityai/stable-diffusion-2-1", subfolder="scheduler", prediction_type="v_prediction")
11
- pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", safety_checker=None)
12
  pipe = pipe.to(device)
13
 
14
  def genie (prompt, negative_prompt, scale, steps, seed):
 
3
  import numpy as np
4
  import modin.pandas as pd
5
  from PIL import Image
6
+ from diffusers import DiffusionPipeline
7
 
8
  device = "cuda" if torch.cuda.is_available() else "cpu"
9
+ pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
10
+ pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-0.9", safety_checker=None)
 
11
  pipe = pipe.to(device)
12
 
13
  def genie (prompt, negative_prompt, scale, steps, seed):