Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -49,16 +49,16 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
49 |
seed = random.randint(0, MAX_SEED)
|
50 |
return seed
|
51 |
|
52 |
-
@spaces.GPU(duration=
|
53 |
def generate(
|
54 |
prompt: str,
|
55 |
negative_prompt: str = "",
|
56 |
use_negative_prompt: bool = False,
|
57 |
seed: int = 0,
|
58 |
-
width: int =
|
59 |
-
height: int =
|
60 |
guidance_scale: float = 3,
|
61 |
-
num_inference_steps: int =
|
62 |
randomize_seed: bool = False,
|
63 |
use_resolution_binning: bool = True,
|
64 |
progress=gr.Progress(track_tqdm=True),
|
@@ -105,7 +105,6 @@ footer {
|
|
105 |
'''
|
106 |
with gr.Blocks(css=css) as demo:
|
107 |
gr.Markdown("""# SDXL Flash
|
108 |
-
### <span style='color: red;'>You may change the steps from 5 to 8, if you didn't get satisfied results.
|
109 |
### First Image processing takes time then images generate faster.""")
|
110 |
with gr.Group():
|
111 |
with gr.Row():
|
@@ -140,17 +139,17 @@ with gr.Blocks(css=css) as demo:
|
|
140 |
with gr.Row(visible=True):
|
141 |
width = gr.Slider(
|
142 |
label="Width",
|
143 |
-
minimum=
|
144 |
maximum=MAX_IMAGE_SIZE,
|
145 |
-
step=
|
146 |
-
value=
|
147 |
)
|
148 |
height = gr.Slider(
|
149 |
label="Height",
|
150 |
-
minimum=
|
151 |
maximum=MAX_IMAGE_SIZE,
|
152 |
-
step=
|
153 |
-
value=
|
154 |
)
|
155 |
with gr.Row():
|
156 |
guidance_scale = gr.Slider(
|
@@ -165,7 +164,7 @@ with gr.Blocks(css=css) as demo:
|
|
165 |
minimum=1,
|
166 |
maximum=15,
|
167 |
step=1,
|
168 |
-
value=
|
169 |
)
|
170 |
|
171 |
gr.Examples(
|
|
|
49 |
seed = random.randint(0, MAX_SEED)
|
50 |
return seed
|
51 |
|
52 |
+
@spaces.GPU(duration=30, queue=False)
|
53 |
def generate(
|
54 |
prompt: str,
|
55 |
negative_prompt: str = "",
|
56 |
use_negative_prompt: bool = False,
|
57 |
seed: int = 0,
|
58 |
+
width: int = 2048,
|
59 |
+
height: int = 2048,
|
60 |
guidance_scale: float = 3,
|
61 |
+
num_inference_steps: int = 10,
|
62 |
randomize_seed: bool = False,
|
63 |
use_resolution_binning: bool = True,
|
64 |
progress=gr.Progress(track_tqdm=True),
|
|
|
105 |
'''
|
106 |
with gr.Blocks(css=css) as demo:
|
107 |
gr.Markdown("""# SDXL Flash
|
|
|
108 |
### First Image processing takes time then images generate faster.""")
|
109 |
with gr.Group():
|
110 |
with gr.Row():
|
|
|
139 |
with gr.Row(visible=True):
|
140 |
width = gr.Slider(
|
141 |
label="Width",
|
142 |
+
minimum=512,
|
143 |
maximum=MAX_IMAGE_SIZE,
|
144 |
+
step=64,
|
145 |
+
value=1536,
|
146 |
)
|
147 |
height = gr.Slider(
|
148 |
label="Height",
|
149 |
+
minimum=512,
|
150 |
maximum=MAX_IMAGE_SIZE,
|
151 |
+
step=64,
|
152 |
+
value=1536,
|
153 |
)
|
154 |
with gr.Row():
|
155 |
guidance_scale = gr.Slider(
|
|
|
164 |
minimum=1,
|
165 |
maximum=15,
|
166 |
step=1,
|
167 |
+
value=8,
|
168 |
)
|
169 |
|
170 |
gr.Examples(
|