Connect character profiles to slots

This commit is contained in:
2026-06-24 20:15:09 +02:00
parent 5f4f166631
commit aca1e2f421
3 changed files with 65 additions and 19 deletions
+24 -7
View File
@@ -989,7 +989,7 @@ class SxCPCharacterProfileSave:
return {
"required": {
"profile_name": ("STRING", {"default": "saved_character"}),
"source": (["metadata_json", "manual"], {"default": "metadata_json"}),
"source": (["metadata_json", "character_slot", "manual"], {"default": "metadata_json"}),
"subject_type": (["woman", "man"], {"default": "woman"}),
"age": ("STRING", {"default": ""}),
"body": ("STRING", {"default": ""}),
@@ -1002,11 +1002,12 @@ class SxCPCharacterProfileSave:
},
"optional": {
"metadata_json": ("STRING", {"default": "", "multiline": True}),
"character_slot": ("STRING", {"default": "", "multiline": True}),
},
}
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING")
RETURN_NAMES = ("character_profile", "descriptor", "profile_name", "saved_path", "status")
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING")
RETURN_NAMES = ("character_profile", "descriptor", "profile_name", "saved_path", "status", "character_cast")
FUNCTION = "build"
CATEGORY = "prompt_builder"
@@ -1024,11 +1025,13 @@ class SxCPCharacterProfileSave:
figure,
save_now,
metadata_json="",
character_slot="",
):
profile = build_character_profile_json(
profile_name=profile_name,
source=source,
metadata_json=metadata_json or "",
character_slot=character_slot or "",
subject_type=subject_type,
age=age,
body=body,
@@ -1039,7 +1042,14 @@ class SxCPCharacterProfileSave:
figure=figure,
save_now=save_now,
)
return profile["profile_json"], profile["descriptor"], profile["profile_name"], profile["saved_path"], profile["status"]
return (
profile["profile_json"],
profile["descriptor"],
profile["profile_name"],
profile["saved_path"],
profile["status"],
profile["profile_json"],
)
class SxCPCharacterProfileLoad:
@@ -1059,8 +1069,8 @@ class SxCPCharacterProfileLoad:
},
}
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING")
RETURN_NAMES = ("character_profile", "descriptor", "profile_name", "saved_path", "status")
RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING")
RETURN_NAMES = ("character_profile", "descriptor", "profile_name", "saved_path", "status", "character_cast")
FUNCTION = "build"
CATEGORY = "prompt_builder"
@@ -1083,7 +1093,14 @@ class SxCPCharacterProfileLoad:
rename_now=rename_now,
rename_to=rename_to,
)
return profile["profile_json"], profile["descriptor"], profile["profile_name"], profile["saved_path"], profile["status"]
return (
profile["profile_json"],
profile["descriptor"],
profile["profile_name"],
profile["saved_path"],
profile["status"],
profile["profile_json"],
)
class SxCPCaptionNaturalizer: