AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
143.46k stars 27.01k forks source link

[Feature Request]: Added notification sound #16664

Open hackedpassword opened 1 week ago

hackedpassword commented 1 week ago

Is there an existing issue for this?

What would your feature do ?

Not do, does. Not sending up as a pull request, more fyi if anyone wants the feature and how to do it.

Does: Upon completion of image generation, or, completion of loading a checkpoint, make a notification sound.

Proposed workflow

shared_total_tqdm.py:

import winsound
...
line 36 +
            sound_file = "C:\\Windows\\Media\\notify.wav"  # Path to the sound file
            winsound.PlaySound(sound_file, winsound.SND_FILENAME)

sd_models.py: same as above, + line 348 after timer.record("load weights from disk")

Additional information

That little notification sound is a very small but huge QoL improvement, imo. Merge if you like/want/whatever.

w-e-w commented 1 week ago

we actually have notification sound https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#notificationmp3 but the way that it is currently implemented it ONLY works on txt2img tab

as in it dose not work on img2img or any other tabs

it should be a simple matter to extend it to other tabs


btw your proposed solution won't really work if you are using a remote server to run webui

hackedpassword commented 1 week ago

Ah, no idea about that, only used locally but makes sense.

hackedpassword commented 1 week ago

@w-e-w I'm reading through the wiki - hadn't actually seen this before, been generally working through trial and error figuring out a1111 organically. Thanks for sharing that link! Already patched several knowledge holes in some of the behind the scenes magic. =)