From 30b19c687249480c646f5800dc535af680eea5a2 Mon Sep 17 00:00:00 2001 From: Talmaj Marinc Date: Sat, 27 Jun 2026 10:18:24 +0200 Subject: [PATCH] Fix a bug if . in the teamplate field or id. --- comfy_api/latest/_io.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/comfy_api/latest/_io.py b/comfy_api/latest/_io.py index ebc015892..34c7e229c 100644 --- a/comfy_api/latest/_io.py +++ b/comfy_api/latest/_io.py @@ -1314,6 +1314,16 @@ class DynamicGroup(ComfyTypeI): assert len(field_ids) == len(set(field_ids)), ( f"DynamicGroup template field ids must be unique within a row. Got: {field_ids}" ) + # Reject "." in group id and template field ids: slot_id encoding uses "." as a + # delimiter (..), so any "." in these names would cause + # path.split(".") to produce the wrong number of segments during decoding. + assert "." not in id, ( + f"DynamicGroup id must not contain '.'. Got: '{id}'" + ) + for t in template: + assert "." not in t.id, ( + f"DynamicGroup template field id must not contain '.'. Got: '{t.id}'" + ) assert min >= 0, "DynamicGroup min must be >= 0." assert max >= 1, "DynamicGroup max must be >= 1." assert max <= DynamicGroup._MaxRows, f"DynamicGroup max must be <= {DynamicGroup._MaxRows}."