NAI Character Asset Save
NAI Character Asset Save
- image
- asset_file
Character consistency is the oldest unsolved problem in this hobby, and 2026's answer is to stop regenerating your character and start reusing whatever describes it (character-consistency.md). On NovelAI that description is text: a character prompt with the name, the series, and the attributes, sitting in a character slot. Which works great right up until you're on your fortieth generation and the good prompt is in a Discord message to yourself.
This node fixes that in the least glamorous way possible. It writes the image and its prompts into one PNG.
What it actually does
You feed it an image, the character prompt, and the character negative prompt. It saves a PNG under ComfyUI/input/rs_nai_assets/ with a JSON blob tucked into the PNG's text metadata under the key rs_nai_character_asset:
{"version": 1, "name": "character", "prompt": "...", "negative_prompt": "..."}
That's the whole trick. The file is now a self-contained character card - image and wording, inseparable. Copy it to another ComfyUI install, drop it in that install's input/rs_nai_assets, and it loads there too. Nothing in it references your token, your workflow, or anything else about your machine.
Filenames look like NAI_character_9f3c…png. The random suffix means nothing is ever overwritten - saving "character" forty times gives you forty files, not one. Your name gets scrubbed of illegal filename characters, capped at 60 characters, and prefixed with NAI_ (which also dodges Windows reserved names like CON). The write is atomic: a temp file gets swapped into place, so an interrupted save doesn't leave half an asset behind.
The inputs and the output
- image - one image, no batches. The pack rejects batch inputs rather than quietly using the first frame.
- name -
characterby default. This only sets the filename; it is not your prompt. - prompt - the original character description you want reused. Multiline, empty by default.
- negative_prompt - the character's negative block.
Output is a single asset_file STRING: the filename it wrote. This node is marked as an output node, so it runs even with nothing wired downstream, and it pops the saved image into your ComfyUI image feed when it executes. If you want the filename somewhere useful - a save prefix, a note node - that STRING is there for you.
One thing worth saying plainly: no tags are inferred. What you type is what gets stored. The pack does have a local WD tagger, but that lives in the Detailer path and its output is used only to pick which character prompt to send - it never writes into this metadata. Your asset is exactly your words.
Install
Same as every node in this pack, because they all ship together:
cd ComfyUI/custom_nodes
git clone https://github.com/raspie10032/ComfyUI_RS_NAI_API_Request.git
cd ComfyUI_RS_NAI_API_Request
python -m pip install -r requirements.txt
Or search ComfyUI_RS_NAI_API_Request in ComfyUI Manager and hit Install, then restart ComfyUI. Note that requirements.txt is the pack's full stack - requests, Pillow, numpy, python-dotenv, torch, and segment-anything - so you're pulling SAM support in regardless of whether you ever touch a Detailer. Fine if you already run ComfyUI; surprising if you don't.
This node needs no API token and spends no Anlas. It's a file write. You only need the .env file with NAI_ACCESS_TOKEN for the generation nodes.
Where people get burned
The prompts are in the file. That's the feature and it's also the gotcha. Before you post an asset to a gallery, a Discord, or anywhere else, remember the positive and negative prompts are readable metadata on it. Everything else is stripped - no source workflow metadata, no credentials - but the two prompts you supplied travel with the picture.
The reverse failure is nastier and quieter: image hosts, social platforms, and "optimise my PNG" tools happily strip PNG text chunks. Strip it and your asset is dead - the loader will throw Missing or unsupported character asset metadata and tell you to re-create it with this node. Keep your real assets as local files; treat anything that's been through a website as gone.
Last one: assets land in your input folder, not output. That's deliberate - it's the folder the asset loader reads and the one ComfyUI is willing to serve - but it does mean your asset library lives next to your reference images, not with your generated results. Back up input/rs_nai_assets and you've backed up your characters.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| name | STRING | character | Display name used in the file name. A unique suffix prevents overwriting. |
| prompt | STRING | Original character description to reuse with this image. No inferred tags are added. | |
| negative_prompt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| asset_file | STRING | — |