From 81a772291b0038505992ff34bd3dc47c3548e914 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Mon, 1 Dec 2025 22:23:18 -0800 Subject: [PATCH] Make TemplatePrefix max more clear, allow max == 1 --- comfy_api/latest/_io.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/comfy_api/latest/_io.py b/comfy_api/latest/_io.py index f71c6eaee..2e78c7f00 100644 --- a/comfy_api/latest/_io.py +++ b/comfy_api/latest/_io.py @@ -933,13 +933,11 @@ class Autogrow(ComfyTypeI): add_dynamic_id_mapping(d, real_inputs, curr_prefix) class TemplatePrefix(_AutogrowTemplate): - def __init__(self, input: Input, prefix: str, min: int=1, max: int=None): + def __init__(self, input: Input, prefix: str, min: int=1, max: int=10): super().__init__(input) self.prefix = prefix assert(min >= 0) - if not max: - max = 10 - assert(max >= 2) + assert(max >= 1) assert(max <= Autogrow._MaxNames) self.min = min self.max = max