Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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)
|