Compare commits

..
20 Commits
Author SHA1 Message Date
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
receyuki a2e6aff81c Bump version to 1.3.2 2024-05-22 00:30:23 +08:00
receyuki 2af4a879b5 Update core to 1.3.5 2024-05-22 00:28:49 +08:00
receyuki 12b5178915 Update CHANGELOG.md 2024-05-22 00:28:30 +08:00
receyuki a4f5891079 Update node description 2024-05-15 23:24:56 +08:00
receyuki 9042867e97 Update README.md 2024-05-15 23:16:49 +08:00
receyuki 5527096b53 Update README.md 2024-05-15 23:14:19 +08:00
receyuki 9a84eb186b Update core to 1.3.5b2 2024-05-15 23:12:29 +08:00
Rhys Yang faeea1f73c Merge pull request #66 from COvert96/patch-1
Add filename placeholders %width and %height to the`Prompt Saver` node
2024-04-09 02:19:54 +08:00
Chris Overtveld e6cca92351 Update nodes.py save_images to have %width and %height
There's probably a reason this is not in the main branch, I assume because of certain node conflicts but it works for me!
2024-04-07 14:26:51 +02:00
Rhys Yang 05c3553688 Update core to a7eaf3d 2024-03-22 00:06:30 +08:00
Rhys Yang 23b5afbc4f Update the Prompt Reader node to the new exception handling method 2024-03-22 00:05:10 +08:00
Rhys Yang c2ac789c44 Add support for pasted images to the Prompt Reader node #64 2024-03-07 22:32:40 +08:00
8 changed files with 104 additions and 30 deletions
+20
View File
@@ -0,0 +1,20 @@
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
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@main
with:
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
+23
View File
@@ -1,4 +1,27 @@
# Change Log
## 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,
> 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.
- Add support for pasted images to the `Prompt Reader` node #64
- Update core to [1.3.5](https://github.com/receyuki/stable-diffusion-prompt-reader/releases/tag/v1.3.5)
- Update nodes.py save_images to have %width and %height #66 @COvert96
- Update the `Prompt Reader` node to the new exception handling method
## v1.3.1
> 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,
+32 -22
View File
@@ -1,5 +1,5 @@
<div align="center">
<img alt="icon" src="https://github.com/receyuki/stable-diffusion-prompt-reader/raw/master/sd_prompt_reader/resources/icon.png" width=20% height=20%>
<img alt="icon" src="https://github.com/receyuki/stable-diffusion-prompt-reader/raw/master/sd_prompt_reader/resources/icon-cube.png" width=20% height=20%>
<h1>SD Prompt Reader Node</h1>
<a href="https://github.com/receyuki/comfyui-prompt-reader-node/blob/master/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/receyuki/comfyui-prompt-reader-node"></a>
@@ -28,22 +28,27 @@ additional metadata to ensure compatibility with metadata detection on websites
## Supported Formats
| | PNG | JPEG | WEBP | TXT* |
|--------------------------------------------------------------------------|:---:|:----:|:----:|:----:|
| [A1111's webUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | ✅ | ✅ | ✅ | ✅ |
| [Easy Diffusion](https://github.com/easydiffusion/easydiffusion) | ✅ | ✅ | ✅ | |
| [StableSwarmUI](https://github.com/Stability-AI/StableSwarmUI)* | ✅ | ✅ | | |
| [Fooocus-MRE](https://github.com/MoonRide303/Fooocus-MRE)* | ✅ | ✅ | | |
| [InvokeAI](https://github.com/invoke-ai/InvokeAI) | ✅ | | | |
| [ComfyUI](https://github.com/comfyanonymous/ComfyUI)* | ✅ | | | |
| [NovelAI](https://novelai.net/) | ✅ | | | |
| [Draw Things](https://drawthings.ai/) | ✅ | | | |
| Naifu(4chan) | ✅ | | | |
| | PNG | JPEG | WEBP | TXT* |
|----------------------------------------------------------------------------------------|:---:|:----:|:----:|:----:|
| [A1111's webUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | ✅ | ✅ | ✅ | ✅ |
| [Easy Diffusion](https://github.com/easydiffusion/easydiffusion) | ✅ | ✅ | ✅ | |
| [StableSwarmUI](https://github.com/Stability-AI/StableSwarmUI)* | ✅ | ✅ | | |
| [StableSwarmUI (prior to 0.5.8-alpha)](https://github.com/Stability-AI/StableSwarmUI)* | ✅ | ✅ | | |
| [Fooocus-MRE](https://github.com/MoonRide303/Fooocus-MRE)* | ✅ | ✅ | | |
| [NovelAI (stealth pnginfo)](https://novelai.net/) | ✅ | | ✅ | |
| [NovelAI (legacy)](https://novelai.net/) | ✅ | | | |
| [InvokeAI](https://github.com/invoke-ai/InvokeAI) | ✅ | | | |
| [InvokeAI (prior to 2.3.5-post.2)](https://github.com/invoke-ai/InvokeAI) | ✅ | | | |
| [InvokeAI (prior to 1.15)](https://github.com/invoke-ai/InvokeAI) | ✅ | | | |
| [ComfyUI](https://github.com/comfyanonymous/ComfyUI)* | ✅ | | | |
| [Draw Things](https://drawthings.ai/) | ✅ | | | |
| Naifu(4chan) | ✅ | | | |
See [SD Prompt Reader](https://github.com/receyuki/stable-diffusion-prompt-reader#supported-formats) for details
## Installation
>While ZIP package is available, it is strongly recommended not to use it for installation.
> [!NOTE]
> While ZIP package is available, it is strongly recommended not to use it for installation.
### Install and update via [ComfyUI Manager](https://github.com/ltdrdata/ComfyUI-Manager) (Recommended)
Search for `SD Prompt Reader` in the ComfyUI Manager and install it.
### Install manually
@@ -76,9 +81,11 @@ It uses the Image Data Reader from the
[standalone SD Prompt Reader](https://github.com/receyuki/stable-diffusion-prompt-reader),
allowing it to support the same formats and receive updates along with the
[SD Prompt Reader](https://github.com/receyuki/stable-diffusion-prompt-reader).
- Due to custom nodes and complex workflows potentially causing issues with SD Prompt Reader's ability
to read image metadata correctly, it is recommended to embed the `Prompt Saver` Node within the workflow
to ensure maximum compatibility.
> [!IMPORTANT]
> Due to custom nodes and complex workflows potentially causing issues with SD Prompt Reader's ability
> to read image metadata correctly, it is recommended to embed the `Prompt Saver` Node within the workflow
> to ensure maximum compatibility.
<details>
<summary><b>More Information</b></summary>
@@ -122,12 +129,13 @@ e.g. `sd_xl_base` will be matched with `SDXL\sd_xl_base.safetensors`, and vice v
- The `Prompt Saver` Node will write additional metadata in the A1111 format to the output images
to be compatible with any tools that support the A1111 format,
including SD Prompt Reader and Civitai.
Due to custom nodes and complex workflows potentially causing issues with SD Prompt Reader's ability
- Due to custom nodes and complex workflows potentially causing issues with SD Prompt Reader's ability
to read image metadata correctly, it's recommended to embed this node within the workflow
to ensure maximum compatibility.
- Since it's not possible to directly extract metadata from `KSampler`, it's necessary to
use the `Parameter Generator` Node to generate parameters and simultaneously output them to
the `Prompt Saver` Node and `KSampler` Node.
to ensure maximum compatibility.
> [!TIP]
> Since it's not possible to directly extract metadata from `KSampler`, it's necessary to
> use the `Parameter Generator` Node to generate parameters and simultaneously output them to
> the `Prompt Saver` Node and `KSampler` Node.
<details>
<summary><b>More Information</b></summary>
@@ -177,7 +185,9 @@ from the `%counter` in the built-in `Saver` node, it will count all image files
- Since it's not possible to directly extract metadata from `KSampler`, it's necessary to
use the `Parameter Generator` Node to generate parameters and simultaneously output them to both
the `Prompt Saver` Node and `KSampler` Node.
- The `Parameter Generator` Node can also be used as a control panel for complex ComfyUI workflows, just like the [AP workflow](https://perilli.com/ai/comfyui/).
> [!TIP]
> The `Parameter Generator` Node can also be used as a control panel for complex ComfyUI workflows, just like the [AP workflow](https://perilli.com/ai/comfyui/).
<details>
<summary><b>More Information</b></summary>
+1 -1
View File
@@ -1 +1 @@
VERSION = "1.3.1"
VERSION = "1.3.3"
Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

+12 -6
View File
@@ -2,7 +2,7 @@
@author: receyuki
@title: SD Prompt Reader
@nickname: SD Prompt Reader
@description: ComfyUI node version of the SD Prompt Reader
@description: The ultimate solution for managing image metadata and multi-tool compatibility. ComfyUI node version of the SD Prompt Reader
"""
@@ -141,6 +141,8 @@ class SDPromptReader:
def load_image(self, image, parameter_index):
if image in SDPromptReader.files:
image_path = folder_paths.get_annotated_filepath(image)
elif image.startswith("pasted/"):
image_path = folder_paths.get_annotated_filepath(image)
else:
image_path = image
i = Image.open(image_path)
@@ -157,9 +159,8 @@ class SDPromptReader:
file_path = Path(image_path)
with open(file_path, "rb") as f:
try:
image_data = ImageDataReader(f)
except:
image_data = ImageDataReader(f)
if image_data.status.name == "COMFYUI_ERROR":
output_to_terminal(ERROR_MESSAGE["complex_workflow"])
return self.error_output(
error_message=ERROR_MESSAGE["complex_workflow"],
@@ -169,8 +170,7 @@ class SDPromptReader:
height=i.height,
filename=file_path.stem,
)
if not image_data.tool:
elif image_data.status.name in ["FORMAT_ERROR", "UNREAD"]:
output_to_terminal(ERROR_MESSAGE["format_error"])
return self.error_output(
error_message=ERROR_MESSAGE["format_error"],
@@ -290,6 +290,10 @@ class SDPromptReader:
image_data = ImageDataReader(f)
return image_data.props
@classmethod
def VALIDATE_INPUTS(s, image):
return True
class SDPromptSaver:
model_hash_dict = {}
@@ -452,6 +456,8 @@ class SDPromptSaver:
"%seed": seed,
"%steps": steps,
"%cfg": cfg,
"%width": width,
"%height": height,
"%extension": extension,
"%model": Path(model_name_real).stem,
"%sampler": sampler_name_real,
+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.3"
license = "MIT"
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"