xp3857 commited on
Commit
cd2aac8
·
1 Parent(s): 7beabb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -6,7 +6,7 @@ from diffusers import StableDiffusionPipeline
6
  import torch
7
 
8
  model_id = "runwayml/stable-diffusion-v1-5"
9
- pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
10
  pipe = pipe.to("cpu")
11
 
12
 
@@ -27,8 +27,7 @@ def ac():
27
  elif h != o:
28
  return(None)
29
  def im_pipe(put):
30
- return pipe(put, negative_prompt="blury").images[0]
31
-
32
  '''
33
  num_images_per_prompt=n_images,
34
  num_inference_steps = int(steps),
 
6
  import torch
7
 
8
  model_id = "runwayml/stable-diffusion-v1-5"
9
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.get_default_dtype())
10
  pipe = pipe.to("cpu")
11
 
12
 
 
27
  elif h != o:
28
  return(None)
29
  def im_pipe(put):
30
+ return pipe(prompt=put, negative_prompt="blury")
 
31
  '''
32
  num_images_per_prompt=n_images,
33
  num_inference_steps = int(steps),