bariscal commited on
Commit
459a3d3
·
1 Parent(s): b2b9a99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,11 +1,12 @@
1
  import gradio as gr
 
2
 
3
 
4
  gr.Interface.load("models/bariscal/cbst_style")
5
 
6
 
7
  def inference(prompt, negative_prompt, num_samples, height=512, width=512, num_inference_steps=50, guidance_scale=7.5):
8
- with torch.autocast("cuda"), torch.inference_mode():
9
  return pipe(
10
  prompt, height=int(height), width=int(width),
11
  negative_prompt=negative_prompt,
 
1
  import gradio as gr
2
+ import torch
3
 
4
 
5
  gr.Interface.load("models/bariscal/cbst_style")
6
 
7
 
8
  def inference(prompt, negative_prompt, num_samples, height=512, width=512, num_inference_steps=50, guidance_scale=7.5):
9
+ with torch.Generator('cpu'), torch.inference_mode():
10
  return pipe(
11
  prompt, height=int(height), width=int(width),
12
  negative_prompt=negative_prompt,