mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-12-18 02:23:06 +08:00
Make TemplatePrefix max more clear, allow max == 1
This commit is contained in:
parent
aec77e6913
commit
81a772291b
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user