Skip to content

Commit df9b610

Browse files
committed
Moved links to Settings tab
1 parent 4300373 commit df9b610

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

update_log_mre.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### 2.0.0 MRE
22

33
* Changed Prompt Expansion (aka Fooocus V2) to be enabled by default.
4+
* Moved links to Settings tab.
45

56
### 1.0.67 MRE
67

webui.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,16 @@ def output_to_revision_handler(gallery):
306306
seed_random = gr.Checkbox(label='Random', value=settings['seed_random'])
307307
same_seed_for_all = gr.Checkbox(label='Same seed for all images', value=settings['same_seed_for_all'])
308308
image_seed = gr.Textbox(label='Seed', value=settings['seed'], max_lines=1, visible=not settings['seed_random'])
309-
with gr.Row():
310-
load_prompt_button = gr.UploadButton(label='Load Prompt', file_count='single', file_types=['.json', '.png', '.jpg'], elem_classes='type_small_row', min_width=0)
309+
load_prompt_button = gr.UploadButton(label='Load Prompt', file_count='single', file_types=['.json', '.png', '.jpg'], elem_classes='type_small_row', min_width=0)
310+
311+
def get_current_links():
312+
return '<a href="https://github.com/lllyasviel/Fooocus/discussions/117">&#128212; Fooocus Advanced</a>' \
313+
+ ' <a href="https://github.com/MoonRide303/Fooocus-MRE/wiki">&#128212; Fooocus-MRE Wiki</a>' \
314+
+ ' <a href="https://ko-fi.com/moonride" target="_blank">&#9749; Ko-fi</a> <br>' \
315+
+ f' <a href="/file={get_current_log_path()}" target="_blank">&#128212; Current Log</a>' \
316+
+ f' <a href="/file={get_previous_log_path()}" target="_blank">&#128212; Previous Log</a>'
317+
318+
links = gr.HTML(value=get_current_links())
311319

312320
def random_checked(r):
313321
return gr.update(visible=not r)
@@ -413,7 +421,6 @@ def verify_revision(rev, gallery_in, gallery_rev, gallery_out):
413421
'dpmpp_sde_gpu', 'dpmpp_sde', 'dpmpp_2m', 'dpmpp_2s_ancestral', 'euler', 'euler_ancestral', 'heun', 'dpm_2', 'dpm_2_ancestral'], value=settings['sampler'])
414422
scheduler = gr.Dropdown(label='Scheduler', choices=['karras', 'exponential', 'simple', 'ddim_uniform'], value=settings['scheduler'])
415423
sharpness = gr.Slider(label='Sampling Sharpness', minimum=0.0, maximum=30.0, step=0.01, value=settings['sharpness'])
416-
gr.HTML('<a href="https://github.com/lllyasviel/Fooocus/discussions/117">\U0001F4D4 Document</a>')
417424

418425
def model_refresh_clicked():
419426
modules.path.update_all_model_names()
@@ -427,17 +434,10 @@ def model_refresh_clicked():
427434

428435

429436
with gr.Tab(label='Misc'):
430-
def get_current_links():
431-
return '<a href="https://github.com/MoonRide303/Fooocus-MRE/wiki">&#128212; Fooocus-MRE Wiki</a>' \
432-
+ f' <a href="/file={get_current_log_path()}" target="_blank">&#128212; Current Log</a>' \
433-
+ f' <a href="/file={get_previous_log_path()}" target="_blank">&#128212; Previous Log</a>' \
434-
+ f' <a href="https://ko-fi.com/moonride" target="_blank">&#9749; Ko-fi</a>'
435-
436437
output_format = gr.Radio(label='Output Format', choices=['png', 'jpg'], value=settings['output_format'])
437438
with gr.Row():
438439
save_metadata_json = gr.Checkbox(label='Save Metadata in JSON', value=settings['save_metadata_json'])
439440
save_metadata_image = gr.Checkbox(label='Save Metadata in Image', value=settings['save_metadata_image'])
440-
links = gr.HTML(value=get_current_links())
441441
metadata_viewer = gr.JSON(label='Metadata')
442442

443443
advanced_checkbox.change(lambda x: gr.update(visible=x), advanced_checkbox, advanced_column)

0 commit comments

Comments
 (0)