Add split workflow nodes and profile controls

This commit is contained in:
2026-06-24 12:40:34 +02:00
parent 543e2feab7
commit 9c72af0585
6 changed files with 1364 additions and 0 deletions
+74
View File
@@ -8,6 +8,13 @@ The node is registered as:
- `prompt_builder / SxCP Prompt Builder`
- `prompt_builder / SxCP Seed Control`
- `prompt_builder / SxCP Camera Control`
- `prompt_builder / SxCP Category Preset`
- `prompt_builder / SxCP Cast Control`
- `prompt_builder / SxCP Generation Profile`
- `prompt_builder / SxCP Advanced Filters`
- `prompt_builder / SxCP Prompt Builder From Configs`
- `prompt_builder / SxCP Character Profile Save`
- `prompt_builder / SxCP Character Profile Load`
- `prompt_builder / SxCP Caption Naturalizer`
- `prompt_builder / SxCP Krea2 Formatter`
- `prompt_builder / SxCP Insta/OF Options`
@@ -22,6 +29,71 @@ It outputs:
- `category`
- `subcategory`
## Split Workflow Nodes
The original `SxCP Prompt Builder` remains available as the full all-in-one
node. For cleaner workflows, use the split nodes:
- `SxCP Category Preset` outputs `category_config` for broad intent such as
women casual, men casual, couple casual, provocative erotic, or hardcore pose.
- `SxCP Cast Control` outputs `cast_config` plus raw `women_count` and
`men_count`, so couple/two-women/two-men/group setups can be reused.
- `SxCP Generation Profile` outputs `generation_profile` for common behavior
presets such as casual-clean, evocative-softcore, hardcore-intense,
Krea2-friendly, or Flux-original.
- `SxCP Advanced Filters` outputs `filter_config` for ethnicity, figure, and
exclusion filters.
- `SxCP Prompt Builder From Configs` consumes those config outputs and produces
the same prompt, negative, caption, metadata, category, and subcategory
outputs as the full builder.
The practical compact workflow is:
`Category Preset` + `Cast Control` + `Generation Profile` + optional
`Advanced Filters`, `Seed Control`, `Camera Control`, and `Character Profile`
into `Prompt Builder From Configs`.
An importable example is included at
`examples/split_profile_reuse_workflow.json`. It shows a two-pass setup:
1. Generate a casual woman prompt and extract a character profile from
`metadata_json`.
2. Reuse that profile in a second prompt builder with a different seed, keeping
the same character while changing the outfit/scene.
3. Send the reused-profile metadata to both `Caption Naturalizer` and
`Krea2 Formatter`.
## Character Profiles
`SxCP Character Profile Save` extracts a reusable woman/man profile from
`metadata_json` or from manual fields. The profile stores age, body/body phrase,
skin, hair, eyes, figure, and subject type. It only writes a file when
the `Save Profile Now` button is clicked; otherwise it just outputs profile JSON
for direct wiring. Saved files are written under `profiles/<profile_name>.json`;
saved profile files are ignored by git. The button is backed by the hidden
`save_now` trigger and queues the workflow once.
`SxCP Character Profile Load` has an `enabled` switch. When disabled, it returns
an empty profile so connected prompt builders ignore it. When enabled, it loads
a saved profile by selector or passes through a connected fallback profile JSON.
It also has explicit file-operation triggers:
- `Delete Selected Profile`: deletes the selected saved profile.
- `Rename Selected Profile` + `rename_to`: renames the selected saved profile.
Delete and rename are conservative: if both triggers are enabled together,
nothing happens; rename does not overwrite an existing target profile. The
buttons are backed by hidden `delete_now` and `rename_now` triggers and queue
the workflow once.
Connect the loader's `character_profile` output to `SxCP Prompt Builder`,
`SxCP Prompt Builder From Configs`, or `SxCP Insta/OF Prompt Pair`.
Profile reuse currently applies to structured JSON-category single woman/man
rows and to the primary creator in Insta/OF pair mode. The outfit, scene, pose,
expression, and composition can still change while the saved character
appearance remains stable.
`SxCP Seed Control` outputs `seed_config`, which can be connected to the prompt
builder's optional `seed_config` input.
@@ -190,6 +262,8 @@ or reload ComfyUI after changing JSON so dropdown choices are rebuilt.
Included JSON categories:
- `Casual clothes`
- `Men casual clothes`
- `Couple casual clothes`
- `Provocative erotic clothes`
- `Hardcore sexual poses`