matt-le-kat commited on
Commit
843ad3f
1 Parent(s): a3f8778

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -15,9 +15,11 @@ pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=os.envir
15
  pipe = pipe.to(device)
16
 
17
  def infer(prompt):
 
18
  with autocast("cuda"):
19
  images_list = pipe(
20
- [prompt])['sample']
 
21
  return images_list
22
 
23
  text = gr.Textbox(
 
15
  pipe = pipe.to(device)
16
 
17
  def infer(prompt):
18
+ generator = torch.Generator(device=device)
19
  with autocast("cuda"):
20
  images_list = pipe(
21
+ [prompt],
22
+ generator=generator)
23
  return images_list
24
 
25
  text = gr.Textbox(