Selim321 commited on
Commit
3dcaca6
·
1 Parent(s): 1c53f7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,10 +5,10 @@ from PIL import Image
5
  from io import BytesIO
6
  from diffusers import StableDiffusionImg2ImgPipeline
7
 
8
- #device = "cuda"
9
  model_id_or_path = "runwayml/stable-diffusion-v1-5"
10
  pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)
11
- #pipe = pipe.to(device)
12
 
13
 
14
  def transform (init_image, textPrompt, strength=0.5, guidance_scale=15):
 
5
  from io import BytesIO
6
  from diffusers import StableDiffusionImg2ImgPipeline
7
 
8
+ device = "CPU"
9
  model_id_or_path = "runwayml/stable-diffusion-v1-5"
10
  pipe = StableDiffusionImg2ImgPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16)
11
+ pipe = pipe.to(device)
12
 
13
 
14
  def transform (init_image, textPrompt, strength=0.5, guidance_scale=15):