Update app.py
Browse files
app.py
CHANGED
|
@@ -247,7 +247,8 @@ with block:
|
|
| 247 |
low_threshold = gr.Slider(label="low_threshold", minimum=1, maximum=255, value=100, step=1)
|
| 248 |
high_threshold = gr.Slider(label="high_threshold", minimum=1, maximum=255, value=200, step=1)
|
| 249 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 250 |
-
run_button = gr.Button(
|
|
|
|
| 251 |
with gr.Column():
|
| 252 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 253 |
run_button.click(fn=canny, inputs=[input_image, resolution, low_threshold, high_threshold], outputs=[gallery])
|
|
@@ -261,7 +262,8 @@ with block:
|
|
| 261 |
# input_image = gr.Image(source='upload', type="numpy", tool="sketch", height=512)
|
| 262 |
# resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 263 |
invert = gr.Checkbox(label='Invert Mask', value=False)
|
| 264 |
-
run_button = gr.Button(
|
|
|
|
| 265 |
with gr.Column():
|
| 266 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 267 |
# run_button.click(fn=inpaint, inputs=[input_image, resolution], outputs=[gallery])
|
|
@@ -275,7 +277,8 @@ with block:
|
|
| 275 |
input_image = gr.Image(type="numpy")
|
| 276 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 277 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 278 |
-
run_button = gr.Button(
|
|
|
|
| 279 |
with gr.Column():
|
| 280 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 281 |
run_button.click(fn=hed, inputs=[input_image, resolution], outputs=[gallery])
|
|
@@ -288,7 +291,8 @@ with block:
|
|
| 288 |
input_image = gr.Image(type="numpy")
|
| 289 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 290 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 291 |
-
run_button = gr.Button(
|
|
|
|
| 292 |
with gr.Column():
|
| 293 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 294 |
run_button.click(fn=pidi, inputs=[input_image, resolution], outputs=[gallery])
|
|
@@ -303,7 +307,8 @@ with block:
|
|
| 303 |
value_threshold = gr.Slider(label="value_threshold", minimum=0.01, maximum=2.0, value=0.1, step=0.01)
|
| 304 |
distance_threshold = gr.Slider(label="distance_threshold", minimum=0.01, maximum=20.0, value=0.1, step=0.01)
|
| 305 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=384, step=64)
|
| 306 |
-
run_button = gr.Button(
|
|
|
|
| 307 |
with gr.Column():
|
| 308 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 309 |
run_button.click(fn=mlsd, inputs=[input_image, resolution, value_threshold, distance_threshold], outputs=[gallery])
|
|
@@ -316,7 +321,8 @@ with block:
|
|
| 316 |
input_image = gr.Image(type="numpy")
|
| 317 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 318 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=384, step=64)
|
| 319 |
-
run_button = gr.Button(
|
|
|
|
| 320 |
with gr.Column():
|
| 321 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 322 |
run_button.click(fn=midas, inputs=[input_image, resolution], outputs=[gallery])
|
|
@@ -330,7 +336,8 @@ with block:
|
|
| 330 |
input_image = gr.Image(type="numpy")
|
| 331 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 332 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 333 |
-
run_button = gr.Button(
|
|
|
|
| 334 |
with gr.Column():
|
| 335 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 336 |
run_button.click(fn=zoe, inputs=[input_image, resolution], outputs=[gallery])
|
|
@@ -343,7 +350,8 @@ with block:
|
|
| 343 |
input_image = gr.Image(type="numpy")
|
| 344 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 345 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 346 |
-
run_button = gr.Button(
|
|
|
|
| 347 |
with gr.Column():
|
| 348 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 349 |
run_button.click(fn=normalbae, inputs=[input_image, resolution], outputs=[gallery])
|
|
@@ -356,7 +364,8 @@ with block:
|
|
| 356 |
input_image = gr.Image(type="numpy")
|
| 357 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 358 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 359 |
-
run_button = gr.Button(
|
|
|
|
| 360 |
with gr.Column():
|
| 361 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 362 |
run_button.click(fn=dwpose, inputs=[input_image, resolution], outputs=[gallery])
|
|
@@ -370,7 +379,8 @@ with block:
|
|
| 370 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 371 |
hand_and_face = gr.Checkbox(label='Hand and Face', value=False)
|
| 372 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 373 |
-
run_button = gr.Button(
|
|
|
|
| 374 |
with gr.Column():
|
| 375 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 376 |
run_button.click(fn=openpose, inputs=[input_image, resolution, hand_and_face], outputs=[gallery])
|
|
@@ -384,7 +394,8 @@ with block:
|
|
| 384 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 385 |
invert = gr.Checkbox(label='Invert', value=True)
|
| 386 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 387 |
-
run_button = gr.Button(
|
|
|
|
| 388 |
with gr.Column():
|
| 389 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 390 |
run_button.click(fn=lineart_anime, inputs=[input_image, resolution, invert], outputs=[gallery])
|
|
@@ -399,7 +410,8 @@ with block:
|
|
| 399 |
coarse = gr.Checkbox(label='Using coarse model', value=False)
|
| 400 |
invert = gr.Checkbox(label='Invert', value=True)
|
| 401 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 402 |
-
run_button = gr.Button(
|
|
|
|
| 403 |
with gr.Column():
|
| 404 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 405 |
run_button.click(fn=lineart, inputs=[input_image, resolution, coarse, invert], outputs=[gallery])
|
|
@@ -423,7 +435,8 @@ with block:
|
|
| 423 |
input_image = gr.Image(type="numpy")
|
| 424 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 425 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 426 |
-
run_button = gr.Button(
|
|
|
|
| 427 |
with gr.Column():
|
| 428 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 429 |
run_button.click(fn=oneformer_coco, inputs=[input_image, resolution], outputs=[gallery])
|
|
@@ -436,8 +449,8 @@ with block:
|
|
| 436 |
input_image = gr.Image(type="numpy")
|
| 437 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 438 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=640, step=64)
|
| 439 |
-
run_button = gr.Button(
|
| 440 |
-
|
| 441 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 442 |
run_button.click(fn=oneformer_ade20k, inputs=[input_image, resolution], outputs=[gallery])
|
| 443 |
|
|
@@ -449,7 +462,8 @@ with block:
|
|
| 449 |
input_image = gr.Image(type="numpy")
|
| 450 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 451 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 452 |
-
run_button = gr.Button(
|
|
|
|
| 453 |
with gr.Column():
|
| 454 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 455 |
run_button.click(fn=content_shuffler, inputs=[input_image, resolution], outputs=[gallery])
|
|
@@ -462,7 +476,8 @@ with block:
|
|
| 462 |
input_image = gr.Image(type="numpy")
|
| 463 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 464 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 465 |
-
run_button = gr.Button(
|
|
|
|
| 466 |
with gr.Column():
|
| 467 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 468 |
run_button.click(fn=color_shuffler, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 247 |
low_threshold = gr.Slider(label="low_threshold", minimum=1, maximum=255, value=100, step=1)
|
| 248 |
high_threshold = gr.Slider(label="high_threshold", minimum=1, maximum=255, value=200, step=1)
|
| 249 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 250 |
+
run_button = gr.Button("Run")
|
| 251 |
+
# run_button = gr.Button(label="Run")
|
| 252 |
with gr.Column():
|
| 253 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 254 |
run_button.click(fn=canny, inputs=[input_image, resolution, low_threshold, high_threshold], outputs=[gallery])
|
|
|
|
| 262 |
# input_image = gr.Image(source='upload', type="numpy", tool="sketch", height=512)
|
| 263 |
# resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 264 |
invert = gr.Checkbox(label='Invert Mask', value=False)
|
| 265 |
+
run_button = gr.Button("Run")
|
| 266 |
+
# run_button = gr.Button(label="Run")
|
| 267 |
with gr.Column():
|
| 268 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 269 |
# run_button.click(fn=inpaint, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 277 |
input_image = gr.Image(type="numpy")
|
| 278 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 279 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 280 |
+
run_button = gr.Button("Run")
|
| 281 |
+
# run_button = gr.Button(label="Run")
|
| 282 |
with gr.Column():
|
| 283 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 284 |
run_button.click(fn=hed, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 291 |
input_image = gr.Image(type="numpy")
|
| 292 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 293 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 294 |
+
run_button = gr.Button("Run")
|
| 295 |
+
# run_button = gr.Button(label="Run")
|
| 296 |
with gr.Column():
|
| 297 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 298 |
run_button.click(fn=pidi, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 307 |
value_threshold = gr.Slider(label="value_threshold", minimum=0.01, maximum=2.0, value=0.1, step=0.01)
|
| 308 |
distance_threshold = gr.Slider(label="distance_threshold", minimum=0.01, maximum=20.0, value=0.1, step=0.01)
|
| 309 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=384, step=64)
|
| 310 |
+
run_button = gr.Button("Run")
|
| 311 |
+
# run_button = gr.Button(label="Run")
|
| 312 |
with gr.Column():
|
| 313 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 314 |
run_button.click(fn=mlsd, inputs=[input_image, resolution, value_threshold, distance_threshold], outputs=[gallery])
|
|
|
|
| 321 |
input_image = gr.Image(type="numpy")
|
| 322 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 323 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=384, step=64)
|
| 324 |
+
run_button = gr.Button("Run")
|
| 325 |
+
# run_button = gr.Button(label="Run")
|
| 326 |
with gr.Column():
|
| 327 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 328 |
run_button.click(fn=midas, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 336 |
input_image = gr.Image(type="numpy")
|
| 337 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 338 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 339 |
+
run_button = gr.Button("Run")
|
| 340 |
+
# run_button = gr.Button(label="Run")
|
| 341 |
with gr.Column():
|
| 342 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 343 |
run_button.click(fn=zoe, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 350 |
input_image = gr.Image(type="numpy")
|
| 351 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 352 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 353 |
+
run_button = gr.Button("Run")
|
| 354 |
+
# run_button = gr.Button(label="Run")
|
| 355 |
with gr.Column():
|
| 356 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 357 |
run_button.click(fn=normalbae, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 364 |
input_image = gr.Image(type="numpy")
|
| 365 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 366 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 367 |
+
run_button = gr.Button("Run")
|
| 368 |
+
# run_button = gr.Button(label="Run")
|
| 369 |
with gr.Column():
|
| 370 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 371 |
run_button.click(fn=dwpose, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 379 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 380 |
hand_and_face = gr.Checkbox(label='Hand and Face', value=False)
|
| 381 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 382 |
+
run_button = gr.Button("Run")
|
| 383 |
+
# run_button = gr.Button(label="Run")
|
| 384 |
with gr.Column():
|
| 385 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 386 |
run_button.click(fn=openpose, inputs=[input_image, resolution, hand_and_face], outputs=[gallery])
|
|
|
|
| 394 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 395 |
invert = gr.Checkbox(label='Invert', value=True)
|
| 396 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 397 |
+
run_button = gr.Button("Run")
|
| 398 |
+
# run_button = gr.Button(label="Run")
|
| 399 |
with gr.Column():
|
| 400 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 401 |
run_button.click(fn=lineart_anime, inputs=[input_image, resolution, invert], outputs=[gallery])
|
|
|
|
| 410 |
coarse = gr.Checkbox(label='Using coarse model', value=False)
|
| 411 |
invert = gr.Checkbox(label='Invert', value=True)
|
| 412 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 413 |
+
run_button = gr.Button("Run")
|
| 414 |
+
# run_button = gr.Button(label="Run")
|
| 415 |
with gr.Column():
|
| 416 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 417 |
run_button.click(fn=lineart, inputs=[input_image, resolution, coarse, invert], outputs=[gallery])
|
|
|
|
| 435 |
input_image = gr.Image(type="numpy")
|
| 436 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 437 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 438 |
+
run_button = gr.Button("Run")
|
| 439 |
+
# run_button = gr.Button(label="Run")
|
| 440 |
with gr.Column():
|
| 441 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 442 |
run_button.click(fn=oneformer_coco, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 449 |
input_image = gr.Image(type="numpy")
|
| 450 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 451 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=640, step=64)
|
| 452 |
+
run_button = gr.Button("Run")
|
| 453 |
+
# run_button = gr.Button(label="Run")
|
| 454 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 455 |
run_button.click(fn=oneformer_ade20k, inputs=[input_image, resolution], outputs=[gallery])
|
| 456 |
|
|
|
|
| 462 |
input_image = gr.Image(type="numpy")
|
| 463 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 464 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 465 |
+
run_button = gr.Button("Run")
|
| 466 |
+
# run_button = gr.Button(label="Run")
|
| 467 |
with gr.Column():
|
| 468 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 469 |
run_button.click(fn=content_shuffler, inputs=[input_image, resolution], outputs=[gallery])
|
|
|
|
| 476 |
input_image = gr.Image(type="numpy")
|
| 477 |
# input_image = gr.Image(source='upload', type="numpy")
|
| 478 |
resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
|
| 479 |
+
run_button = gr.Button("Run")
|
| 480 |
+
# run_button = gr.Button(label="Run")
|
| 481 |
with gr.Column():
|
| 482 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(height="auto")
|
| 483 |
run_button.click(fn=color_shuffler, inputs=[input_image, resolution], outputs=[gallery])
|