release 2.46
- bug discovered with *rgthree's Ksampler Config*: using `steps_total` as an input to a Ksampler, will issue the index of the output, instead of the steps value ("\[nodeNum, 0]" instead of steps value). FIX: use `steps_total` instead of `steps`!
- uncommented \_\_all\_\_ in init.py
- potential bugfix in splitKey, `len(splitKey) = 2` to identify actual "node.widget" format
modified: README.md
modified: __init__.py
new file: assets/bug-rgthree-ksampler_config-steps_total.png
modified: save_image_extended.py
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# 💾 Save Image Extended for ComfyUI
|
||||
**AVIF** support!
|
||||
**AVIF** and **WebP** support!
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/save-image-extended-comfyui-example.png" />
|
||||
@@ -8,7 +8,7 @@
|
||||
* Customize the folder, sub-folders, and filenames of your images!
|
||||
* Save data about the generated job (sampler, prompts, models) as entries in a `json` (text) file, in each folder.
|
||||
* Use the values of ANY node's widget, by simply adding its badge number in the form _id.widget_name_:
|
||||
* Oh btw... also saves your output as **WebP** or **JPEG**... And yes the prompt is included :) ComfyUI can load it but a PR approval is needed.
|
||||
* Oh btw... also saves your output as **WebP** / **JPEG** / **AVIP** ... And yes the prompt is included :) ComfyUI can load it but a PR approval is needed to fix a bug on their side.
|
||||
|
||||
|
||||
<br>
|
||||
@@ -84,6 +84,9 @@ Quality and compression settings:
|
||||
* JPEG quality is fixed at 91.
|
||||
* PNG is maxed compressed (9)
|
||||
|
||||
Start a discussion or a poll if you want to change output quality, and add another attribute in the node. There's so many already, some complain about the node being too tall.
|
||||
|
||||
|
||||
#
|
||||
About extensions WebP AVIF JPEG: ComfyUI cannot load it atm... Feel free to ask ComfyUI team to add support for AVIF/WebP/jpeg!
|
||||
|
||||
@@ -119,12 +122,11 @@ jobs.json sample:
|
||||
## RoadMap
|
||||
|
||||
I won't promise anything, just like @thedyze did not promise anything when they released this custom node.
|
||||
Then disappeared for good 3 months later. That's fine, I do that too.
|
||||
Then disappeared for good 3 months later. That's fine, I do that too somtimes :)
|
||||
|
||||
However, I do provide a way to contact me, and will accept PR and collabs.
|
||||
Once I feel like I don't have time to work on it, I will gladly transfer ownership or let collabs maintain it.
|
||||
|
||||
- [ ] ComfyRoll has icons in the titles, these are just utf8 emojis but I want that too!
|
||||
- [ ] ComfyRoll CR XY Save Grid Image: it offers jpeg webp tif - check how it embeds prompt and see if that works better with Comfy!
|
||||
- [ ] offer quality setting in the node?
|
||||
- [ ] remove save_job_to_json? thisis pretty much useless actually, since it only saves the last value found for each node.
|
||||
@@ -134,6 +136,11 @@ Once I feel like I don't have time to work on it, I will gladly transfer ownersh
|
||||
- [ ] offer to place the counter anywhere, as a key in filename_keys
|
||||
- [ ] files can get out of order if prefixes change... that is expected, but is this what we want? another reason to have the counter place anywhere we want
|
||||
|
||||
### release 2.46 💾
|
||||
- bug discovered with *rgthree's Ksampler Config*: using `steps_total` as an input to a Ksampler, will issue the index of the output, instead of the steps value ("\[nodeNum, 0]" instead of steps value). FIX: use `steps_total` instead of `steps`!
|
||||
- uncommented \_\_all\_\_ in init.py
|
||||
- potential bugfix in splitKey, `len(splitKey) = 2` to identify actual "node.widget" format
|
||||
|
||||
### release 2.45 💾
|
||||
- added 💾 in the name
|
||||
|
||||
|
||||
+1
-1
@@ -13,4 +13,4 @@
|
||||
|
||||
from .save_image_extended import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
|
||||
|
||||
# __all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
|
||||
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
@@ -26,7 +26,7 @@ original_locale = locale.setlocale(locale.LC_TIME, '')
|
||||
|
||||
# class SaveImageExtended -------------------------------------------------------------------------------
|
||||
class SaveImageExtended:
|
||||
version = 2.45
|
||||
version = 2.46
|
||||
type = 'output'
|
||||
|
||||
png_compress_level = 9
|
||||
@@ -219,7 +219,6 @@ class SaveImageExtended:
|
||||
# print(f"debug generate_custom_name: --prefix: {prefix}")
|
||||
# print(f"debug generate_custom_name: --keys_to_extract: {keys_to_extract}")
|
||||
# print(f"debug generate_custom_name: --prompt:")
|
||||
# pprint.pprint(prompt)
|
||||
|
||||
# now separating numbered keys from non-numbered keys:
|
||||
# 37.ckpt_name = i want the ckpt_name from node #37
|
||||
@@ -234,12 +233,12 @@ class SaveImageExtended:
|
||||
|
||||
# check if this is a subfolder: starts with ./ or /, can also end with /
|
||||
if '/' in key:
|
||||
# key is a fsubfolder
|
||||
# key is a subfolder: ./subfolder or ../subfolder or /subfolder
|
||||
value = key
|
||||
else:
|
||||
splitKey = key.split('.')
|
||||
# we also exclude cases like "string." or ".string" or "string.string"
|
||||
if len(splitKey) > 1:
|
||||
# we also exclude cases like "..string" or "sting.string.x" etc
|
||||
if len(splitKey) == 2:
|
||||
# key has the form string.string
|
||||
if '' not in splitKey:
|
||||
# key has the form string.string
|
||||
@@ -258,10 +257,10 @@ class SaveImageExtended:
|
||||
# key is in the form string.string = fixed string
|
||||
value = self.cleanup_fileName(key)
|
||||
else:
|
||||
# key is in the form ".string" or "string." or "." - we won't clean that up and keep as is
|
||||
# key is in the form ".string" or "string." or "." - we won't clean that up and keep as is, maybe it's a separator
|
||||
value = key
|
||||
else:
|
||||
# nodeKey is not a folder, has no dot, could be a valid key to find, could be a fixed string - keep as is
|
||||
# nodeKey is not a folder, has no dot, or multiple dots, could be a valid key to find, could be a fixed string - keep as is
|
||||
nodeKey = key
|
||||
self.find_keys_recursively(prompt, [nodeKey], found_values)
|
||||
# is key num.widget_name
|
||||
@@ -537,6 +536,9 @@ class SaveImageExtended:
|
||||
filename_keys_to_extract = [item.strip() for item in filename_keys.split(',')]
|
||||
foldername_keys_to_extract = [item.strip() for item in foldername_keys.split(',')]
|
||||
|
||||
################################## UNCOMMENT HERE TO SEE THE ENTIRE PROMPT
|
||||
# pprint.pprint(prompt)
|
||||
##########################################################################
|
||||
custom_filename = self.generate_custom_name(filename_keys_to_extract, filename_prefix, delimiter, prompt)
|
||||
custom_foldername = self.generate_custom_name(foldername_keys_to_extract, foldername_prefix, delimiter, prompt)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user