mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Merge pull request #10367 from AUTOMATIC1111/jpeg-extra-network-preview
allow jpeg for extra network preview
This commit is contained in:
commit
3ddc763422
@ -30,7 +30,7 @@ def fetch_file(filename: str = ""):
|
|||||||
raise ValueError(f"File cannot be fetched: {filename}. Must be in one of directories registered by extra pages.")
|
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()
|
ext = os.path.splitext(filename)[1].lower()
|
||||||
if ext not in (".png", ".jpg", ".webp"):
|
if ext not in (".png", ".jpg", ".jpeg", ".webp"):
|
||||||
raise ValueError(f"File cannot be fetched: {filename}. Only png and jpg and webp.")
|
raise ValueError(f"File cannot be fetched: {filename}. Only png and jpg and webp.")
|
||||||
|
|
||||||
# would profit from returning 304
|
# would profit from returning 304
|
||||||
@ -194,7 +194,7 @@ class ExtraNetworksPage:
|
|||||||
Find a preview PNG for a given path (without extension) and call link_preview on it.
|
Find a preview PNG for a given path (without extension) and call link_preview on it.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
preview_extensions = ["png", "jpg", "webp"]
|
preview_extensions = ["png", "jpg", "jpeg", "webp"]
|
||||||
if shared.opts.samples_format not in preview_extensions:
|
if shared.opts.samples_format not in preview_extensions:
|
||||||
preview_extensions.append(shared.opts.samples_format)
|
preview_extensions.append(shared.opts.samples_format)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user