Original source code credit: The prompt_to_stack function is based on the code from: https://github.com/bedovyy/ComfyUI_NAIDGenerator/blob/master/utils.py#L146 Author: bedovyy Modified for Novel AI to ComfyUI conversion purposes.
This code was entirely created by Claude 3.5 Sonnet.
A custom node extension for ComfyUI that enables conversion between NovelAI and ComfyUI prompt formats, along with extraction of NovelAI metadata from PNG images.
- Extracts metadata from NovelAI-generated PNG images including:
- Prompt
- Negative prompt
- Seed
- Steps
- Sampler
- CFG scale
- Raw metadata
- Image dimensions
- Supports direct image upload through the UI
- Specifically designed for PNG files with NovelAI metadata
Provides bidirectional conversion between NovelAI and ComfyUI prompt formats:
- Converts NovelAI's bracket-based emphasis notation to ComfyUI's weight format
{tag}
→(tag:1.05)
{{tag}}
→(tag:1.10)
[tag]
→(tag:0.95)
[[tag]]
→(tag:0.90)
- Converts ComfyUI's weight format to NovelAI's bracket notation
(tag:1.05)
→{tag}
(tag:1.10)
→{{tag}}
(tag:0.95)
→[tag]
(tag:0.90)
→[[tag]]
- Preserves character tags in various formats:
- Basic:
character (series)
- With options:
character (series) (outfit) (pose)
- Underscore format:
character_(series)
- Escaped format:
character \(series\)
- Basic:
- Maintains correct formatting for
artist:
tags
- Clone this repository into your ComfyUI's custom nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/raspie10032/ComfyUI_RS_NAI_Local_Prompt_converter
- Restart ComfyUI
The workflow is embedded in the PNG metadata - just drag and drop the image to load it in ComfyUI
ComfyUI-Manager
ComfyUI Impact Pack
Efficiency Nodes for ComfyUI Version 2.0+
pythongosssss/ComfyUI-Custom-Scripts
UltimateSDUpscale
rgthree's ComfyUI Nodes
Use Everywhere (UE Nodes)
This project incorporates code and techniques from the following sources:
- Repository: https://github.com/bedovyy/ComfyUI_NAIDGenerator
- Author: bedovyy
- Used for: Prompt conversion functionality and base implementation
- Repository: https://github.com/NovelAI/novelai-image-metadata
- Author: NovelAI
- Used for: LSB-based metadata extraction technique and stealth watermark handling
Special thanks to the authors and contributors of these projects for their valuable work and making their code available to the community.