stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Image format setting not respected
I set the time format to jpg but still get PNG images.
To Reproduce Steps to reproduce the behavior:
- Go to Settings, "File format for images"
- set it to "jpg"
- Click "Apply settings"
- Generate any image and check the file format returned by webui
- Note that it's a half megabyte png file and get annoyed
Expected behavior Since I set jpg quality to 60, I expect generated images to be around 50kb jpg files, but instead I get 500kb PNG files
Desktop:
- OS: Windows 10
- Browser: Chrome
- Commit revision: ec1924ee5789b72c31c65932b549c59ccae0cdd6
Additional context It is useful to have the interface use jpg files to facilitate remote access and usage on metered and low bitrate connections, I think this setting used to work fine.
I was also confused by this. I think the setting only applies for the images produced when you click the "save" button. Ideally it'd apply to the images that are actually returned in the grid.
So ... is this unwittingly a feature request and not a bug?
According to, this comment on #455, as of September 27, Gradio only supports base64 png.
@timntorres I'm not sure what was meant by the comment you linked - perhaps I'm not understanding what feature was being requested in that thread. But it's definitely not relevant to this feature request, because this one has to do with the images displayed in the txt2img tab, which are linked as png
files from the /tmp/
directory, rather than being base64 strings.
I made a comment on that thread asking for clarification.
@josephrocca I'm pretty sure both cases deal with temp files made by Gradio (as corroborated here), so both cases would be an upstream issue
@judgeou's suggestion on Issue 455 is interesting, though. If I'm not wrong, it involves editing the HTML directly so that src
is a webp instead of that temp png?
Apparently the base64 limitation has been removed since the comment on #455 that you mentioned, so IIUC this feature request is not hindered by that anymore.
Gradio.Image and Gradio.Gallery can display the PIL.Image directly on the web page, which is convenient. But the price is that it is not very easy to extend, unless you do some dirty work, or just wait Gradio to fix it
I still really want this but I can't see a way to convert this bug issue to a feature request. Should I just close it and open a new feature request?
I still really want this but I can't see a way to convert this bug issue to a feature request. Should I just close it and open a new feature request?
@judgeou's link is broken, but it seemed to link to a relevant fix that unfortunately broke 4 days ago.
going to make a feature request if I can't find one already extant.