desgin UI 2
Browse files
app.py
CHANGED
@@ -219,30 +219,35 @@ with gr.Blocks(css=css, theme="NoCrypt/miku@1.2.1") as demo:
|
|
219 |
canvas_size=(1024, 1024),
|
220 |
layers=False
|
221 |
)
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
|
|
|
|
|
|
|
|
|
|
246 |
|
247 |
with gr.Column(elem_id="column_output"):
|
248 |
gr.Markdown("## IMAGE GENERATE", elem_id="output_header")
|
@@ -262,50 +267,27 @@ with gr.Blocks(css=css, theme="NoCrypt/miku@1.2.1") as demo:
|
|
262 |
prompt = gr.Textbox(label="Personalized Text", value="", show_label=True)
|
263 |
with gr.Accordion("S2I Advances Option", open=True):
|
264 |
with gr.Row():
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
# value="live-sketch",
|
278 |
-
# label="Type Sketch2Image models",
|
279 |
-
# interactive=True)
|
280 |
-
# style = gr.Dropdown(
|
281 |
-
# label="Style",
|
282 |
-
# choices=controller.STYLE_NAMES,
|
283 |
-
# value=controller.DEFAULT_STYLE_NAME,
|
284 |
-
# scale=1,
|
285 |
-
# )
|
286 |
prompt_temp = gr.Textbox(
|
287 |
label="Prompt Style Template",
|
288 |
value=controller.styles[controller.DEFAULT_STYLE_NAME],
|
289 |
scale=2,
|
290 |
max_lines=1,
|
291 |
)
|
|
|
292 |
seed = gr.Textbox(label="Seed", value='42', scale=1, min_width=50)
|
293 |
-
|
294 |
-
choices=["GPU", "CPU"],
|
295 |
-
value="GPU",
|
296 |
-
label="GPU & CPU Options Spaces",
|
297 |
-
interactive=True)
|
298 |
-
half_model = gr.Radio(
|
299 |
-
choices=["float32", "float16"],
|
300 |
-
value="float16",
|
301 |
-
label="Demo Speed",
|
302 |
-
interactive=True)
|
303 |
-
model_options = gr.Radio(
|
304 |
-
choices=["350k", "350k-adapter"],
|
305 |
-
value="350k-adapter",
|
306 |
-
label="Type Sketch2Image models",
|
307 |
-
interactive=True)
|
308 |
-
|
309 |
val_r = gr.Slider(
|
310 |
label="Sketch guidance: ",
|
311 |
show_label=True,
|
|
|
219 |
canvas_size=(1024, 1024),
|
220 |
layers=False
|
221 |
)
|
222 |
+
with gr.Group():
|
223 |
+
with gr.Row():
|
224 |
+
url_image = gr.Textbox(label="Image URLS", value="")
|
225 |
+
with gr.Row():
|
226 |
+
ui_mode = gr.Radio(
|
227 |
+
choices=["Light Mode", "Dark Mode"],
|
228 |
+
value="Light Mode",
|
229 |
+
label="Switch Light/Dark Mode UI",
|
230 |
+
interactive=True)
|
231 |
+
zero_gpu_options = gr.Radio(
|
232 |
+
choices=["GPU", "CPU"],
|
233 |
+
value="GPU",
|
234 |
+
label="GPU & CPU Options Spaces",
|
235 |
+
interactive=True)
|
236 |
+
model_options = gr.Radio(
|
237 |
+
choices=["350k", "350k-adapter"],
|
238 |
+
value="350k-adapter",
|
239 |
+
label="Type Sketch2Image models",
|
240 |
+
interactive=True)
|
241 |
+
half_model = gr.Radio(
|
242 |
+
choices=["float32", "float16"],
|
243 |
+
value="float16",
|
244 |
+
label="Demo Speed",
|
245 |
+
interactive=True)
|
246 |
+
type_image = gr.Radio(
|
247 |
+
choices=["RGB", "SKETCH"],
|
248 |
+
value="SKETCH",
|
249 |
+
label="Type of Image (Color Image or Sketch Image)",
|
250 |
+
interactive=True)
|
251 |
|
252 |
with gr.Column(elem_id="column_output"):
|
253 |
gr.Markdown("## IMAGE GENERATE", elem_id="output_header")
|
|
|
267 |
prompt = gr.Textbox(label="Personalized Text", value="", show_label=True)
|
268 |
with gr.Accordion("S2I Advances Option", open=True):
|
269 |
with gr.Row():
|
270 |
+
input_type = gr.Radio(
|
271 |
+
choices=["live-sketch", "url-sketch"],
|
272 |
+
value="live-sketch",
|
273 |
+
label="Type Sketch2Image models",
|
274 |
+
interactive=True)
|
275 |
+
|
276 |
+
style = gr.Dropdown(
|
277 |
+
label="Style",
|
278 |
+
choices=controller.STYLE_NAMES,
|
279 |
+
value=controller.DEFAULT_STYLE_NAME,
|
280 |
+
scale=1,
|
281 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
prompt_temp = gr.Textbox(
|
283 |
label="Prompt Style Template",
|
284 |
value=controller.styles[controller.DEFAULT_STYLE_NAME],
|
285 |
scale=2,
|
286 |
max_lines=1,
|
287 |
)
|
288 |
+
|
289 |
seed = gr.Textbox(label="Seed", value='42', scale=1, min_width=50)
|
290 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
val_r = gr.Slider(
|
292 |
label="Sketch guidance: ",
|
293 |
show_label=True,
|