ComfyUI Node

Save Text File v7.0 - Akki

The file-save node that version-numbers everything your LLM pipeline spits out

By routhakash·Created about a year ago·Updated 9 months ago· 8
Save Text File v7.0 - Akki
    • saved_file_path
    • text_passthrough
    text
    directoryAKKILLM/Project01
    filename_prefixoutput
    extension

    In the AkkiNodes LLM Suite, the AI agents don't write files - you decide what gets saved, and Save Text File is the button for that. Story beats, character bibles, shot lists, lookdev prompts, video prompts: anything that comes out of the LLM as a string can go through here and land on disk with a versioned filename you can actually find later. If you're building the "Script to Screen" pipeline this pack is designed around, this is the node that makes each stage's output a checkpoint instead of just a wire.

    It's a deliberately dumb, dependable utility in a pack full of very ambitious ones. No LLM call, no model, no randomness - deterministic Python, which is exactly what you want at the output boundary of a workflow.

    How it works

    Four inputs:

    • text - the string to save. Wire this from any of the Akki pipeline nodes.
    • directory (default AKKILLM/Project01) - folder relative to ComfyUI's output directory. Note the default doesn't include output/, and it doesn't include the base_output_folder from the Project Director - so if you're using the Project Director's project_path (which is output/AKKILLM/Project01), trim that or align your folder names or you'll get two sibling trees.
    • filename_prefix (default output) - the stem of the filename.
    • extension - a dropdown: txt, csv, md, or json. You pick the format; the content is up to the node feeding it.

    It auto-versions: the node scans the folder for existing <prefix>_NNNN_<date>.<ext> files and writes the next number up, so consecutive runs become output_0001_2026-08-16.txt, output_0002_2026-08-16.txt, and so on. That's why the loaders in this pack can find "the latest" file for a shot or scene by just sorting names - the naming convention is the lookup key.

    Two outputs, which is the part that trips people up:

    • saved_file_path - the absolute path on disk of what was written.
    • text_passthrough - the original text, unchanged. This node is marked as an output node, but it isn't a dead end; the passthrough lets you save and keep feeding the text downstream in the same run.

    Installing

    Part of the AkkiNodes LLM Suite:

    cd ComfyUI/custom_nodes
    git clone https://github.com/routhakash/AkkiNodes-LLM-Suite-for-ComfyUI
    

    Windows users: right-click install.bat and Run as administrator once (it installs llama-cpp-python==0.3.9 and openai into your ComfyUI venv). Then restart ComfyUI. This node needs none of that to function, but the pack won't register its nodes until its imports succeed, so a working install matters.

    Gotchas

    • If the folder doesn't exist, the node creates it - no error. But it's created relative to output/, so a typo in directory silently makes a brand-new folder and you lose track of where things went. Keep directory in sync with the Project Director's path.
    • Save returns ERROR: Could not save file. Check console. Details: ... as the file path output rather than throwing - that's this pack's house style of returning error strings instead of crashing. If a downstream node suddenly receives text starting with ERROR:, check the ComfyUI console.
    • The filename numbering is based on what's already in the folder, so re-running a workflow with a different filename_prefix starts a fresh sequence. That's usually what you want, but it means "latest file" lookups are per-prefix.
    CategoryAkkiNodes/FileIO

    Inputs (4)

    NameTypeDefaultDescription
    textSTRING
    directorySTRINGAKKILLM/Project01
    filename_prefixSTRINGoutput
    extensionCOMBO4 options: txt, csv, md, json

    Outputs (2)

    NameTypeDescription
    saved_file_pathSTRING
    text_passthroughSTRING