From a75e901318e4a0e407b9ea96d23eb8b2e7be480e Mon Sep 17 00:00:00 2001 From: audioscavenger Date: Wed, 4 Dec 2024 20:57:21 -0700 Subject: [PATCH] WIP 2.77 - fix in ckpt_path: will only build subfolders if ckpt_name is also used: https://github.com/audioscavenger/save-image-extended-comfyui/pull/38 - fix for too much rounding of floats (did not affect actual value in prompt saved inside the image) modified: README.md modified: pyproject.toml modified: save_image_extended.py --- README.md | 4 ++++ pyproject.toml | 2 +- save_image_extended.py | 7 ++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2cc901a..45fde5e 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,10 @@ TODO: - [ ] keep same counter if extension changes? - [ ] files will be out of order if prefixes change... that is expected, but is this what we want? +### release 2.77 💾 +- fix in ckpt_path: will only build subfolders if ckpt_name is also used: https://github.com/audioscavenger/save-image-extended-comfyui/pull/38 +- fix for too much rounding of floats (did not affect actual value in prompt saved inside the image) + ### release 2.76 💾 - brought back resolution diff --git a/pyproject.toml b/pyproject.toml index 8225a7e..3e621ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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.76" +version = "2.77" license = { file = "LICENSE" } dependencies = ["piexif", "imagecodecs", "pillow", "pillow-avif-plugin", "pillow-jxl-plugin"] diff --git a/save_image_extended.py b/save_image_extended.py index 35732ad..ca976b6 100644 --- a/save_image_extended.py +++ b/save_image_extended.py @@ -11,7 +11,7 @@ import pprint import piexif import piexif.helper -version = 2.76 +version = 2.77 avif_supported = False jxl_supported = False @@ -63,7 +63,7 @@ It is strongly advised to enable Badge numbers in the Manager: _#ID Nickname_ - if you don't specify the node number in your keys like _13.sampler_name_, - then the highest node number value will be returned - if your checkpoint/controlnet is in subfolders like SDXL/whatnot, `ckpt_name` will **not** have subfolders - - to get the subfolders from controlnets and checkpoints, use _ckpt_path_ and _control_net_path_ + - to get the subfolders from controlnets and checkpoints, add _ckpt_path_ and _control_net_path_ in *addition* to _ckpt_name_ or _control_net_name_ ### subfolders - you can use `/` as the separator, or use keys such as `/name` or `name/` as a folder separator @@ -453,7 +453,8 @@ ComfyUI can only load PNG and WebP at the moment, AVIF is a PR still not merged. delim = '' if isinstance(value, float): - value = round(float(value), 1) + # value = round(float(value), 1) # too much rounding + value = float(f'{value:.10g}') custom_name += f"{delim}{value}" # print(f"debug generate_custom_name: ------custom_name: {custom_name}")