Compare commits

...
1 Commits
Author SHA1 Message Date
audioscavenger c87b890b32 release 2.86 bugfix in counter_digits which does not accept 0 to disable counter
modified:   README.md
    	modified:   pyproject.toml
    	modified:   save_image_extended.py
	modified:   README.md
	modified:   pyproject.toml
	modified:   save_image_extended.py
2025-08-02 10:18:18 -07:00
3 changed files with 7 additions and 4 deletions
+3
View File
@@ -215,6 +215,9 @@ TODO:
- [x] PIL.Image doesn't respect compress_level value and always output max 9 compressed images -> when optimize_image = True! So we turn that off for PNG
- [x] TODO: test import cv2 / OpenCV: https://github.com/python-pillow/Pillow/issues/5986 -> not faster then PIL
### release 2.86 💾
- bugfix in counter_digits which does not accept 0 to disable counter
### release 2.85 💾
- issue/51: #31 #49 API mode KeyError - fix by adding empty {} to the metadata for the API call
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "save-image-extended-comfyui"
description = "Save as JXL, AVIF, WebP, JPEG, JPEG2k, customize the folder, sub-folders, and filenames of your images!"
version = "2.85"
version = "2.86"
license = { file = "LICENSE" }
dependencies = ["piexif", "imagecodecs", "pillow", "pillow-avif-plugin", "pillow-jxl-plugin"]
+3 -3
View File
@@ -14,7 +14,7 @@ import numpy
# import cv2 # not faster then PIL
version = 2.85
version = 2.86
avif_supported = False
jxl_supported = False
@@ -177,7 +177,7 @@ ComfyUI can only load PNG and WebP at the moment, AVIF is a PR that was sadly dr
"max": 8,
"step": 1,
"display": "silder",
'tooltip': "umber of digits used for the image counter. `3` = image_001.png, based on highest number in the subfolder, ignores gaps. **Can be disabled** when == 0"
'tooltip': "Number of digits used for the image counter. `3` = image_001.png, based on highest number in the subfolder, ignores gaps. **Can be disabled** when == 0"
}),
'counter_position': (self.counter_positions, {'default': self.counter_position, 'tooltip': "Image counter postition: image_001.png or 001_image.png"}),
'one_counter_per_folder': ('BOOLEAN', {'default': self.one_counter_per_folder, 'tooltip': "deprecated but I cannot remove it of all your saved prompts will break"}),
@@ -259,7 +259,7 @@ ComfyUI can only load PNG and WebP at the moment, AVIF is a PR that was sadly dr
# issue/48 needs a special case for files, counter_position does not matter here, but the filename length does
if not filename:
counters = [int(file[:counter_digits]) if (file[:counter_digits].isdecimal() and len(file)==(counter_digits+extLen)) else 0 for file in files]
[1, 0, 0, 0]
# [1, 0, 0, 0]
else:
if counter_position == 'last':
counters = [int(file[-(extLen + counter_digits):-extLen]) if file[-(extLen + counter_digits):-extLen].isdecimal() else 0 for file in files if file.startswith(filename)]