Nodes/comfyui-kisekae/๐Ÿ‘˜ Kisekae Save Preset
ComfyUI Node

๐Ÿ‘˜ Kisekae Save Preset

Turn a lucky graph tweak into a character you keep

By KagejitsuยทCreated 11 days agoยทUpdated 10 days agoยท 0
๐Ÿ‘˜ Kisekae Save Preset
  • char
  • char
  • saved_as
โ—„pathcharacters/new-characterโ–บ
โ—„nameโ–บ
โ—„descriptionโ–บ
โ—„keep_refstrueโ–บ
โ—„overwritefalseโ–บ

Every good render starts as an accident. You nudged the expression, swapped the legwear, bumped the LoRA to 0.85 - and now the graph holds a character you'd like to have again next week. In a prompt box that knowledge dies with the workflow. Here it becomes a file.

๐Ÿ‘˜ Kisekae Save Preset writes the character currently flowing through the chain to ComfyUI/user/default/kisekae/presets/<path>.json, in exactly the format Load Preset reads back.

How it works

It's a node with no char output surprise - char passes through, plus a saved_as string with the absolute path written. It's flagged as an output node, so it runs when the queue runs; you don't need to wire it to anything.

The interesting logic is in what gets written. With keep_refs on (the default), any section that still exactly matches the preset it came from is saved as a $ref rather than being spelled out - so a character wearing outfits/maid saves as "character, plus a reference to the maid outfit", and editing that outfit file later updates every character wearing it. It only writes a ref if that ref still resolves and doesn't lead back to the file being written; otherwise the section is written in full and the node tells you so in its output text.

Safety is deliberate and mostly welcome: no overwrite unless overwrite is on, an identical file just reports UNCHANGED (so re-queueing a workflow is not an error), writes go through a temp file and atomic rename, and .., absolute paths, examples/ and symlinks pointing outside your preset folder are refused. Field-level negative companions get folded into the section's negative on the way out, because a saved field is just text - it's no longer a dropdown pick, so it can't carry its own vocab companions.

It also preserves what Tansu set: tags, description and the ๐Ÿ”ž R-18 mark on an existing file survive a save from the graph.

The inputs that matter

  • path - relative, no .json, e.g. characters/roxy-casual. Subfolders are fine and are how you keep characters/, outfits/ and scenes/ apart.
  • name - display name; leave it empty to keep the character's current name.
  • keep_refs - on by default. Turn it off when you want a self-contained file you can hand to someone else or edit standalone.
  • overwrite - off by default. You'll need it the second time you save to the same path.
  • description - plain text, free.

Outputs: char (unchanged) and saved_as, the path. The node's display box shows the status line (CREATED: / OVERWRITTEN: / UNCHANGED:), any notes about refs, and the full JSON - which is the honest way to see what you just made.

Install

Nothing special beyond the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Kagejitsu/comfyui-kisekae

Or ComfyUI Manager โ†’ search kisekae (Registry: comfyui-kisekae). Restart, and the nodes appear under kisekae. No Python dependencies at all. After saving, press R in ComfyUI so the new preset shows up in every dropdown.

Common issues

"already exists; turn on overwrite". Working as intended. Either flip overwrite or save under a new path - the second is usually better, because a saved preset is cheap and a lost one isn't.

It says UNCHANGED and I wanted my edits. If the JSON is byte-identical it won't rewrite. If it differs, you're being blocked by overwrite instead; the two statuses are different messages, so read which one you got.

The whole character is spelled out instead of using refs. The section no longer matches its origin - you changed a field on it, which clears the origin marker - or keep_refs is off, or the ref would have looped. The node's notes say which.

The preset won't save. Paths must be relative and inside the preset folder; .., absolute paths, examples/ and symlinks are refused on purpose. The pack is strict here because it's writing files on your disk.

My tags and R-18 mark got wiped. They shouldn't - saves carry over existing file metadata. If they went missing, the file was probably written to a different path than the one Tansu edited.

Saving into a subfolder created nothing in Tansu. Reload the browser tab and press R in ComfyUI; the picture-card grid reads the preset folder fresh.

Categorykisekae

Inputs (6)

NameTypeDefaultDescription
charKISEKAE_CHARโ€”
pathSTRINGcharacters/new-characterRelative path without .json, e.g. characters/roxy-casual
nameSTRINGDisplay name; empty keeps the character's name
descriptionSTRINGโ€”
keep_refsBOOLEANtrueโ€”
overwriteBOOLEANfalseโ€”

Outputs (2)

NameTypeDescription
charKISEKAE_CHARโ€”
saved_asSTRINGโ€”