From dca11dd8061121eeeff248f3ba28fe44621af44c Mon Sep 17 00:00:00 2001 From: Disty0 Date: Thu, 1 May 2025 16:02:50 +0300 Subject: [PATCH] Add jxl to image extension lists --- javascript/gallery.js | 2 +- modules/interrogate/openclip.py | 2 +- modules/interrogate/vqa.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript/gallery.js b/javascript/gallery.js index 39649d5dc..cea21fa12 100644 --- a/javascript/gallery.js +++ b/javascript/gallery.js @@ -126,7 +126,7 @@ class GalleryFile extends HTMLElement { async connectedCallback() { if (this.shadow.children.length > 0) return; const ext = this.name.split('.').pop().toLowerCase(); - if (!['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'mp4'].includes(ext)) return; + if (!['jpg', 'jpeg', 'png', 'gif', 'webp', 'jxl', 'svg', 'mp4'].includes(ext)) return; this.hash = await getHash(`${this.folder}/${this.name}/${this.size}/${this.mtime}`); // eslint-disable-line no-use-before-define const style = document.createElement('style'); const width = opts.browser_fixed_width ? `${opts.extra_networks_card_size}px` : 'unset'; diff --git a/modules/interrogate/openclip.py b/modules/interrogate/openclip.py index 792b4df85..554678642 100644 --- a/modules/interrogate/openclip.py +++ b/modules/interrogate/openclip.py @@ -350,7 +350,7 @@ def interrogate_batch(batch_files, batch_folder, batch_str, clip_model, blip_mod files += [f.name for f in batch_folder] if batch_str is not None and len(batch_str) > 0 and os.path.exists(batch_str) and os.path.isdir(batch_str): from modules.files_cache import list_files - files += list(list_files(batch_str, ext_filter=['.png', '.jpg', '.jpeg', '.webp'], recursive=recursive)) + files += list(list_files(batch_str, ext_filter=['.png', '.jpg', '.jpeg', '.webp', '.jxl'], recursive=recursive)) if len(files) == 0: shared.log.warning('Interrogate batch: type=clip no images') return '' diff --git a/modules/interrogate/vqa.py b/modules/interrogate/vqa.py index b7f6aabb3..6fb81ae26 100644 --- a/modules/interrogate/vqa.py +++ b/modules/interrogate/vqa.py @@ -632,7 +632,7 @@ def batch(model_name, system_prompt, batch_files, batch_folder, batch_str, quest files += [f.name for f in batch_folder] if batch_str is not None and len(batch_str) > 0 and os.path.exists(batch_str) and os.path.isdir(batch_str): from modules.files_cache import list_files - files += list(list_files(batch_str, ext_filter=['.png', '.jpg', '.jpeg', '.webp'], recursive=recursive)) + files += list(list_files(batch_str, ext_filter=['.png', '.jpg', '.jpeg', '.webp', '.jxl'], recursive=recursive)) if len(files) == 0: shared.log.warning('Interrogate batch: type=vlm no images') return ''