mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 09:00:05 +00:00
Allow INT/FLOAT represent list of numbers (#274)
This commit is contained in:
@@ -188,7 +188,9 @@ const zIntInputSpec = inputSpec([
|
||||
min: z.number().optional(),
|
||||
max: z.number().optional(),
|
||||
step: z.number().optional(),
|
||||
default: z.number().optional()
|
||||
// Note: Many node authors are using INT to pass list of INT.
|
||||
// TODO: Add list of ints type.
|
||||
default: z.union([z.number(), z.array(z.number())]).optional()
|
||||
})
|
||||
])
|
||||
|
||||
@@ -199,7 +201,9 @@ const zFloatInputSpec = inputSpec([
|
||||
max: z.number().optional(),
|
||||
step: z.number().optional(),
|
||||
round: z.union([z.number(), z.literal(false)]).optional(),
|
||||
default: z.number().optional()
|
||||
// Note: Many node authors are using FLOAT to pass list of FLOAT.
|
||||
// TODO: Add list of floats type.
|
||||
default: z.union([z.number(), z.array(z.number())]).optional()
|
||||
})
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user