Ahmad Basyouni commited on
Commit
7690ab1
·
1 Parent(s): 2be9fad

Add application file

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +2 -1
app.py CHANGED
@@ -8,7 +8,7 @@ import numpy as np
8
  model_id = "CompVis/stable-diffusion-v1-4"
9
  default_scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
10
  pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=default_scheduler, torch_dtype=torch.float16)
11
- pipe = pipe.to("cuda")
12
 
13
  # Scheduler options
14
  schedulers = {
 
8
  model_id = "CompVis/stable-diffusion-v1-4"
9
  default_scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
10
  pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=default_scheduler, torch_dtype=torch.float16)
11
+ pipe = pipe.to("cpu")
12
 
13
  # Scheduler options
14
  schedulers = {
requirements.txt CHANGED
@@ -3,4 +3,5 @@ torch
3
  gradio
4
  pillow
5
  transformers
6
- numpy
 
 
3
  gradio
4
  pillow
5
  transformers
6
+ numpy
7
+ accelerate