diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-08 10:47:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-08 10:47:57 +0000 |
commit | d12ccb91a873ff005feaba291782318203a56749 (patch) | |
tree | ef22f374614962980ae2330f753098fd9a2530b6 | |
parent | 2151a9881f3fbb0de52dbfdc83a4dd67cdfbbda6 (diff) | |
parent | c602471b85d270e8c36707817d9bad92b0ff991e (diff) | |
download | stable-diffusion-webui-gfx803-d12ccb91a873ff005feaba291782318203a56749.tar.gz stable-diffusion-webui-gfx803-d12ccb91a873ff005feaba291782318203a56749.tar.bz2 stable-diffusion-webui-gfx803-d12ccb91a873ff005feaba291782318203a56749.zip |
Merge pull request #11631 from AUTOMATIC1111/gif-preview
Allow gif for extra network previews
-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"})
|