|
18 | 18 | from comfy.model_management import interrupt_current_processing
|
19 | 19 | from fastapi import FastAPI
|
20 | 20 | from modules.ui_gradio_extensions import reload_javascript
|
| 21 | +from modules.util import get_current_log_path, get_previous_log_path |
| 22 | + |
21 | 23 |
|
22 | 24 | GALLERY_ID_INPUT = 0
|
23 | 25 | GALLERY_ID_REVISION = 1
|
@@ -413,11 +415,19 @@ def model_refresh_clicked():
|
413 | 415 |
|
414 | 416 | model_refresh.click(model_refresh_clicked, [], [base_model, refiner_model] + lora_ctrls)
|
415 | 417 |
|
| 418 | + |
416 | 419 | with gr.Tab(label='Misc'):
|
| 420 | + def get_current_links(): |
| 421 | + return '<a href="https://github.com/MoonRide303/Fooocus-MRE/wiki">📔 Fooocus-MRE Wiki</a>' \ |
| 422 | + + f' <a href="/file={get_current_log_path()}" target="_blank">📔 Current Log</a>' \ |
| 423 | + + f' <a href="/file={get_previous_log_path()}" target="_blank">📔 Previous Log</a>' \ |
| 424 | + + f' <a href="https://ko-fi.com/moonride" target="_blank">☕ Ko-fi</a>' |
| 425 | + |
417 | 426 | output_format = gr.Radio(label='Output Format', choices=['png', 'jpg'], value=settings['output_format'])
|
418 | 427 | with gr.Row():
|
419 | 428 | save_metadata_json = gr.Checkbox(label='Save Metadata in JSON', value=settings['save_metadata_json'])
|
420 | 429 | save_metadata_image = gr.Checkbox(label='Save Metadata in Image', value=settings['save_metadata_image'])
|
| 430 | + links = gr.HTML(value=get_current_links()) |
421 | 431 | metadata_viewer = gr.JSON(label='Metadata')
|
422 | 432 |
|
423 | 433 | advanced_checkbox.change(lambda x: gr.update(visible=x), advanced_checkbox, advanced_column)
|
@@ -448,7 +458,8 @@ def verify_input(img2img, canny, gallery_in, gallery_rev, gallery_out):
|
448 | 458 | .then(fn=verify_input, inputs=[img2img_mode, control_lora_canny, input_gallery, revision_gallery, output_gallery], outputs=[img2img_mode, control_lora_canny, input_gallery]) \
|
449 | 459 | .then(fn=verify_revision, inputs=[revision_mode, input_gallery, revision_gallery, output_gallery], outputs=[revision_mode, revision_gallery]) \
|
450 | 460 | .then(fn=generate_clicked, inputs=ctrls + [input_gallery, revision_gallery, keep_input_names],
|
451 |
| - outputs=[generate_button, stop_button, progress_html, progress_window, gallery_holder, output_gallery, metadata_viewer, gallery_tabs]) |
| 461 | + outputs=[generate_button, stop_button, progress_html, progress_window, gallery_holder, output_gallery, metadata_viewer, gallery_tabs]) \ |
| 462 | + .then(fn=get_current_links, inputs=None, outputs=links) |
452 | 463 |
|
453 | 464 | def stop_clicked():
|
454 | 465 | interrupt_current_processing()
|
|
0 commit comments