OC Generator / Save Settings JSON
The pack's persistence bridge
- settings
- settings_json
- saved_name
- saved_path
Here's the gap this node fills: everything else in the pack produces or consumes an OC_GENERATOR_SETTINGS object that only exists inside your ComfyUI graph. That's fine while you're in the editor, but it evaporates the moment you close the workflow. OC Generator / Save Settings JSON is the pack's persistence layer - it takes a settings_json string, parses it into a proper settings object, optionally writes it to user_presets/ as a reusable preset, and hands you back the normalized settings for the rest of the graph.
It's also the import door for the pack's ecosystem. The companion web app (original-character-generator-web) can export compatible settings_json files - this node is how that output gets into ComfyUI. Same for presets you've edited by hand or received from someone else: paste the JSON in, let this node normalize it, done.
The inputs that matter
Three, all required:
settings_json- a multiline text box holding the JSON object. Defaults to{}. This is where the web app's export (or thesettings_jsonoutput of the Settings node) goes. The parser is strict: invalid JSON raises an error rather than silently doing nothing, and it has to be a JSON object, not an array or a bare string.file_name- the preset name, defaultoc_settings. Only used when saving is enabled. The node sanitizes it, so weird characters get stripped rather than producing a corrupt filename.save_enabled- a boolean that decides whether a file actually gets written. Set itfalseand you get a pure parse-and-normalize node with no disk writes.
The outputs
settings- the parsedOC_GENERATOR_SETTINGSobject, normalized (fixed traits defaulted tonone, weights clamped to 0–1, preset resolved). This is what you wire into aGenerate CharacterorShow Settingsnode.settings_json- the re-serialized, normalized JSON string. Feed it back into the input to see what the normalizer actually kept.saved_nameandsaved_path- filled in whensave_enabledis true: the sanitized preset name and the absolute path where it was written (.../custom_nodes/comfyui-original-character-generator/user_presets/<file_name>.json). Leavesave_enabledoff and these come back empty.
It's flagged as an output node, so ComfyUI treats it as a graph terminal - it always runs, which is what you want for a node whose whole job is writing a file.
Install and gotchas
No dependencies, no model downloads - same as the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/nade-eaf4fc/comfyui-original-character-generator.git
or install comfyui-original-character-generator via ComfyUI Manager and restart.
Two things to know. First, saved presets land in the pack's own user_presets/ directory inside custom_nodes - if you reinstall the pack by deleting the folder, you delete your presets. Back them up if you've built up a library. Second, the normalization is opinionated: it fills in defaults for anything missing, so a hand-written JSON with unknown fields will survive the round trip but come back reshaped. If you're diffing a settings file against what you typed, compare against the settings_json output, not your input - that's the ground truth the generators will actually see.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| settings_json | STRING | {} | — |
| file_name | STRING | oc_settings | — |
| save_enabled | BOOLEAN | true | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| settings | OC_GENERATOR_SETTINGS | — |
| settings_json | STRING | — |
| saved_name | STRING | — |
| saved_path | STRING | — |