Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
|
2 |
-
|
3 |
from dataclasses import dataclass
|
4 |
|
5 |
import gradio as gr
|
@@ -730,7 +730,7 @@ print(result)
|
|
730 |
# model = Flux().to(dtype=torch.bfloat16, device="cuda")
|
731 |
# result = model.load_state_dict(load_file("/storage/dev/nyanko/flux-dev/flux1-dev.sft"))
|
732 |
|
733 |
-
|
734 |
@torch.inference_mode()
|
735 |
def generate_image(
|
736 |
prompt, width, height, guidance, seed,
|
|
|
1 |
+
import os
|
2 |
+
import spaces
|
3 |
from dataclasses import dataclass
|
4 |
|
5 |
import gradio as gr
|
|
|
730 |
# model = Flux().to(dtype=torch.bfloat16, device="cuda")
|
731 |
# result = model.load_state_dict(load_file("/storage/dev/nyanko/flux-dev/flux1-dev.sft"))
|
732 |
|
733 |
+
@spaces.GPU
|
734 |
@torch.inference_mode()
|
735 |
def generate_image(
|
736 |
prompt, width, height, guidance, seed,
|