diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-10-14 04:30:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 04:30:31 +0000 |
commit | 499543cf1deb382ef9414e601ebef0015248b7ea (patch) | |
tree | 933d2d0ced515e149b118b4980e73a4ddd838c37 | |
parent | 902afa6b4cdaba5820d07631b039158a56ab1403 (diff) | |
parent | 44d14bc32e4a5501df04f844a00f9e18b777f7eb (diff) | |
download | stable-diffusion-webui-gfx803-499543cf1deb382ef9414e601ebef0015248b7ea.tar.gz stable-diffusion-webui-gfx803-499543cf1deb382ef9414e601ebef0015248b7ea.tar.bz2 stable-diffusion-webui-gfx803-499543cf1deb382ef9414e601ebef0015248b7ea.zip |
Merge pull request #13631 from galekseev/master
added option to play notification sound or not
-rw-r--r-- | modules/shared_options.py | 1 | ||||
-rw-r--r-- | modules/ui.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/shared_options.py b/modules/shared_options.py index ab9b0072..cb356638 100644 --- a/modules/shared_options.py +++ b/modules/shared_options.py @@ -22,6 +22,7 @@ restricted_opts = { }
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"),
diff --git a/modules/ui.py b/modules/ui.py index 3d1f5285..bcf39199 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1296,7 +1296,7 @@ def create_ui(): 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")
|