Skip to content

Commit

Permalink
Merge pull request #13631 from galekseev/master
Browse files Browse the repository at this point in the history
added option to play notification sound or not
  • Loading branch information
AUTOMATIC1111 authored Oct 14, 2023
2 parents 902afa6 + 44d14bc commit 499543c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/shared_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
}

options_templates.update(options_section(('saving-images', "Saving images/grids"), {
"notification_audio": OptionInfo(True, "Play notification sound after image generation", comment_after="(notification.mp3 should be present in the root directory)").needs_reload_ui(),
"samples_save": OptionInfo(True, "Always save all generated images"),
"samples_format": OptionInfo('png', 'File format for images'),
"samples_filename_pattern": OptionInfo("", "Images filename pattern", component_args=hide_dirs).link("wiki", "https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Images-Filename-Name-and-Subdirectory"),
Expand Down
2 changes: 1 addition & 1 deletion modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ def get_textual_inversion_template_names():

loadsave.setup_ui()

if os.path.exists(os.path.join(script_path, "notification.mp3")):
if os.path.exists(os.path.join(script_path, "notification.mp3")) and shared.opts.notification_audio:
gr.Audio(interactive=False, value=os.path.join(script_path, "notification.mp3"), elem_id="audio_notification", visible=False)

footer = shared.html("footer.html")
Expand Down

0 comments on commit 499543c

Please sign in to comment.