Skip to content

Commit

Permalink
Merge remote-tracking branch 'original/main' into feature/2.4.1-merge
Browse files Browse the repository at this point in the history
# Conflicts:
#	modules/private_logger.py
#	readme.md
#	webui.py
  • Loading branch information
machineminded committed May 28, 2024
2 parents f57cc31 + 725bf05 commit a825235
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 4 additions & 0 deletions modules/async_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def yield_result(async_task, imgs, black_out_nsfw, censor=True, do_not_show_fini
progressbar(async_task, progressbar_index, 'Checking for NSFW content ...')
imgs = default_censor(imgs)

if censor and (modules.config.default_black_out_nsfw or black_out_nsfw):
progressbar(async_task, progressbar_index, 'Checking for NSFW content ...')
imgs = default_censor(imgs)

async_task.results = async_task.results + imgs

if do_not_show_finished_images:
Expand Down
11 changes: 2 additions & 9 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def ip_advance_checked(x):
value=flags.desc_type_photo)
desc_btn = gr.Button(value='Describe this Image into Prompt')
desc_image_size = gr.Textbox(label='Image Size and Recommended Size', elem_id='desc_image_size', visible=False)
desc_image_size = gr.Textbox(label='Image Size and Recommended Size', elem_id='desc_image_size', visible=False)
gr.HTML('<a href="https://github.com/lllyasviel/Fooocus/discussions/1363" target="_blank">\U0001F4D4 Document</a>')
def trigger_show_image_properties(image):
value = modules.util.get_image_size_info(image, modules.flags.sdxl_aspect_ratios)
Expand Down Expand Up @@ -804,15 +805,7 @@ def trigger_metadata_import(filepath, state_is_generating):
reset_button, stop_button, skip_button,
progress_html, progress_window, progress_gallery, gallery],
queue=False)

reset_button.click(lambda: [worker.AsyncTask(args=[]), False, gr.update(visible=True, interactive=True)] +
[gr.update(visible=False)] * 6 +
[gr.update(visible=True, value=[])],
outputs=[currentTask, state_is_generating, generate_button,
reset_button, stop_button, skip_button,
progress_html, progress_window, progress_gallery, gallery],
queue=False)


for notification_file in ['notification.ogg', 'notification.mp3']:
if os.path.exists(notification_file):
gr.Audio(interactive=False, value=notification_file, elem_id='audio_notification', visible=False)
Expand Down

0 comments on commit a825235

Please sign in to comment.