Nodes/4A NovelAI/NAI Original Image Saver
ComfyUI Node

NAI Original Image Saver

Save the file NovelAI actually sent you

By tsukino4a·Created 20 days ago·Updated 7 days ago· 5
NAI Original Image Saver
  • result
    filenameNAI_%time
    pathNovelAI
    time_format%Y-%m-%d_%H-%M-%S

    Here's a thing that trips people up on their first NAI workflow: if you decode NovelAI's returned image and hand it to ComfyUI's normal SaveImage node, you get a new PNG - re-encoded from pixels, with all the provider metadata stripped out on the way. NAI Original Image Saver exists to stop that. It takes the raw PNG bytes NovelAI actually returned and writes them to disk untouched, which means you keep the exact pixels and the metadata chunks that make the file useful later.

    This is the pack's answer to the general problem documented in the KB's image-io-metadata essay: the metadata is the payload, not a footnote, and re-encoding deletes it. NAI images are no exception - the model, settings, and character data live in the file, and they only survive if the original bytes do.

    How it works

    The Sampler returns two things: a normal IMAGE tensor for display, and a second output, result, typed NAI_RESULT, which carries the original PNG bytes. This node's result input is where that goes - it won't accept anything else, and it validates that what arrives is actually a PNG before writing it. It writes into ComfyUI's output directory, so files land in ComfyUI/output/NovelAI/ by default, and it guards the path to make sure nothing escapes the output folder.

    The filename template

    The filename field defaults to NAI_%time, and that's a small template, not a literal name. %time expands using the time_format field (default %Y-%m-%d_%H-%M-%S), and %date expands to %Y-%m-%d. So the default produces files like NAI_2026-08-30_14-32-05.png. Set filename to my_characters_%date and you get dated runs; set path to something like NovelAI/batch2 to organize into subfolders. If the file already exists, it appends a numeric suffix rather than overwriting - handy when a batch produces several images, which the node numbers in sequence.

    Why you'd reach for it

    Use this node whenever you're going to reuse the output - feeding a good image back through NAI Image Input, pulling metadata with NAI Meta Loader, or uploading somewhere that parses generation data. Those all depend on the embedded metadata surviving. If you're only doing quick look-and-discard iterations, you don't need it, but the moment a generation is a keeper, saving through this node instead of a regular saver is the difference between a master file and a stripped derivative. (The pack even includes a paired PreviewImage-style flow for the throwaways.)

    Install

    Same pack, same steps: ComfyUI Manager (search 4A NovelAI) or

    cd ComfyUI/custom_nodes
    git clone https://github.com/tsukino4a/ComfyUI-4A-NovelAI.git ComfyUI-4A-NovelAI
    cd ComfyUI-4A-NovelAI
    python install.py
    

    Restart ComfyUI. It's a pure writer - no dependencies beyond the pack's msgpack, and no API cost of its own; the Anlas was already spent when the Sampler generated the image.

    Category4A NovelAI

    Inputs (4)

    NameTypeDefaultDescription
    resultNAI_RESULT
    filenameSTRINGNAI_%time
    pathSTRINGNovelAI
    time_formatSTRING%Y-%m-%d_%H-%M-%S

    Outputs (0)

    No outputs