Spaces:
Running
on
Zero
Running
on
Zero
tight-inversion
commited on
Commit
·
d672aed
1
Parent(s):
61b1045
Offload
Browse files
app.py
CHANGED
|
@@ -93,7 +93,7 @@ class FluxGenerator:
|
|
| 93 |
|
| 94 |
return x
|
| 95 |
|
| 96 |
-
@spaces.GPU
|
| 97 |
@torch.inference_mode()
|
| 98 |
def generate_image(
|
| 99 |
self,
|
|
@@ -456,5 +456,5 @@ if __name__ == "__main__":
|
|
| 456 |
if args.aggressive_offload:
|
| 457 |
args.offload = True
|
| 458 |
|
| 459 |
-
demo = create_demo(args, args.name, args.device,
|
| 460 |
demo.launch(ssr_mode=False)
|
|
|
|
| 93 |
|
| 94 |
return x
|
| 95 |
|
| 96 |
+
@spaces.GPU(duration=90)
|
| 97 |
@torch.inference_mode()
|
| 98 |
def generate_image(
|
| 99 |
self,
|
|
|
|
| 456 |
if args.aggressive_offload:
|
| 457 |
args.offload = True
|
| 458 |
|
| 459 |
+
demo = create_demo(args, args.name, args.device, True, args.aggressive_offload)
|
| 460 |
demo.launch(ssr_mode=False)
|