Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a88722ce8f | ||
|
|
c0b66c4e07 | ||
|
|
d191668607 | ||
|
|
a70cbb0c8d | ||
|
|
b95499617e | ||
|
|
77095ee38b | ||
|
|
1e59445091 | ||
|
|
b3e66eb21c | ||
|
|
145fbbb158 | ||
|
|
7c215dde00 | ||
|
|
07a1a5314d | ||
|
|
ed6533422e | ||
|
|
278e32450f | ||
|
|
b248fcf346 | ||
|
|
4b35b41d08 | ||
|
|
af96defbe0 | ||
|
|
e8ca90fe35 | ||
|
|
659d35b9b8 | ||
|
|
ee54281e45 | ||
|
|
f94e130bef | ||
|
|
6ab1534e85 | ||
|
|
d960b6dbf1 | ||
|
|
0d0afd7f45 | ||
|
|
2069d0c4fc | ||
|
|
55a57a3b2e |
@@ -0,0 +1,22 @@
|
|||||||
|
name: Publish to Comfy registry
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- "pyproject.toml"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-node:
|
||||||
|
name: Publish Custom Node to registry
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Publish Custom Node
|
||||||
|
uses: Comfy-Org/publish-node-action@main
|
||||||
|
with:
|
||||||
|
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||||
@@ -1,4 +1,34 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
## v1.3.4
|
||||||
|
> [!TIP]
|
||||||
|
> Starting from v1.3, to support auto-detection on Civitai, `calculate_model_hash` will be renamed as
|
||||||
|
> `calculate_hash` and it will be enabled by default. Due to the addition of temporary storage of the model hash values,
|
||||||
|
> the first image generated after switching to the new model will take more time to calculate the hash value,
|
||||||
|
> but it will not affect the generation speed afterwards until the server is restarted.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> comfyui-prompt-reader-node is now published on the [Comfy Registry](https://www.comfyregistry.org/).
|
||||||
|
|
||||||
|
- Add `Any Converter` node #76 #78
|
||||||
|
- Fix the input validation of the `Parameter Generator` node #89
|
||||||
|
- Fix the input validation of the `Parameter Extractor` node #90
|
||||||
|
- Fix the `Parameter Generator` unable to choose standard resolutions #82
|
||||||
|
- Fix the `Prompt Saver` unable to correctly handle filenames containing `.` #80
|
||||||
|
- Update the `Parameter Extractor` node to support parsing quoted parameters #87 @spagatticode
|
||||||
|
- Update PyProject Toml - License #85 @haohaocreates
|
||||||
|
|
||||||
|
## v1.3.3
|
||||||
|
> [!TIP]
|
||||||
|
> Starting from v1.3, to support auto-detection on Civitai, `calculate_model_hash` will be renamed as
|
||||||
|
> `calculate_hash` and it will be enabled by default. Due to the addition of temporary storage of the model hash values,
|
||||||
|
> the first image generated after switching to the new model will take more time to calculate the hash value,
|
||||||
|
> but it will not affect the generation speed afterwards until the server is restarted.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> comfyui-prompt-reader-node is now published on the [Comfy Registry](https://www.comfyregistry.org/).
|
||||||
|
|
||||||
|
- Add pyproject.toml for Custom Node Registry #75 @haohaocreates
|
||||||
|
|
||||||
## v1.3.2
|
## v1.3.2
|
||||||
> Starting from v1.3, to support auto-detection on Civitai, `calculate_model_hash` will be renamed as
|
> Starting from v1.3, to support auto-detection on Civitai, `calculate_model_hash` will be renamed as
|
||||||
> `calculate_hash` and it will be enabled by default. Due to the addition of temporary storage of the model hash values,
|
> `calculate_hash` and it will be enabled by default. Due to the addition of temporary storage of the model hash values,
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
VERSION = "1.3.2"
|
VERSION = "1.3.4"
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
@@ -357,11 +357,11 @@ class SDPromptSaver:
|
|||||||
"lora_name": any_type,
|
"lora_name": any_type,
|
||||||
"width": (
|
"width": (
|
||||||
"INT",
|
"INT",
|
||||||
{"default": 1, "min": 1, "max": MAX_RESOLUTION, "step": 8},
|
{"default": 1, "min": 1, "max": MAX_RESOLUTION, "step": 1},
|
||||||
),
|
),
|
||||||
"height": (
|
"height": (
|
||||||
"INT",
|
"INT",
|
||||||
{"default": 1, "min": 1, "max": MAX_RESOLUTION, "step": 8},
|
{"default": 1, "min": 1, "max": MAX_RESOLUTION, "step": 1},
|
||||||
),
|
),
|
||||||
"positive": ("STRING", {"default": "", "multiline": True}),
|
"positive": ("STRING", {"default": "", "multiline": True}),
|
||||||
"negative": ("STRING", {"default": "", "multiline": True}),
|
"negative": ("STRING", {"default": "", "multiline": True}),
|
||||||
@@ -669,13 +669,13 @@ class SDPromptSaver:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_unique_filename(stem: Path, extension: str, output_folder: Path):
|
def get_unique_filename(stem: Path, extension: str, output_folder: Path):
|
||||||
file = stem.with_suffix(f".{extension}")
|
file = stem.with_suffix(f"{stem.suffix}.{extension}")
|
||||||
index = 0
|
index = 0
|
||||||
|
|
||||||
while (output_folder / file).exists():
|
while (output_folder / file).exists():
|
||||||
index += 1
|
index += 1
|
||||||
new_stem = f"{stem}_{index}"
|
new_stem = Path(f"{stem}_{index}")
|
||||||
file = Path(new_stem).with_suffix(f".{extension}")
|
file = new_stem.with_suffix(f"{new_stem.suffix}.{extension}")
|
||||||
|
|
||||||
return file
|
return file
|
||||||
|
|
||||||
@@ -788,11 +788,11 @@ class SDParameterGenerator:
|
|||||||
),
|
),
|
||||||
"width": (
|
"width": (
|
||||||
"INT",
|
"INT",
|
||||||
{"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 8},
|
{"default": 512, "min": 16, "max": MAX_RESOLUTION, "step": 8},
|
||||||
),
|
),
|
||||||
"height": (
|
"height": (
|
||||||
"INT",
|
"INT",
|
||||||
{"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 8},
|
{"default": 512, "min": 16, "max": MAX_RESOLUTION, "step": 8},
|
||||||
),
|
),
|
||||||
"batch_size": (
|
"batch_size": (
|
||||||
"INT",
|
"INT",
|
||||||
@@ -971,6 +971,10 @@ class SDParameterGenerator:
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def VALIDATE_INPUTS(s, aspect_ratio):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
class SDPromptMerger:
|
class SDPromptMerger:
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -1040,6 +1044,30 @@ class SDTypeConverter:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class SDAnyConverter:
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
return {
|
||||||
|
"required": {},
|
||||||
|
"optional": {
|
||||||
|
"any_type_input": (
|
||||||
|
any_type,
|
||||||
|
{"forceInput": True},
|
||||||
|
),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
RETURN_TYPES = (any_type,)
|
||||||
|
|
||||||
|
RETURN_NAMES = ("ANY_TYPE_OUTPUT",)
|
||||||
|
|
||||||
|
FUNCTION = "convert_any"
|
||||||
|
CATEGORY = "SD Prompt Reader"
|
||||||
|
|
||||||
|
def convert_any(self, any_type_input: str = ""):
|
||||||
|
return (any_type_input,)
|
||||||
|
|
||||||
|
|
||||||
class SDBatchLoader:
|
class SDBatchLoader:
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
@@ -1194,17 +1222,20 @@ class SDParameterExtractor:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def parse_setting(settings):
|
def parse_setting(settings):
|
||||||
pattern = re.compile(r"([^:,]+):\s*\(([^)]+)\)|([^:,]+):\s*([^,]+)")
|
pattern = re.compile(r"([^:,]+):\s*\(([^)]+)\)|([^:,]+):\s*\"([^\"]+)\"|([^:,]+):\s*([^,]+)")
|
||||||
|
|
||||||
matches = pattern.findall(settings)
|
matches = pattern.findall(settings)
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
for match in matches:
|
for match in matches:
|
||||||
key, value_paren, key_nonparen, value_nonparen = match
|
key_paren, value_paren, key_quotes, value_quotes, key_nonparen, value_nonparen = match
|
||||||
if key:
|
if key_paren:
|
||||||
key = key.strip()
|
key = key_paren.strip()
|
||||||
value = value_paren.strip()
|
value = value_paren.strip()
|
||||||
value = tuple(v.strip() for v in value.split(","))
|
value = tuple(v.strip() for v in value.split(","))
|
||||||
|
elif key_quotes:
|
||||||
|
key = key_quotes.strip()
|
||||||
|
value = value_quotes.strip()
|
||||||
else:
|
else:
|
||||||
key = key_nonparen.strip()
|
key = key_nonparen.strip()
|
||||||
value = value_nonparen.strip()
|
value = value_nonparen.strip()
|
||||||
@@ -1212,6 +1243,10 @@ class SDParameterExtractor:
|
|||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def VALIDATE_INPUTS(s, parameter):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
class SDLoraLoader:
|
class SDLoraLoader:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -1302,6 +1337,7 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
"SDParameterGenerator": SDParameterGenerator,
|
"SDParameterGenerator": SDParameterGenerator,
|
||||||
"SDPromptMerger": SDPromptMerger,
|
"SDPromptMerger": SDPromptMerger,
|
||||||
"SDTypeConverter": SDTypeConverter,
|
"SDTypeConverter": SDTypeConverter,
|
||||||
|
"SDAnyConverter": SDAnyConverter,
|
||||||
"SDBatchLoader": SDBatchLoader,
|
"SDBatchLoader": SDBatchLoader,
|
||||||
"SDParameterExtractor": SDParameterExtractor,
|
"SDParameterExtractor": SDParameterExtractor,
|
||||||
"SDLoraLoader": SDLoraLoader,
|
"SDLoraLoader": SDLoraLoader,
|
||||||
@@ -1314,6 +1350,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
|||||||
"SDParameterGenerator": "SD Parameter Generator",
|
"SDParameterGenerator": "SD Parameter Generator",
|
||||||
"SDPromptMerger": "SD Prompt Merger",
|
"SDPromptMerger": "SD Prompt Merger",
|
||||||
"SDTypeConverter": "SD Type Converter",
|
"SDTypeConverter": "SD Type Converter",
|
||||||
|
"SDAnyConverter": "SD Any Converter",
|
||||||
"SDBatchLoader": "SD Batch Loader",
|
"SDBatchLoader": "SD Batch Loader",
|
||||||
"SDParameterExtractor": "SD Parameter Extractor",
|
"SDParameterExtractor": "SD Parameter Extractor",
|
||||||
"SDLoraLoader": "SD Lora Loader",
|
"SDLoraLoader": "SD Lora Loader",
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[project]
|
||||||
|
name = "comfyui-prompt-reader-node"
|
||||||
|
description = "The ultimate solution for managing image metadata and multi-tool compatibility. ComfyUI node version of the SD Prompt Reader."
|
||||||
|
version = "1.3.4"
|
||||||
|
license = { text = "MIT License" }
|
||||||
|
dependencies = ["piexif"]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Repository = "https://github.com/receyuki/comfyui-prompt-reader-node"
|
||||||
|
# Used by Comfy Registry https://comfyregistry.org
|
||||||
|
|
||||||
|
[tool.comfy]
|
||||||
|
PublisherId = "receyuki"
|
||||||
|
DisplayName = "comfyui-prompt-reader-node"
|
||||||
|
Icon = "https://raw.githubusercontent.com/receyuki/comfyui-prompt-reader-node/main/images/icon-400.png"
|
||||||
Reference in New Issue
Block a user