atatakun commited on
Commit
23f6cc9
β€’
1 Parent(s): e333220

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -16
app.py CHANGED
@@ -242,7 +242,8 @@ with block:
242
  gr.Markdown("## Canny Edge")
243
  with gr.Row():
244
  with gr.Column():
245
- input_image = gr.Image(source='upload', type="numpy")
 
246
  low_threshold = gr.Slider(label="low_threshold", minimum=1, maximum=255, value=100, step=1)
247
  high_threshold = gr.Slider(label="high_threshold", minimum=1, maximum=255, value=200, step=1)
248
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
@@ -256,7 +257,8 @@ with block:
256
  gr.Markdown("## Inpaint \n<p>Mochi Diffusion v4.1γ§δ½Ώγˆγ‚‹γ‚ˆγ†γ«γͺγ‚ŠγΎγ—γŸ")
257
  with gr.Row():
258
  with gr.Column():
259
- input_image = gr.Image(source='upload', type="numpy", tool="sketch", height=512)
 
260
  # resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
261
  invert = gr.Checkbox(label='Invert Mask', value=False)
262
  run_button = gr.Button(label="Run")
@@ -270,7 +272,8 @@ with block:
270
  gr.Markdown("## HED Edge&nbsp;&quot;SoftEdge&quot;")
271
  with gr.Row():
272
  with gr.Column():
273
- input_image = gr.Image(source='upload', type="numpy")
 
274
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
275
  run_button = gr.Button(label="Run")
276
  with gr.Column():
@@ -282,7 +285,8 @@ with block:
282
  gr.Markdown("## Pidi Edge&nbsp;&quot;SoftEdge&quot;")
283
  with gr.Row():
284
  with gr.Column():
285
- input_image = gr.Image(source='upload', type="numpy")
 
286
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
287
  run_button = gr.Button(label="Run")
288
  with gr.Column():
@@ -294,7 +298,8 @@ with block:
294
  gr.Markdown("## MLSD Edge")
295
  with gr.Row():
296
  with gr.Column():
297
- input_image = gr.Image(source='upload', type="numpy")
 
298
  value_threshold = gr.Slider(label="value_threshold", minimum=0.01, maximum=2.0, value=0.1, step=0.01)
299
  distance_threshold = gr.Slider(label="distance_threshold", minimum=0.01, maximum=20.0, value=0.1, step=0.01)
300
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=384, step=64)
@@ -308,7 +313,8 @@ with block:
308
  gr.Markdown("## MIDAS Depth")
309
  with gr.Row():
310
  with gr.Column():
311
- input_image = gr.Image(source='upload', type="numpy")
 
312
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=384, step=64)
313
  run_button = gr.Button(label="Run")
314
  with gr.Column():
@@ -321,7 +327,8 @@ with block:
321
  gr.Markdown("## Zoe Depth")
322
  with gr.Row():
323
  with gr.Column():
324
- input_image = gr.Image(source='upload', type="numpy")
 
325
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
326
  run_button = gr.Button(label="Run")
327
  with gr.Column():
@@ -333,7 +340,8 @@ with block:
333
  gr.Markdown("## Normal Bae")
334
  with gr.Row():
335
  with gr.Column():
336
- input_image = gr.Image(source='upload', type="numpy")
 
337
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
338
  run_button = gr.Button(label="Run")
339
  with gr.Column():
@@ -345,7 +353,8 @@ with block:
345
  gr.Markdown("## DWPose")
346
  with gr.Row():
347
  with gr.Column():
348
- input_image = gr.Image(source='upload', type="numpy")
 
349
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
350
  run_button = gr.Button(label="Run")
351
  with gr.Column():
@@ -357,7 +366,8 @@ with block:
357
  gr.Markdown("## Openpose")
358
  with gr.Row():
359
  with gr.Column():
360
- input_image = gr.Image(source='upload', type="numpy")
 
361
  hand_and_face = gr.Checkbox(label='Hand and Face', value=False)
362
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
363
  run_button = gr.Button(label="Run")
@@ -370,7 +380,8 @@ with block:
370
  gr.Markdown("## Lineart Anime \n<p>Check Invert to use with Mochi Diffusion.")
371
  with gr.Row():
372
  with gr.Column():
373
- input_image = gr.Image(source='upload', type="numpy")
 
374
  invert = gr.Checkbox(label='Invert', value=True)
375
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
376
  run_button = gr.Button(label="Run")
@@ -383,7 +394,8 @@ with block:
383
  gr.Markdown("## Lineart \n<p>Check Invert to use with Mochi Diffusion. Inverted image can also be created here for use with ControlNet Scribble.")
384
  with gr.Row():
385
  with gr.Column():
386
- input_image = gr.Image(source='upload', type="numpy")
 
387
  coarse = gr.Checkbox(label='Using coarse model', value=False)
388
  invert = gr.Checkbox(label='Invert', value=True)
389
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
@@ -408,7 +420,8 @@ with block:
408
  gr.Markdown("## Oneformer COCO Segmentation")
409
  with gr.Row():
410
  with gr.Column():
411
- input_image = gr.Image(source='upload', type="numpy")
 
412
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
413
  run_button = gr.Button(label="Run")
414
  with gr.Column():
@@ -420,7 +433,8 @@ with block:
420
  gr.Markdown("## Oneformer ADE20K Segmentation")
421
  with gr.Row():
422
  with gr.Column():
423
- input_image = gr.Image(source='upload', type="numpy")
 
424
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=640, step=64)
425
  run_button = gr.Button(label="Run")
426
  with gr.Column():
@@ -432,7 +446,8 @@ with block:
432
  gr.Markdown("## Content Shuffle")
433
  with gr.Row():
434
  with gr.Column():
435
- input_image = gr.Image(source='upload', type="numpy")
 
436
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
437
  run_button = gr.Button(label="Run")
438
  with gr.Column():
@@ -444,7 +459,8 @@ with block:
444
  gr.Markdown("## Color Shuffle")
445
  with gr.Row():
446
  with gr.Column():
447
- input_image = gr.Image(source='upload', type="numpy")
 
448
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
449
  run_button = gr.Button(label="Run")
450
  with gr.Column():
 
242
  gr.Markdown("## Canny Edge")
243
  with gr.Row():
244
  with gr.Column():
245
+ input_image = gr.Image(type="numpy")
246
+ # input_image = gr.Image(source='upload', type="numpy")
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)
 
257
  gr.Markdown("## Inpaint \n<p>Mochi Diffusion v4.1γ§δ½Ώγˆγ‚‹γ‚ˆγ†γ«γͺγ‚ŠγΎγ—γŸ")
258
  with gr.Row():
259
  with gr.Column():
260
+ input_image = gr.Image(type="numpy", tool="sketch", height=512)
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(label="Run")
 
272
  gr.Markdown("## HED Edge&nbsp;&quot;SoftEdge&quot;")
273
  with gr.Row():
274
  with gr.Column():
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(label="Run")
279
  with gr.Column():
 
285
  gr.Markdown("## Pidi Edge&nbsp;&quot;SoftEdge&quot;")
286
  with gr.Row():
287
  with gr.Column():
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(label="Run")
292
  with gr.Column():
 
298
  gr.Markdown("## MLSD Edge")
299
  with gr.Row():
300
  with gr.Column():
301
+ input_image = gr.Image(type="numpy")
302
+ # input_image = gr.Image(source='upload', type="numpy")
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)
 
313
  gr.Markdown("## MIDAS Depth")
314
  with gr.Row():
315
  with gr.Column():
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(label="Run")
320
  with gr.Column():
 
327
  gr.Markdown("## Zoe Depth")
328
  with gr.Row():
329
  with gr.Column():
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(label="Run")
334
  with gr.Column():
 
340
  gr.Markdown("## Normal Bae")
341
  with gr.Row():
342
  with gr.Column():
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(label="Run")
347
  with gr.Column():
 
353
  gr.Markdown("## DWPose")
354
  with gr.Row():
355
  with gr.Column():
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(label="Run")
360
  with gr.Column():
 
366
  gr.Markdown("## Openpose")
367
  with gr.Row():
368
  with gr.Column():
369
+ input_image = gr.Image(type="numpy")
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(label="Run")
 
380
  gr.Markdown("## Lineart Anime \n<p>Check Invert to use with Mochi Diffusion.")
381
  with gr.Row():
382
  with gr.Column():
383
+ input_image = gr.Image(type="numpy")
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(label="Run")
 
394
  gr.Markdown("## Lineart \n<p>Check Invert to use with Mochi Diffusion. Inverted image can also be created here for use with ControlNet Scribble.")
395
  with gr.Row():
396
  with gr.Column():
397
+ input_image = gr.Image(type="numpy")
398
+ # input_image = gr.Image(source='upload', type="numpy")
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)
 
420
  gr.Markdown("## Oneformer COCO Segmentation")
421
  with gr.Row():
422
  with gr.Column():
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(label="Run")
427
  with gr.Column():
 
433
  gr.Markdown("## Oneformer ADE20K Segmentation")
434
  with gr.Row():
435
  with gr.Column():
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(label="Run")
440
  with gr.Column():
 
446
  gr.Markdown("## Content Shuffle")
447
  with gr.Row():
448
  with gr.Column():
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(label="Run")
453
  with gr.Column():
 
459
  gr.Markdown("## Color Shuffle")
460
  with gr.Row():
461
  with gr.Column():
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(label="Run")
466
  with gr.Column():