Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -32,10 +32,10 @@ JS = """function () {
|
|
32 |
if torch.cuda.is_available():
|
33 |
pipe = FluxPipeline.from_pretrained(
|
34 |
model,
|
35 |
-
torch_dtype=torch.bfloat16)
|
36 |
|
37 |
# Function
|
38 |
-
@spaces.GPU()
|
39 |
def generate_image(
|
40 |
prompt,
|
41 |
width=1024,
|
@@ -125,10 +125,10 @@ with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
|
|
125 |
minimum=1,
|
126 |
maximum=100,
|
127 |
step=1,
|
128 |
-
value=
|
129 |
)
|
130 |
seed = gr.Slider(
|
131 |
-
label="
|
132 |
minimum=-1,
|
133 |
maximum=MAX_SEED,
|
134 |
step=1,
|
|
|
32 |
if torch.cuda.is_available():
|
33 |
pipe = FluxPipeline.from_pretrained(
|
34 |
model,
|
35 |
+
torch_dtype=torch.bfloat16).to("cuda")
|
36 |
|
37 |
# Function
|
38 |
+
@spaces.GPU(duration=120)
|
39 |
def generate_image(
|
40 |
prompt,
|
41 |
width=1024,
|
|
|
125 |
minimum=1,
|
126 |
maximum=100,
|
127 |
step=1,
|
128 |
+
value=30,
|
129 |
)
|
130 |
seed = gr.Slider(
|
131 |
+
label="Seeds",
|
132 |
minimum=-1,
|
133 |
maximum=MAX_SEED,
|
134 |
step=1,
|