diff options
author | missionfloyd <missionfloyd@users.noreply.github.com> | 2023-07-05 09:19:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-05 09:19:26 +0000 |
commit | c602471b85d270e8c36707817d9bad92b0ff991e (patch) | |
tree | 9f74e818ebf3564399814cb7aa046cd7e3221d19 /modules | |
parent | 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8 (diff) | |
download | stable-diffusion-webui-gfx803-c602471b85d270e8c36707817d9bad92b0ff991e.tar.gz stable-diffusion-webui-gfx803-c602471b85d270e8c36707817d9bad92b0ff991e.tar.bz2 stable-diffusion-webui-gfx803-c602471b85d270e8c36707817d9bad92b0ff991e.zip |
Allow gif for extra network previews
Diffstat (limited to 'modules')
-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 a7d3bc79..1efd00b0 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -30,8 +30,8 @@ def fetch_file(filename: str = ""): 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", ".jpeg", ".webp"):
- raise ValueError(f"File cannot be fetched: {filename}. Only png and jpg and webp.")
+ if ext not in (".png", ".jpg", ".jpeg", ".webp", ".gif"):
+ raise ValueError(f"File cannot be fetched: {filename}. Only png, jpg, webp, and gif.")
# would profit from returning 304
return FileResponse(filename, headers={"Accept-Ranges": "bytes"})
|