Remove picture id from reference nodes

This commit is contained in:
2026-09-02 13:20:38 +00:00
parent 6684c5f2e0
commit c8ddedbd57
4 changed files with 23 additions and 36 deletions
+2 -2
View File
@@ -61,12 +61,12 @@
- Reports the detected H3 base precision / quant format and the relevant compute-capability hints for the current card. - Reports the detected H3 base precision / quant format and the relevant compute-capability hints for the current card.
- `Dumas Character Reference` - `Dumas Character Reference`
- Inputs: `image`, `picture_id`, `character_id`, `name`, `alias`, `gender`, `age`, `nationality`, `occupation`, `height_feet`, `height_inches`, `accent`, `description`, `general`, `wardrobe` - Inputs: `image`, `character_id`, `name`, `alias`, `gender`, `age`, `nationality`, `occupation`, `height_feet`, `height_inches`, `accent`, `description`, `general`, `wardrobe`
- Output: `reference` - Output: `reference`
- Builds one structured `REFERENCE` object carrying the conditioning image, identity description, wardrobe, general notes, and simple facts together. - Builds one structured `REFERENCE` object carrying the conditioning image, identity description, wardrobe, general notes, and simple facts together.
- `Dumas Location Reference` - `Dumas Location Reference`
- Inputs: `image`, `picture_id`, `location_id`, `name`, `alias`, `description`, `general` - Inputs: `image`, `location_id`, `name`, `alias`, `description`, `general`
- Output: `reference` - Output: `reference`
- Builds one structured `REFERENCE` object for a location/environment so H3 can use the same socket type for both character and scenic refs. - Builds one structured `REFERENCE` object for a location/environment so H3 can use the same socket type for both character and scenic refs.
+4 -5
View File
@@ -119,8 +119,10 @@ For locations:
- Optional list of alternate match names. - Optional list of alternate match names.
- `picture_id` - `picture_id`
- Optional integer representing the intended `<Picture N>` identity. - Optional integer representing the effective `<Picture N>` identity.
- This is authoring metadata, not the final socket position. - It is inferred by consumer nodes such as `Dumas H3 Long Videos` from the
connected socket position when that position is known.
- Producer nodes do not need a manual `picture_id` input.
- `picture_label` - `picture_label`
- Derived convenience text like `<Picture 1>`. - Derived convenience text like `<Picture 1>`.
@@ -167,7 +169,6 @@ Recommended name:
Inputs: Inputs:
- `image` - `image`
- `picture_id`
- `character_id` - `character_id`
- `name` - `name`
- `alias` - `alias`
@@ -202,7 +203,6 @@ Recommended name:
Inputs: Inputs:
- `image` - `image`
- `picture_id`
- `location_id` - `location_id`
- `name` - `name`
- `alias` - `alias`
@@ -383,4 +383,3 @@ That is the change that removes the current ambiguity between:
- character identity - character identity
- wardrobe data - wardrobe data
- location / environment description - location / environment description
+1 -18
View File
@@ -1611,13 +1611,6 @@ class DumasCharacterReferenceNode:
return { return {
"required": { "required": {
"image": ("IMAGE", {"tooltip": "Character reference image."}), "image": ("IMAGE", {"tooltip": "Character reference image."}),
"picture_id": (
["1", "2", "3", "4", "5", "6", "7", "8", "9"],
{
"default": "1",
"tooltip": "Authoring picture number for this reference.",
},
),
"character_id": ( "character_id": (
"STRING", "STRING",
{ {
@@ -1726,7 +1719,6 @@ class DumasCharacterReferenceNode:
def build_reference( def build_reference(
self, self,
image, image,
picture_id,
character_id, character_id,
name, name,
alias, alias,
@@ -1747,7 +1739,6 @@ class DumasCharacterReferenceNode:
explicit_id=character_id, explicit_id=character_id,
name=name, name=name,
aliases=alias, aliases=alias,
picture_id=picture_id,
description=description, description=description,
wardrobe=wardrobe, wardrobe=wardrobe,
general=general, general=general,
@@ -1779,13 +1770,6 @@ class DumasLocationReferenceNode:
return { return {
"required": { "required": {
"image": ("IMAGE", {"tooltip": "Location or environment reference image."}), "image": ("IMAGE", {"tooltip": "Location or environment reference image."}),
"picture_id": (
["1", "2", "3", "4", "5", "6", "7", "8", "9"],
{
"default": "1",
"tooltip": "Authoring picture number for this reference.",
},
),
"location_id": ( "location_id": (
"STRING", "STRING",
{ {
@@ -1829,7 +1813,7 @@ class DumasLocationReferenceNode:
} }
} }
def build_reference(self, image, picture_id, location_id, name, alias, description, general): def build_reference(self, image, location_id, name, alias, description, general):
return ( return (
make_reference( make_reference(
kind="location", kind="location",
@@ -1837,7 +1821,6 @@ class DumasLocationReferenceNode:
explicit_id=location_id, explicit_id=location_id,
name=name, name=name,
aliases=alias, aliases=alias,
picture_id=picture_id,
description=description, description=description,
general=general, general=general,
facts={}, facts={},
+16 -11
View File
@@ -245,7 +245,6 @@ class DumasImageNodeTests(unittest.TestCase):
result = node.build_reference( result = node.build_reference(
image=image, image=image,
picture_id="2",
character_id="char_dave", character_id="char_dave",
name="Dave", name="Dave",
alias="The Locksmith", alias="The Locksmith",
@@ -270,10 +269,10 @@ class DumasImageNodeTests(unittest.TestCase):
"id": "char-dave", "id": "char-dave",
"name": "Dave", "name": "Dave",
"aliases": ["The Locksmith"], "aliases": ["The Locksmith"],
"picture_id": 2, "picture_id": None,
"picture_label": "<Picture 2>", "picture_label": "",
"image": image, "image": image,
"summary": "Dave shown in <Picture 2>.", "summary": "Dave reference.",
"description": "Square jaw, tired eyes, cropped brown hair.", "description": "Square jaw, tired eyes, cropped brown hair.",
"wardrobe": "weathered red flight jacket, grey cargo shorts, black boots", "wardrobe": "weathered red flight jacket, grey cargo shorts, black boots",
"general": "wears a long grey coat", "general": "wears a long grey coat",
@@ -289,13 +288,16 @@ class DumasImageNodeTests(unittest.TestCase):
}, },
) )
def test_character_reference_input_types_do_not_expose_picture_id(self):
required = self.image_nodes.DumasCharacterReferenceNode.INPUT_TYPES()["required"]
self.assertNotIn("picture_id", required)
def test_character_reference_handles_missing_optional_fields(self): def test_character_reference_handles_missing_optional_fields(self):
node = self.image_nodes.DumasCharacterReferenceNode() node = self.image_nodes.DumasCharacterReferenceNode()
image = FakeTensorBatch() image = FakeTensorBatch()
result = node.build_reference( result = node.build_reference(
image=image, image=image,
picture_id="4",
character_id="", character_id="",
name="", name="",
alias="", alias="",
@@ -313,8 +315,8 @@ class DumasImageNodeTests(unittest.TestCase):
reference = result[0] reference = result[0]
self.assertEqual(reference["kind"], "character") self.assertEqual(reference["kind"], "character")
self.assertEqual(reference["picture_id"], 4) self.assertIsNone(reference["picture_id"])
self.assertEqual(reference["picture_label"], "<Picture 4>") self.assertEqual(reference["picture_label"], "")
self.assertEqual(reference["wardrobe"], "") self.assertEqual(reference["wardrobe"], "")
self.assertEqual(reference["general"], "") self.assertEqual(reference["general"], "")
self.assertEqual(reference["facts"]["age"], "") self.assertEqual(reference["facts"]["age"], "")
@@ -325,7 +327,6 @@ class DumasImageNodeTests(unittest.TestCase):
result = node.build_reference( result = node.build_reference(
image=image, image=image,
picture_id="9",
location_id="coffee-shop-01", location_id="coffee-shop-01",
name="Coffee Shop", name="Coffee Shop",
alias="Cafe Interior", alias="Cafe Interior",
@@ -340,10 +341,10 @@ class DumasImageNodeTests(unittest.TestCase):
"id": "coffee-shop-01", "id": "coffee-shop-01",
"name": "Coffee Shop", "name": "Coffee Shop",
"aliases": ["Cafe Interior"], "aliases": ["Cafe Interior"],
"picture_id": 9, "picture_id": None,
"picture_label": "<Picture 9>", "picture_label": "",
"image": image, "image": image,
"summary": "Coffee Shop shown in <Picture 9>.", "summary": "Coffee Shop reference.",
"description": "Warm tungsten lighting, narrow counter, rainy front window.", "description": "Warm tungsten lighting, narrow counter, rainy front window.",
"wardrobe": "", "wardrobe": "",
"general": "Evening ambience, cramped but cozy.", "general": "Evening ambience, cramped but cozy.",
@@ -351,6 +352,10 @@ class DumasImageNodeTests(unittest.TestCase):
}, },
) )
def test_location_reference_input_types_do_not_expose_picture_id(self):
required = self.image_nodes.DumasLocationReferenceNode.INPUT_TYPES()["required"]
self.assertNotIn("picture_id", required)
def test_anchor_style_node_exposes_requested_presets(self): def test_anchor_style_node_exposes_requested_presets(self):
input_types = self.image_nodes.DumasAnchorStyleNode.INPUT_TYPES() input_types = self.image_nodes.DumasAnchorStyleNode.INPUT_TYPES()
options = input_types["required"]["anchor_style"][0] options = input_types["required"]["anchor_style"][0]