Add gender to character helper
This commit is contained in:
@@ -28,10 +28,10 @@
|
||||
- Reads back the seven optional images for a selected MiniMax H3 plan scene, for example by connecting the current `clip_index`.
|
||||
|
||||
- `Dumas Character Helper`
|
||||
- Inputs: `image1`, `image2`, `image1_picture_id`, `image2_picture_id`, `character_id`, `name`, `alias`, `age`, `nationality`, `occupation`, `height_feet`, `height_inches`, `accent`, `general`
|
||||
- Inputs: `image1`, `image2`, `image1_picture_id`, `image2_picture_id`, `character_id`, `name`, `alias`, `gender`, `age`, `nationality`, `occupation`, `height_feet`, `height_inches`, `accent`, `general`
|
||||
- Outputs: `image1`, `image2`, `character_text`
|
||||
- Passes both images through unchanged and builds a character reference string such as `<Picture 2> and <Picture 3> reference the same character who is called Dave.`
|
||||
- Appends optional sentences for non-visual facts such as ID, alias, age, nationality, occupation, height, accent, and freeform notes only when those fields are valid and filled in.
|
||||
- Appends optional sentences for non-visual facts such as ID, alias, gender, age, nationality, occupation, height, accent, and freeform notes only when those fields are valid and filled in.
|
||||
|
||||
- `Dumas JSON String to Object`
|
||||
- Input: `json_string`
|
||||
|
||||
@@ -316,6 +316,7 @@ def _build_character_helper_text(
|
||||
character_id,
|
||||
name,
|
||||
alias,
|
||||
gender,
|
||||
age,
|
||||
nationality,
|
||||
occupation,
|
||||
@@ -329,6 +330,7 @@ def _build_character_helper_text(
|
||||
character_name = _normalize_free_text(name)
|
||||
character_id = _normalize_free_text(character_id)
|
||||
alias = _normalize_free_text(alias)
|
||||
gender = _normalize_free_text(gender)
|
||||
nationality = _normalize_free_text(nationality)
|
||||
occupation = _normalize_free_text(occupation)
|
||||
accent = _normalize_free_text(accent)
|
||||
@@ -364,6 +366,9 @@ def _build_character_helper_text(
|
||||
if alias:
|
||||
lines.append(f"{character_label} is also known as {alias}.")
|
||||
|
||||
if gender:
|
||||
lines.append(f"{character_label} is {gender}.")
|
||||
|
||||
if age_value is not None:
|
||||
lines.append(f"{character_label} is {age_value} years old.")
|
||||
|
||||
@@ -848,6 +853,14 @@ class DumasCharacterHelperNode:
|
||||
"tooltip": "Optional alternate name, codename, or nickname.",
|
||||
},
|
||||
),
|
||||
"gender": (
|
||||
"STRING",
|
||||
{
|
||||
"default": "",
|
||||
"multiline": False,
|
||||
"tooltip": "Optional gender field for non-visual character facts.",
|
||||
},
|
||||
),
|
||||
"age": (
|
||||
"STRING",
|
||||
{
|
||||
@@ -914,6 +927,7 @@ class DumasCharacterHelperNode:
|
||||
character_id,
|
||||
name,
|
||||
alias,
|
||||
gender,
|
||||
age,
|
||||
nationality,
|
||||
occupation,
|
||||
@@ -928,6 +942,7 @@ class DumasCharacterHelperNode:
|
||||
character_id,
|
||||
name,
|
||||
alias,
|
||||
gender,
|
||||
age,
|
||||
nationality,
|
||||
occupation,
|
||||
|
||||
@@ -252,6 +252,7 @@ class DumasImageNodeTests(unittest.TestCase):
|
||||
character_id="char_dave",
|
||||
name="Dave",
|
||||
alias="The Locksmith",
|
||||
gender="male",
|
||||
age="41",
|
||||
nationality="English",
|
||||
occupation="a detective",
|
||||
@@ -271,6 +272,7 @@ class DumasImageNodeTests(unittest.TestCase):
|
||||
"<Picture 3> is a frontal facial reference for Dave.\n"
|
||||
'The character ID string is "char_dave".\n'
|
||||
"Dave is also known as The Locksmith.\n"
|
||||
"Dave is male.\n"
|
||||
"Dave is 41 years old.\n"
|
||||
"Dave is English.\n"
|
||||
"Dave works as a detective.\n"
|
||||
@@ -293,6 +295,7 @@ class DumasImageNodeTests(unittest.TestCase):
|
||||
character_id="",
|
||||
name="",
|
||||
alias="",
|
||||
gender="",
|
||||
age="unknown",
|
||||
nationality="",
|
||||
occupation="",
|
||||
|
||||
Reference in New Issue
Block a user