ComfyUI Node

VRGDG_SaveTextAdvanced

Save text where you actually want it

By vrgamegirl19·Created about a year ago·Updated about 7 hours ago· 718
VRGDG_SaveTextAdvanced
    • text
    • file_path
    folder_namestory
    file_namestory
    overwritetrue
    text
    trigger0

    The plain VRGDG_SaveText locks you into six fixed slots - fine when you're running the pack's story pipeline verbatim, annoying when you want to write to your own folder with your own filename. VRGDG_SaveTextAdvanced is the version that hands you the wheel: folder_name and file_name are yours to set (both default to story, so change them), and an overwrite toggle decides whether a re-run replaces the file or... well, does something else.

    How it works

    Required inputs:

    • folder_name - subfolder for the output (default story).
    • file_name - the filename (default story).
    • overwrite - true by default, meaning each run clobbers the file. Turn it off if you're accumulating runs.
    • text - the multiline content to write.
    • trigger - an integer, default 0. This is the workflow's way of forcing a write on demand: bump the value and the node re-saves even when the text hasn't changed. In ComfyUI, nodes skip work when their inputs are unchanged, so the trigger is a manual "do it now" pedal. If you're debugging why a file never updated, this is usually the answer - you changed nothing, so the node didn't run, so the file is stale.

    Outputs are text (echoed) and file_path (where it landed).

    That's it - it's deliberately a text-saver with the two knobs the simple version lacks: a place to put it and a name for it. The trigger is the one input beginners ignore and then get confused by, so treat it as the refresh button.

    Where it sits in the pipeline

    This is glue for the pack's storyboard flow: after the LLM writes a scene description or a storyboard entry, this node parks it in a named folder so later nodes - or you, later, reading the files by hand - can find it. Combined with the pack's JSON helpers (VRGDG_String2Json, VRGDG_StoryGroupJsonFixer), you can build a pipeline that writes its own intermediate state to disk and re-reads it on the next run. That "persist your state as text files" pattern is the pack's personality, and this node is where it lives.

    Install and gotchas

    cd ComfyUI/custom_nodes
    git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
    

    or ComfyUI Manager → "vrgamedev", then restart. Requirements: kornia, librosa, imageio (Windows portable: run the requirements file from python_embeded).

    Real-world footguns, from the pack's own defaults: the default folder is story and the default filename is story, so if you run two of these with defaults, one stomps the other - name things. And the pack ships Windows-style paths in its workflows; on Linux or macOS, make sure folder_name resolves somewhere writable. None of this is exotic, but it's the difference between "the file appeared" and ten minutes of wondering where the node saved it.

    CategoryVRGDG/General

    Inputs (5)

    NameTypeDefaultDescription
    folder_nameSTRINGstory
    file_nameSTRINGstory
    overwriteBOOLEANtrue
    textSTRING
    triggerINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    textSTRING
    file_pathSTRING