mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-05-10 14:36:07 +00:00
[NodeDef] Add documentation on multi_select input option (#7212)
This commit is contained in:
parent
3fc688aebd
commit
9b6cd9b874
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from typing import Literal, TypedDict
|
from typing import Literal, TypedDict
|
||||||
|
from typing_extensions import NotRequired
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ class IO(StrEnum):
|
|||||||
BOOLEAN = "BOOLEAN"
|
BOOLEAN = "BOOLEAN"
|
||||||
INT = "INT"
|
INT = "INT"
|
||||||
FLOAT = "FLOAT"
|
FLOAT = "FLOAT"
|
||||||
|
COMBO = "COMBO"
|
||||||
CONDITIONING = "CONDITIONING"
|
CONDITIONING = "CONDITIONING"
|
||||||
SAMPLER = "SAMPLER"
|
SAMPLER = "SAMPLER"
|
||||||
SIGMAS = "SIGMAS"
|
SIGMAS = "SIGMAS"
|
||||||
@ -66,6 +68,7 @@ class IO(StrEnum):
|
|||||||
b = frozenset(value.split(","))
|
b = frozenset(value.split(","))
|
||||||
return not (b.issubset(a) or a.issubset(b))
|
return not (b.issubset(a) or a.issubset(b))
|
||||||
|
|
||||||
|
|
||||||
class RemoteInputOptions(TypedDict):
|
class RemoteInputOptions(TypedDict):
|
||||||
route: str
|
route: str
|
||||||
"""The route to the remote source."""
|
"""The route to the remote source."""
|
||||||
@ -80,6 +83,14 @@ class RemoteInputOptions(TypedDict):
|
|||||||
refresh: int
|
refresh: int
|
||||||
"""The TTL of the remote input's value in milliseconds. Specifies the interval at which the remote input's value is refreshed."""
|
"""The TTL of the remote input's value in milliseconds. Specifies the interval at which the remote input's value is refreshed."""
|
||||||
|
|
||||||
|
|
||||||
|
class MultiSelectOptions(TypedDict):
|
||||||
|
placeholder: NotRequired[str]
|
||||||
|
"""The placeholder text to display in the multi-select widget when no items are selected."""
|
||||||
|
chip: NotRequired[bool]
|
||||||
|
"""Specifies whether to use chips instead of comma separated values for the multi-select widget."""
|
||||||
|
|
||||||
|
|
||||||
class InputTypeOptions(TypedDict):
|
class InputTypeOptions(TypedDict):
|
||||||
"""Provides type hinting for the return type of the INPUT_TYPES node function.
|
"""Provides type hinting for the return type of the INPUT_TYPES node function.
|
||||||
|
|
||||||
@ -133,9 +144,22 @@ class InputTypeOptions(TypedDict):
|
|||||||
"""Specifies which folder to get preview images from if the input has the ``image_upload`` flag.
|
"""Specifies which folder to get preview images from if the input has the ``image_upload`` flag.
|
||||||
"""
|
"""
|
||||||
remote: RemoteInputOptions
|
remote: RemoteInputOptions
|
||||||
"""Specifies the configuration for a remote input."""
|
"""Specifies the configuration for a remote input.
|
||||||
|
Available after ComfyUI frontend v1.9.7
|
||||||
|
https://github.com/Comfy-Org/ComfyUI_frontend/pull/2422"""
|
||||||
control_after_generate: bool
|
control_after_generate: bool
|
||||||
"""Specifies whether a control widget should be added to the input, adding options to automatically change the value after each prompt is queued. Currently only used for INT and COMBO types."""
|
"""Specifies whether a control widget should be added to the input, adding options to automatically change the value after each prompt is queued. Currently only used for INT and COMBO types."""
|
||||||
|
options: NotRequired[list[str | int | float]]
|
||||||
|
"""COMBO type only. Specifies the selectable options for the combo widget.
|
||||||
|
Prefer:
|
||||||
|
["COMBO", {"options": ["Option 1", "Option 2", "Option 3"]}]
|
||||||
|
Over:
|
||||||
|
[["Option 1", "Option 2", "Option 3"]]
|
||||||
|
"""
|
||||||
|
multi_select: NotRequired[MultiSelectOptions]
|
||||||
|
"""COMBO type only. Specifies the configuration for a multi-select widget.
|
||||||
|
Available after ComfyUI frontend v1.13.4
|
||||||
|
https://github.com/Comfy-Org/ComfyUI_frontend/pull/2987"""
|
||||||
|
|
||||||
|
|
||||||
class HiddenInputTypeDict(TypedDict):
|
class HiddenInputTypeDict(TypedDict):
|
||||||
|
Loading…
Reference in New Issue
Block a user