diff options
author | willtakasan <126040162+willtakasan@users.noreply.github.com> | 2023-03-14 06:36:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 06:36:08 +0000 |
commit | 4281432594084bc846cc834c807ac57f59457eae (patch) | |
tree | aebe389c342603e09774b5fadc364cf7ca80e995 /modules/ui_extra_networks.py | |
parent | c19530f1a590d758463f84523dd4c48c34d723e6 (diff) | |
download | stable-diffusion-webui-gfx803-4281432594084bc846cc834c807ac57f59457eae.tar.gz stable-diffusion-webui-gfx803-4281432594084bc846cc834c807ac57f59457eae.tar.bz2 stable-diffusion-webui-gfx803-4281432594084bc846cc834c807ac57f59457eae.zip |
Update ui_extra_networks.py
I updated it so that no error message is displayed when setting a webp for the preview image.
Diffstat (limited to 'modules/ui_extra_networks.py')
-rw-r--r-- | modules/ui_extra_networks.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index b5847299..cdfd6f2a 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -30,8 +30,8 @@ def add_pages_to_demo(app): raise ValueError(f"File cannot be fetched: {filename}. Must be in one of directories registered by extra pages.")
ext = os.path.splitext(filename)[1].lower()
- if ext not in (".png", ".jpg"):
- raise ValueError(f"File cannot be fetched: {filename}. Only png and jpg.")
+ if ext not in (".png", ".jpg", ".webp"):
+ raise ValueError(f"File cannot be fetched: {filename}. Only png and jpg and webp.")
# would profit from returning 304
return FileResponse(filename, headers={"Accept-Ranges": "bytes"})
|