From c8ddedbd57a74db758fd3e2cf421d9a613d45b24 Mon Sep 17 00:00:00 2001 From: Chris Dumas Date: Wed, 2 Sep 2026 13:20:38 +0000 Subject: [PATCH] Remove picture id from reference nodes --- README.md | 4 ++-- REFERENCE_SYSTEM_SPEC.md | 9 ++++----- dumas_image_nodes.py | 19 +------------------ tests/test_dumas_image_nodes.py | 27 ++++++++++++++++----------- 4 files changed, 23 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 387ec27..61a9bd2 100644 --- a/README.md +++ b/README.md @@ -61,12 +61,12 @@ - Reports the detected H3 base precision / quant format and the relevant compute-capability hints for the current card. - `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` - Builds one structured `REFERENCE` object carrying the conditioning image, identity description, wardrobe, general notes, and simple facts together. - `Dumas Location Reference` - - Inputs: `image`, `picture_id`, `location_id`, `name`, `alias`, `description`, `general` + - Inputs: `image`, `location_id`, `name`, `alias`, `description`, `general` - 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. diff --git a/REFERENCE_SYSTEM_SPEC.md b/REFERENCE_SYSTEM_SPEC.md index f5cc75a..91b182b 100644 --- a/REFERENCE_SYSTEM_SPEC.md +++ b/REFERENCE_SYSTEM_SPEC.md @@ -119,8 +119,10 @@ For locations: - Optional list of alternate match names. - `picture_id` - - Optional integer representing the intended `` identity. - - This is authoring metadata, not the final socket position. + - Optional integer representing the effective `` identity. + - 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` - Derived convenience text like ``. @@ -167,7 +169,6 @@ Recommended name: Inputs: - `image` -- `picture_id` - `character_id` - `name` - `alias` @@ -202,7 +203,6 @@ Recommended name: Inputs: - `image` -- `picture_id` - `location_id` - `name` - `alias` @@ -383,4 +383,3 @@ That is the change that removes the current ambiguity between: - character identity - wardrobe data - location / environment description - diff --git a/dumas_image_nodes.py b/dumas_image_nodes.py index 3bb208c..eac4b11 100644 --- a/dumas_image_nodes.py +++ b/dumas_image_nodes.py @@ -1611,13 +1611,6 @@ class DumasCharacterReferenceNode: return { "required": { "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": ( "STRING", { @@ -1726,7 +1719,6 @@ class DumasCharacterReferenceNode: def build_reference( self, image, - picture_id, character_id, name, alias, @@ -1747,7 +1739,6 @@ class DumasCharacterReferenceNode: explicit_id=character_id, name=name, aliases=alias, - picture_id=picture_id, description=description, wardrobe=wardrobe, general=general, @@ -1779,13 +1770,6 @@ class DumasLocationReferenceNode: return { "required": { "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": ( "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 ( make_reference( kind="location", @@ -1837,7 +1821,6 @@ class DumasLocationReferenceNode: explicit_id=location_id, name=name, aliases=alias, - picture_id=picture_id, description=description, general=general, facts={}, diff --git a/tests/test_dumas_image_nodes.py b/tests/test_dumas_image_nodes.py index 0ebe895..6725925 100644 --- a/tests/test_dumas_image_nodes.py +++ b/tests/test_dumas_image_nodes.py @@ -245,7 +245,6 @@ class DumasImageNodeTests(unittest.TestCase): result = node.build_reference( image=image, - picture_id="2", character_id="char_dave", name="Dave", alias="The Locksmith", @@ -270,10 +269,10 @@ class DumasImageNodeTests(unittest.TestCase): "id": "char-dave", "name": "Dave", "aliases": ["The Locksmith"], - "picture_id": 2, - "picture_label": "", + "picture_id": None, + "picture_label": "", "image": image, - "summary": "Dave shown in .", + "summary": "Dave reference.", "description": "Square jaw, tired eyes, cropped brown hair.", "wardrobe": "weathered red flight jacket, grey cargo shorts, black boots", "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): node = self.image_nodes.DumasCharacterReferenceNode() image = FakeTensorBatch() result = node.build_reference( image=image, - picture_id="4", character_id="", name="", alias="", @@ -313,8 +315,8 @@ class DumasImageNodeTests(unittest.TestCase): reference = result[0] self.assertEqual(reference["kind"], "character") - self.assertEqual(reference["picture_id"], 4) - self.assertEqual(reference["picture_label"], "") + self.assertIsNone(reference["picture_id"]) + self.assertEqual(reference["picture_label"], "") self.assertEqual(reference["wardrobe"], "") self.assertEqual(reference["general"], "") self.assertEqual(reference["facts"]["age"], "") @@ -325,7 +327,6 @@ class DumasImageNodeTests(unittest.TestCase): result = node.build_reference( image=image, - picture_id="9", location_id="coffee-shop-01", name="Coffee Shop", alias="Cafe Interior", @@ -340,10 +341,10 @@ class DumasImageNodeTests(unittest.TestCase): "id": "coffee-shop-01", "name": "Coffee Shop", "aliases": ["Cafe Interior"], - "picture_id": 9, - "picture_label": "", + "picture_id": None, + "picture_label": "", "image": image, - "summary": "Coffee Shop shown in .", + "summary": "Coffee Shop reference.", "description": "Warm tungsten lighting, narrow counter, rainy front window.", "wardrobe": "", "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): input_types = self.image_nodes.DumasAnchorStyleNode.INPUT_TYPES() options = input_types["required"]["anchor_style"][0]