NAI Metadata Prompt Loader
Your NovelAI image is a save file — this node reopens it
- prompt
- negative_prompt
- characterPrompts
- character_prompts_json
- generationSettings
If you've ever stared at an old NovelAI generation and thought "that prompt was so close, I just want to nudge it and rerun" - this is the node for you. NAI Metadata Prompt Loader (from the ComfyUI_RS_NAI_API_Request_Editable pack) reads the generation settings NovelAI bakes into its PNGs and WebPs, hands them back to the pack's generator, and lets you edit them before regenerating. And unlike most of this pack, it doesn't touch the API at all: parsing is offline and read-only. No token, no Anlas, nothing.
NovelAI images are unusual in that they carry the whole generation as a payload inside the file - prompt, negative prompt, per-character prompts with coordinates, seed, sampler, CFG, resolution, scheduler. In A1111 you'd hit PNG Info and be done. The catch is NovelAI's format is deliberately exotic: PNGs use a hidden stealth_pngcomp chunk (with plain PNG text as fallback), and WebPs keep their data in the EXIF UserComment. Generic metadata parsers choke on it, and ComfyUI's own drag-in only understands its own workflow graphs. This loader is effectively NovelAI's missing PNG Info tab.
How it works
You drop a NovelAI PNG or WebP into ComfyUI's input folder, pick it in the image upload field, and the node does its thing: reads the metadata, fills the editable prompt fields, and reconstructs the character list - including those spatial multi-character prompts V4/V5 use, where each character gets x/y coordinates on a 0–10 grid. That part matters more than it sounds. NAI's coordinate-based multi-character prompting is its own flavor of regional prompting, and it's basically impossible to recreate by hand; the loader recovers it intact.
The node is deliberately picky about what it reads. JPEG, A1111 parameters blocks, Stable Diffusion metadata, and ComfyUI prompt graphs are all rejected outright - only genuine NovelAI PNG/WebP passes.
Two inputs do the subtle work here:
prompt_editandnegative_prompt_edit- the editable global prompts, kept byte-for-byte (no "normalization" mangling your tags).character_prompts_edit_json- the JSON editor for characters, defaulting to{"use_coords":true,"use_order":true,"characters":[]}.
The loader tracks whether your edits are still "current" by hashing the source file. Swap the image and it re-imports; keep it and your edits win. A "Reload metadata" action discards edits and restores the file's values.
What comes out the other side
Five outputs, but you'll mostly use three:
promptandnegative_prompt- wire straight intoNAI Image Generator.prompt/.negative_prompt.characterPrompts(LIST) - connect toNovelAIGenerator.characterPrompts.generationSettings- anNAI_GENERATION_SETTINGSbundle (width, height, seed, sampler, steps, CFG, scheduler, coordinate flags, model when it can be determined). Feed it into the generator'smetadataSettingsinput; connected values override the corresponding widgets.character_prompts_jsonis just the inspection dump.
Installing it
Install the whole pack - the loader ships with it:
cd ComfyUI/custom_nodes
git clone https://github.com/omoitukahen/ComfyUI_RS_NAI_API_Request_Editable.git
cd ComfyUI_RS_NAI_API_Request_Editable
python -m pip install -r requirements.txt
Then restart ComfyUI. Or, if you use ComfyUI Manager, search "RS NAI API Request Editable" and hit install. The pack's other nodes need a NovelAI API token in a .env (NAI_ACCESS_TOKEN=...), and the Face Detailer pulls in heavy deps (SAM, Impact-Pack) - none of that applies to this loader. It's the one node in the pack you can use with zero configuration.
Gotchas
- The image has to live in ComfyUI's
inputfolder - drag or upload it there before selecting it. - Re-encoded images lose the data. Screenshots, JPEG re-saves, and files bounced through Discord or Reddit have had their metadata stripped or converted, and the loader will either reject them or come up empty. Treat your PNGs like source code, because they are.
- V5 Full vs. Curated isn't always distinguishable from the file, so the generator keeps whatever model you currently have selected and shows a warning. Check it before you hit generate.
- It reads NovelAI metadata, not a ComfyUI workflow. If the image was generated in ComfyUI, this node won't rebuild that graph - that's a different loader's job.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png | |
| prompt_editopt | STRING | — | |
| negative_prompt_editopt | STRING | — | |
| character_prompts_edit_jsonopt | STRING | {"use_coords":true,"use_order":true,"characters":[]} | — |
| metadata_source_imageopt | STRING | — | |
| metadata_source_sha256opt | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| negative_prompt | STRING | — |
| characterPrompts | LIST | — |
| character_prompts_json | STRING | — |
| generationSettings | NAI_GENERATION_SETTINGS | — |