stazizov commited on
Commit
bf351ec
1 Parent(s): e9ed984

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -34,6 +34,7 @@ xflux_pipeline = XFluxPipeline(Config.name, Config.device, Config.offload)
34
  xflux_pipeline.to(device='cuda' if torch.cuda.is_available() else 'cpu')
35
 
36
  @spaces.GPU
 
37
  def generate(**kwargs):
38
  torch.multiprocessing.set_start_method('spawn', force=True)
39
  return xflux_pipeline.gradio_generate(**kwargs)
 
34
  xflux_pipeline.to(device='cuda' if torch.cuda.is_available() else 'cpu')
35
 
36
  @spaces.GPU
37
+ @torch.inference_mode()
38
  def generate(**kwargs):
39
  torch.multiprocessing.set_start_method('spawn', force=True)
40
  return xflux_pipeline.gradio_generate(**kwargs)