cocktailpeanut commited on
Commit
b59ef25
·
1 Parent(s): 91f1fa5
Files changed (1) hide show
  1. gradio_demo/app.py +15 -26
gradio_demo/app.py CHANGED
@@ -193,17 +193,31 @@ css="""
193
  """
194
 
195
  with gr.Blocks() as demo:
196
- with gr.Accordion("More info"):
197
  gr.Markdown(
198
  """
199
  # InstantIR: Blind Image Restoration with Instant Generative Reference.
200
 
201
  ### **Official 🤗 Gradio demo of [InstantIR](https://arxiv.org/abs/2410.06551).**
202
  ### **InstantIR can not only help you restore your broken image, but also capable of imaginative re-creation following your text prompts. See advance usage for more details!**
 
 
 
203
  ## Basic usage: revitalize your image
204
  1. Upload an image you want to restore;
205
  2. Optionally, tune the `Steps` `CFG Scale` parameters. Typically higher steps lead to better results, but less than 50 is recommended for efficiency;
206
  3. Click `InstantIR magic!`.
 
 
 
 
 
 
 
 
 
 
 
207
  """)
208
  with gr.Row():
209
  with gr.Column():
@@ -248,30 +262,5 @@ with gr.Blocks() as demo:
248
  output.change(dynamic_preview_slider, inputs=steps, outputs=index)
249
  index.release(unpack_pipe_out, inputs=[pipe_out, index], outputs=preview)
250
  output.change(show_final_preview, inputs=pipe_out, outputs=preview)
251
- gr.Markdown(
252
- """
253
- ## Advance usage:
254
- ### Browse restoration variants:
255
- 1. After InstantIR processing, drag the `Restoration Previews` slider to explore other in-progress versions;
256
- 2. If you like one of them, set the `Start Free Rendering` slider to the same value to get a more refined result.
257
- ### Creative restoration:
258
- 1. Check the `Creative Restoration` checkbox;
259
- 2. Input your text prompts in the `Restoration prompts` textbox;
260
- 3. Set `Start Free Rendering` slider to a medium value (around half of the `steps`) to provide adequate room for InstantIR creation.
261
- """)
262
- gr.Markdown(
263
- """
264
- ## Citation
265
- If InstantIR is helpful to your work, please cite our paper via:
266
-
267
- ```
268
- @article{huang2024instantir,
269
- title={InstantIR: Blind Image Restoration with Instant Generative Reference},
270
- author={Huang, Jen-Yuan and Wang, Haofan and Wang, Qixun and Bai, Xu and Ai, Hao and Xing, Peng and Huang, Jen-Tse},
271
- journal={arXiv preprint arXiv:2410.06551},
272
- year={2024}
273
- }
274
- ```
275
- """)
276
 
277
  demo.queue().launch()
 
193
  """
194
 
195
  with gr.Blocks() as demo:
196
+ with gr.Accordion("How to Use", open=False):
197
  gr.Markdown(
198
  """
199
  # InstantIR: Blind Image Restoration with Instant Generative Reference.
200
 
201
  ### **Official 🤗 Gradio demo of [InstantIR](https://arxiv.org/abs/2410.06551).**
202
  ### **InstantIR can not only help you restore your broken image, but also capable of imaginative re-creation following your text prompts. See advance usage for more details!**
203
+
204
+ ---
205
+
206
  ## Basic usage: revitalize your image
207
  1. Upload an image you want to restore;
208
  2. Optionally, tune the `Steps` `CFG Scale` parameters. Typically higher steps lead to better results, but less than 50 is recommended for efficiency;
209
  3. Click `InstantIR magic!`.
210
+
211
+ ---
212
+
213
+ ## Advanced usage:
214
+ ### Browse restoration variants:
215
+ 1. After InstantIR processing, drag the `Restoration Previews` slider to explore other in-progress versions;
216
+ 2. If you like one of them, set the `Start Free Rendering` slider to the same value to get a more refined result.
217
+ ### Creative restoration:
218
+ 1. Check the `Creative Restoration` checkbox;
219
+ 2. Input your text prompts in the `Restoration prompts` textbox;
220
+ 3. Set `Start Free Rendering` slider to a medium value (around half of the `steps`) to provide adequate room for InstantIR creation.
221
  """)
222
  with gr.Row():
223
  with gr.Column():
 
262
  output.change(dynamic_preview_slider, inputs=steps, outputs=index)
263
  index.release(unpack_pipe_out, inputs=[pipe_out, index], outputs=preview)
264
  output.change(show_final_preview, inputs=pipe_out, outputs=preview)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
 
266
  demo.queue().launch()