Compare commits

...
25 Commits
Author SHA1 Message Date
Rhys Yang a88722ce8f Merge pull request #107 from Comfy-Org/main
Checkout submodules before publishing
2025-02-01 23:51:39 +08:00
Robin Huang c0b66c4e07 Checkout submodules before publishing 2024-12-31 14:37:36 -08:00
Rhys Yang d191668607 Update pyproject.toml 2024-09-06 19:40:28 +08:00
Rhys Yang a70cbb0c8d Bump version to 1.3.4 2024-09-06 19:30:16 +08:00
Rhys Yang b95499617e Update CHANGELOG.md 2024-09-06 19:29:57 +08:00
Rhys Yang 77095ee38b Fix the input validation of the Parameter Generator node #89
Fix the input validation of the `Parameter Extractor` node #90
2024-09-06 18:24:13 +08:00
Rhys Yang 1e59445091 Merge pull request #87 from spagatticode/ExtractorFix
Update the `Parameter Extractor` node to support parsing quoted parameters
2024-09-06 18:22:55 +08:00
Spag@tti_code b3e66eb21c Merge branch 'ExtractorFix' of https://github.com/spagatticode/comfyui-prompt-reader-node into ExtractorFix
# Conflicts:
#	nodes.py
2024-08-13 13:31:06 +02:00
Spag@tti_code 145fbbb158 Parse parameters in quotes 2024-08-13 13:25:05 +02:00
Spag@tti_code 7c215dde00 Parse parameters in quotes 2024-08-13 12:59:20 +02:00
Rhys Yang 07a1a5314d Merge pull request #85 from ComfyNodePRs/licence-update
Update PyProject Toml - License
2024-08-04 21:43:17 +08:00
snomiao ed6533422e chore(licence-update): Update PyProject Toml - License 2024-08-02 23:03:26 +00:00
Rhys Yang 278e32450f Fix the Parameter Generator unable to choose standard resolutions #82 2024-07-15 23:51:33 +08:00
Rhys Yang b248fcf346 Fix the Prompt Saver unable to correctly handle filenames containing . #80 2024-06-28 15:20:16 +08:00
Rhys Yang 4b35b41d08 Add Any Converter node #76 #78 2024-06-07 07:39:14 +08:00
Rhys Yang af96defbe0 Revert "Change the Type Converter node to a node that converts any type to a * type"
This reverts commit e8ca90fe35.
2024-06-07 07:04:14 +08:00
Rhys Yang e8ca90fe35 Change the Type Converter node to a node that converts any type to a * type 2024-06-07 01:32:18 +08:00
receyuki 659d35b9b8 Bump version to 1.3.3 2024-05-28 02:04:13 +08:00
receyuki ee54281e45 Update CHANGELOG.md 2024-05-28 02:03:38 +08:00
receyuki f94e130bef Update pyproject.toml
Update icon
2024-05-28 01:46:48 +08:00
Rhys Yang 6ab1534e85 Update pyproject.toml 2024-05-28 01:02:12 +08:00
Rhys Yang d960b6dbf1 Create publish_registry.yml 2024-05-28 00:56:44 +08:00
receyuki 0d0afd7f45 Update pyproject.toml
Add icon
2024-05-28 00:43:26 +08:00
Rhys Yang 2069d0c4fc Merge pull request #75 from haohaocreates/pyproject
Add pyproject.toml for Custom Node Registry
2024-05-28 00:33:31 +08:00
haohaocreates 55a57a3b2e chore(pyproject): Add pyproject.toml for Custom Node Registry 2024-05-22 16:57:15 -04:00
6 changed files with 116 additions and 12 deletions
+22
View File
@@ -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 }}
+30
View File
@@ -1,4 +1,34 @@
# 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
> 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,
+1 -1
View File
@@ -1 +1 @@
VERSION = "1.3.2"
VERSION = "1.3.4"
Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

+48 -11
View File
@@ -357,11 +357,11 @@ class SDPromptSaver:
"lora_name": any_type,
"width": (
"INT",
{"default": 1, "min": 1, "max": MAX_RESOLUTION, "step": 8},
{"default": 1, "min": 1, "max": MAX_RESOLUTION, "step": 1},
),
"height": (
"INT",
{"default": 1, "min": 1, "max": MAX_RESOLUTION, "step": 8},
{"default": 1, "min": 1, "max": MAX_RESOLUTION, "step": 1},
),
"positive": ("STRING", {"default": "", "multiline": True}),
"negative": ("STRING", {"default": "", "multiline": True}),
@@ -669,13 +669,13 @@ class SDPromptSaver:
@staticmethod
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
while (output_folder / file).exists():
index += 1
new_stem = f"{stem}_{index}"
file = Path(new_stem).with_suffix(f".{extension}")
new_stem = Path(f"{stem}_{index}")
file = new_stem.with_suffix(f"{new_stem.suffix}.{extension}")
return file
@@ -788,11 +788,11 @@ class SDParameterGenerator:
),
"width": (
"INT",
{"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 8},
{"default": 512, "min": 16, "max": MAX_RESOLUTION, "step": 8},
),
"height": (
"INT",
{"default": 512, "min": 1, "max": MAX_RESOLUTION, "step": 8},
{"default": 512, "min": 16, "max": MAX_RESOLUTION, "step": 8},
),
"batch_size": (
"INT",
@@ -971,6 +971,10 @@ class SDParameterGenerator:
),
}
@classmethod
def VALIDATE_INPUTS(s, aspect_ratio):
return True
class SDPromptMerger:
@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:
@classmethod
def INPUT_TYPES(s):
@@ -1194,17 +1222,20 @@ class SDParameterExtractor:
@staticmethod
def parse_setting(settings):
pattern = re.compile(r"([^:,]+):\s*\(([^)]+)\)|([^:,]+):\s*([^,]+)")
pattern = re.compile(r"([^:,]+):\s*\(([^)]+)\)|([^:,]+):\s*\"([^\"]+)\"|([^:,]+):\s*([^,]+)")
matches = pattern.findall(settings)
result = {}
for match in matches:
key, value_paren, key_nonparen, value_nonparen = match
if key:
key = key.strip()
key_paren, value_paren, key_quotes, value_quotes, key_nonparen, value_nonparen = match
if key_paren:
key = key_paren.strip()
value = value_paren.strip()
value = tuple(v.strip() for v in value.split(","))
elif key_quotes:
key = key_quotes.strip()
value = value_quotes.strip()
else:
key = key_nonparen.strip()
value = value_nonparen.strip()
@@ -1212,6 +1243,10 @@ class SDParameterExtractor:
return result
@classmethod
def VALIDATE_INPUTS(s, parameter):
return True
class SDLoraLoader:
def __init__(self):
@@ -1302,6 +1337,7 @@ NODE_CLASS_MAPPINGS = {
"SDParameterGenerator": SDParameterGenerator,
"SDPromptMerger": SDPromptMerger,
"SDTypeConverter": SDTypeConverter,
"SDAnyConverter": SDAnyConverter,
"SDBatchLoader": SDBatchLoader,
"SDParameterExtractor": SDParameterExtractor,
"SDLoraLoader": SDLoraLoader,
@@ -1314,6 +1350,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"SDParameterGenerator": "SD Parameter Generator",
"SDPromptMerger": "SD Prompt Merger",
"SDTypeConverter": "SD Type Converter",
"SDAnyConverter": "SD Any Converter",
"SDBatchLoader": "SD Batch Loader",
"SDParameterExtractor": "SD Parameter Extractor",
"SDLoraLoader": "SD Lora Loader",
+15
View File
@@ -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"