mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-12-18 10:33:01 +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)
|
add_dynamic_id_mapping(d, real_inputs, curr_prefix)
|
||||||
|
|
||||||
class TemplatePrefix(_AutogrowTemplate):
|
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)
|
super().__init__(input)
|
||||||
self.prefix = prefix
|
self.prefix = prefix
|
||||||
assert(min >= 0)
|
assert(min >= 0)
|
||||||
if not max:
|
assert(max >= 1)
|
||||||
max = 10
|
|
||||||
assert(max >= 2)
|
|
||||||
assert(max <= Autogrow._MaxNames)
|
assert(max <= Autogrow._MaxNames)
|
||||||
self.min = min
|
self.min = min
|
||||||
self.max = max
|
self.max = max
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user