The ultimate solution for managing image metadata and multi-tool compatibility. ComfyUI node version of the SD Prompt Reader
This is a subproject of the
SD Prompt Reader.
It helps you extract metadata from images in any format supported by the
SD Prompt Reader and saves the images with
additional metadata to ensure compatibility with metadata detection on websites such as Civitai.
Supported Formats • Installation • Usage • Change Log • Credits
PNG | JPEG | WEBP | TXT* | |
---|---|---|---|---|
A1111’s webUI | ✅ | ✅ | ✅ | ✅ |
Easy Diffusion | ✅ | ✅ | ✅ | |
StableSwarmUI* | ✅ | ✅ | ||
StableSwarmUI (prior to 0.5.8-alpha)* | ✅ | ✅ | ||
Fooocus-MRE* | ✅ | ✅ | ||
NovelAI (stealth pnginfo) | ✅ | ✅ | ||
NovelAI (legacy) | ✅ | |||
InvokeAI | ✅ | |||
InvokeAI (prior to 2.3.5-post.2) | ✅ | |||
InvokeAI (prior to 1.15) | ✅ | |||
ComfyUI* | ✅ | |||
Draw Things | ✅ | |||
Naifu(4chan) | ✅ |
See SD Prompt Reader for details
[!NOTE]
While ZIP package is available, it is strongly recommended not to use it for installation.
Search for SD Prompt Reader
in the ComfyUI Manager and install it.
Please make sure to install the submodules along with the main repository.
cd
to the custom_node
foldergit clone --recursive https://github.com/receyuki/comfyui-prompt-reader-node.git
cd comfyui-prompt-reader-node
pip install -r requirements.txt
When updating, don’t forget to include the submodules along with the main repository.
git pull --recurse-submodules
Prompt Reader
Node works exactly the same as the[!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 thePrompt Saver
Node within the workflow
to ensure maximum compatibility.
parameter_index
hires-fix
or refiner
,parameter_index
to select the parameters you needtext_g
will be combined with text_l
into a single promptBatch Loader
node. When using the Batch Loader
node for bulk reading,settings
to the Parameter Extractor
node.MODEL_NAME
MODEL_NAME
is a special output that matches the model name in the metadata with the existing models on the serversd_xl_base.safetensors
will be matched with SDXL\sd_xl_base.safetensors
, and vice versa.sd_xl_base
will be matched with SDXL\sd_xl_base.safetensors
, and vice versa.Prompt Saver
Node and the Parameter Generator
Node are designed to be used together.Prompt Saver
Node will write additional metadata in the A1111 format to the output images[!TIP]
Since it’s not possible to directly extract metadata fromKSampler
, it’s necessary to
use theParameter Generator
Node to generate parameters and simultaneously output them to
thePrompt Saver
Node andKSampler
Node.
file.png, file_1.png, file_2.png
.calculate_hash
is enabled, the node will compute the hash values of checkpoint, VAE, Lora,resource_hash
is enabled, the resource hashes will be written into the metadata to support auto-detectioncalculate_hash
is enabled.Lora Loader
Node or the Lora Selector
Node.save_metadata_file
save_metadata_file
is turned on, the metadata will be saved as a TXT file with the same namedate_format
& time_format
date_format
and time_format
, please refer tofilename
& path
%counter
cannot be used for path
, it can only be used for filename
. This %counter
is slightly different
from the %counter
in the built-in Saver
node, it will count all image files in the path
.
Please refer to the following table for placeholders supported by the filename
and path
.
%seed | %date |
%steps | %time |
%cfg | %counter |
%model | %extension |
%sampler | %quality |
%scheduler |
KSampler
, it’s necessary toParameter Generator
Node to generate parameters and simultaneously output them to bothPrompt Saver
Node and KSampler
Node.[!TIP]
TheParameter Generator
Node can also be used as a control panel for complex ComfyUI workflows, just like the AP workflow.
model_version
and aspect_ratio
are used only for calculating the optimal resolution of the selectedrefiner_start
refiner_start
refers to the proportion of steps completed when the refiner starts running,start_at_step
(REFINER_START_STEP
)KSampler
under the selected step ratio.Batch Loader
Node is specifically designed for the Prompt Reader
Node to batch-read image files in a directoryIMAGE
output of the Batch Loader
Node to the image
input ofPrompt Reader
Node.path
path
supports relative paths such as ./input/
or absolute paths like C:/Users/receyuki/Pictures
.\
and /
are acceptable.path
,image_load_limit
and start_index
will not function.Parameter Extractor
Node is an extension of the Prompt Reader
Node, designed to retrieve the valuesPrompt Reader
Node cannot output).Hires upscaler
SETTINGS
of the Prompt Reader
Node to the settings
of the Parameter Extractor
Node.text_g
and text_l
separately, SDXL users need to usePrompt Merger
Node to combine text_g
and text_l
into a single prompt.model_name
, sampler_name
, and scheduler
are special typesType Converter
Node to convert them into STRING
type.Lora Loader
Node and Lora Selector
Node are used to write Lora data into metadata and support auto-detectionLora Loader
Node, or connect the LORA_NAME
output of the Lora Selector
Nodelora_name
input of other lora loaders (built-in or custom), and link the NEXT_LORA
output to the lora_name
Prompt Saver
Node. Both of these nodes have the same function, please choose according to your needs.Lora Loader
Node or Lora Selector
Node head to taillast_lora
and NEXT_LORA
, and connect the NEXT_LORA
at the end of the Lora chain to the lora_name
inputPrompt Saver
Node.