Files changed (3) hide show
  1. README.md +1 -2
  2. app.py +14 -14
  3. requirements.txt +2 -2
README.md CHANGED
@@ -3,9 +3,8 @@ title: Diffusers Image Outpaint
3
  emoji: 🔅
4
  colorFrom: gray
5
  colorTo: purple
6
- python_version: "3.10"
7
  sdk: gradio
8
- sdk_version: 6.12.0
9
  app_file: app.py
10
  pinned: true
11
  disable_embbeding: true
 
3
  emoji: 🔅
4
  colorFrom: gray
5
  colorTo: purple
 
6
  sdk: gradio
7
+ sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: true
10
  disable_embbeding: true
app.py CHANGED
@@ -427,7 +427,7 @@ with gr.Blocks(css=css) as demo:
427
  fn=use_output_as_input,
428
  inputs=[result],
429
  outputs=[input_image],
430
- api_visibility="private"
431
  )
432
 
433
  target_ratio.change(
@@ -435,7 +435,7 @@ with gr.Blocks(css=css) as demo:
435
  inputs=[target_ratio, width_slider, height_slider],
436
  outputs=[width_slider, height_slider, settings_panel],
437
  queue=False,
438
- api_visibility="private"
439
  )
440
 
441
  width_slider.change(
@@ -443,7 +443,7 @@ with gr.Blocks(css=css) as demo:
443
  inputs=[width_slider, height_slider],
444
  outputs=[target_ratio],
445
  queue=False,
446
- api_visibility="private"
447
  )
448
 
449
  height_slider.change(
@@ -451,7 +451,7 @@ with gr.Blocks(css=css) as demo:
451
  inputs=[width_slider, height_slider],
452
  outputs=[target_ratio],
453
  queue=False,
454
- api_visibility="private"
455
  )
456
 
457
  resize_option.change(
@@ -459,14 +459,14 @@ with gr.Blocks(css=css) as demo:
459
  inputs=[resize_option],
460
  outputs=[custom_resize_percentage],
461
  queue=False,
462
- api_visibility="private"
463
  )
464
 
465
  run_button.click( # Clear the result
466
  fn=clear_result,
467
  inputs=None,
468
  outputs=result,
469
- api_visibility="private"
470
  ).then( # Generate the new image
471
  fn=infer,
472
  inputs=[input_image, width_slider, height_slider, overlap_percentage, num_inference_steps,
@@ -477,36 +477,36 @@ with gr.Blocks(css=css) as demo:
477
  fn=lambda: gr.update(visible=True),
478
  inputs=None,
479
  outputs=use_as_input_button,
480
- api_visibility="private"
481
  ).then( # Update the history gallery
482
  fn=lambda x, history: update_history(x[1], history),
483
  inputs=[result, history_gallery],
484
  outputs=history_gallery,
485
- api_visibility="private"
486
  )
487
 
488
  prompt_input.submit( # Clear the result
489
  fn=clear_result,
490
  inputs=None,
491
  outputs=result,
492
- api_visibility="private"
493
  ).then( # Generate the new image
494
  fn=infer,
495
  inputs=[input_image, width_slider, height_slider, overlap_percentage, num_inference_steps,
496
  resize_option, custom_resize_percentage, prompt_input, alignment_dropdown,
497
  overlap_left, overlap_right, overlap_top, overlap_bottom],
498
  outputs=result,
499
- api_visibility="private"
500
  ).then( # Update the history gallery
501
  fn=lambda x, history: update_history(x[1], history),
502
  inputs=[result, history_gallery],
503
  outputs=history_gallery,
504
- api_visibility="private"
505
  ).then( # Show the "Use as Input Image" button
506
  fn=lambda: gr.update(visible=True),
507
  inputs=None,
508
  outputs=use_as_input_button,
509
- api_visibility="private"
510
  )
511
 
512
  preview_button.click(
@@ -515,7 +515,7 @@ with gr.Blocks(css=css) as demo:
515
  overlap_left, overlap_right, overlap_top, overlap_bottom],
516
  outputs=preview_image,
517
  queue=False,
518
- api_visibility="private"
519
  )
520
 
521
- demo.queue(max_size=12).launch(ssr_mode=False, show_error=True, mcp_server=True)
 
427
  fn=use_output_as_input,
428
  inputs=[result],
429
  outputs=[input_image],
430
+ show_api=False
431
  )
432
 
433
  target_ratio.change(
 
435
  inputs=[target_ratio, width_slider, height_slider],
436
  outputs=[width_slider, height_slider, settings_panel],
437
  queue=False,
438
+ show_api=False
439
  )
440
 
441
  width_slider.change(
 
443
  inputs=[width_slider, height_slider],
444
  outputs=[target_ratio],
445
  queue=False,
446
+ show_api=False
447
  )
448
 
449
  height_slider.change(
 
451
  inputs=[width_slider, height_slider],
452
  outputs=[target_ratio],
453
  queue=False,
454
+ show_api=False
455
  )
456
 
457
  resize_option.change(
 
459
  inputs=[resize_option],
460
  outputs=[custom_resize_percentage],
461
  queue=False,
462
+ show_api=False
463
  )
464
 
465
  run_button.click( # Clear the result
466
  fn=clear_result,
467
  inputs=None,
468
  outputs=result,
469
+ show_api=False
470
  ).then( # Generate the new image
471
  fn=infer,
472
  inputs=[input_image, width_slider, height_slider, overlap_percentage, num_inference_steps,
 
477
  fn=lambda: gr.update(visible=True),
478
  inputs=None,
479
  outputs=use_as_input_button,
480
+ show_api=False
481
  ).then( # Update the history gallery
482
  fn=lambda x, history: update_history(x[1], history),
483
  inputs=[result, history_gallery],
484
  outputs=history_gallery,
485
+ show_api=False
486
  )
487
 
488
  prompt_input.submit( # Clear the result
489
  fn=clear_result,
490
  inputs=None,
491
  outputs=result,
492
+ show_api=False
493
  ).then( # Generate the new image
494
  fn=infer,
495
  inputs=[input_image, width_slider, height_slider, overlap_percentage, num_inference_steps,
496
  resize_option, custom_resize_percentage, prompt_input, alignment_dropdown,
497
  overlap_left, overlap_right, overlap_top, overlap_bottom],
498
  outputs=result,
499
+ show_api=False
500
  ).then( # Update the history gallery
501
  fn=lambda x, history: update_history(x[1], history),
502
  inputs=[result, history_gallery],
503
  outputs=history_gallery,
504
+ show_api=False
505
  ).then( # Show the "Use as Input Image" button
506
  fn=lambda: gr.update(visible=True),
507
  inputs=None,
508
  outputs=use_as_input_button,
509
+ show_api=False
510
  )
511
 
512
  preview_button.click(
 
515
  overlap_left, overlap_right, overlap_top, overlap_bottom],
516
  outputs=preview_image,
517
  queue=False,
518
+ show_api=False
519
  )
520
 
521
+ demo.queue(max_size=12).launch(share=False, show_error=True, mcp_server=True)
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
  torch==2.5.1
2
- spaces
3
  gradio[mcp]
4
  gradio-imageslider
5
  numpy==1.26.4
@@ -8,5 +8,5 @@ accelerate==0.33.0
8
  #diffusers==0.30.3
9
  diffusers==0.32.2
10
  huggingface-hub
11
- fastapi<1.0
12
  opencv-python
 
1
  torch==2.5.1
2
+ spaces==0.37.0
3
  gradio[mcp]
4
  gradio-imageslider
5
  numpy==1.26.4
 
8
  #diffusers==0.30.3
9
  diffusers==0.32.2
10
  huggingface-hub
11
+ fastapi<0.113.0
12
  opencv-python