Style Preset Saver
Turn the style you just dialed in into a preset you can reuse
- extracted_tags
Every NewBie XML prompt has <artist> and <style> slots, and this pack ships dozens of presets to fill them. But the combination you actually end up loving is almost never one of the stock ones - it's the one you built yourself mid-workflow. Style Preset Saver is the record button for that. It takes whatever artist and style are currently in your prompt, cleans them up, and writes them into LPF_config.json as a new preset the XML Style Injector can pick up next time.
This is a small, quiet node, and it's meant to hang at the end of a style injection chain. It has three inputs:
text_input- text containing<artist>and<style>tags (plus an optional<mode>). You normally wire this straight from the injector'sstyle_save_metadataoutput.preset_name- the name for your new preset. Leave it empty or use a name that already exists and the node will refuse to save (it prints a warning to the console rather than overwriting).save_trigger- the actual save switch. When it reads "Save as Styles" it writes; "Do Not Save" just extracts. After a run it auto-resets to "Do Not Save" so you don't accidentally re-save the same preset on every queue.
Mechanically it's honest about being a formatter: it regex-extracts the <artist> and <style> content, unescapes HTML entities, dedupes tags, normalizes the mode (NewBie / Anima / Both), and appends the entry to the styles object in the pack's LPF_config.json. If the input carries a <mode>, your new preset gets tagged with it and shows a [NewBie], [Anima], or [Both] prefix in the injector dropdown - handy once you've accumulated a pile of presets.
The single output, extracted_tags, is a preview string (<mode>...<artist>...<style>...) that fires whether or not you saved. It's useful as a sanity check before you commit.
Two gotchas worth knowing. First, the injector reads the config file when the node is created, so a freshly saved preset won't show up in its dropdown until you recreate (or refresh) that node. Second, saving writes to the pack folder - if ComfyUI can't write there (read-only installs, weird permissions), the save fails with a console error and you're left with just the preview. Everything else about this node is pleasantly boring, which is the right kind of behavior for a utility.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| text_input | STRING | — | |
| preset_name | STRING | — | |
| save_trigger | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| extracted_tags | STRING | — |