Remove picture id from reference nodes
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -119,8 +119,10 @@ For locations:
|
||||
- Optional list of alternate match names.
|
||||
|
||||
- `picture_id`
|
||||
- Optional integer representing the intended `<Picture N>` identity.
|
||||
- This is authoring metadata, not the final socket position.
|
||||
- Optional integer representing the effective `<Picture N>` 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 `<Picture 1>`.
|
||||
@@ -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
|
||||
|
||||
|
||||
+1
-18
@@ -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={},
|
||||
|
||||
@@ -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 2>",
|
||||
"picture_id": None,
|
||||
"picture_label": "",
|
||||
"image": image,
|
||||
"summary": "Dave shown in <Picture 2>.",
|
||||
"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"], "<Picture 4>")
|
||||
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 9>",
|
||||
"picture_id": None,
|
||||
"picture_label": "",
|
||||
"image": image,
|
||||
"summary": "Coffee Shop shown in <Picture 9>.",
|
||||
"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]
|
||||
|
||||
Reference in New Issue
Block a user