The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
fix: use frontend-compatible format for Float gradient_stops (#12789)
Terry Jia3fa8c5686dc8
diff --git a/comfy/comfy_types/node_typing.py b/comfy/comfy_types/node_typing.pyindex 92b1acbd5..57126fa4a 100644--- a/comfy/comfy_types/node_typing.py+++ b/comfy/comfy_types/node_typing.py@@ -176,8 +176,8 @@ class InputTypeOptions(TypedDict):"""COMBO type only. Specifies the configuration for a multi-select widget.Available after ComfyUI frontend v1.13.4https://github.com/Comfy-Org/ComfyUI_frontend/pull/2987"""- gradient_stops: NotRequired[list[list[float]]]- """Gradient color stops for gradientslider display mode. Each stop is [offset, r, g, b] (``FLOAT``)."""+ gradient_stops: NotRequired[list[dict]]+ """Gradient color stops for gradientslider display mode. Each stop is {"offset": float, "color": [r, g, b]}."""class HiddenInputTypeDict(TypedDict):diff --git a/comfy_api/latest/_io.py b/comfy_api/latest/_io.pyindex 050031dc0..7ca8f4e0c 100644--- a/comfy_api/latest/_io.py+++ b/comfy_api/latest/_io.py@@ -297,7 +297,7 @@ class Float(ComfyTypeIO):'''Float input.'''def __init__(self, id: str, display_name: str=None, optional=False, tooltip: str=None, lazy: bool=None,default: float=None, min: float=None, max: float=None, step: float=None, round: float=None,- display_mode: NumberDisplay=None, gradient_stops: list[list[float]]=None,+ display_mode: NumberDisplay=None, gradient_stops: list[dict]=None,socketless: bool=None, force_input: bool=None, extra_dict=None, raw_link: bool=None, advanced: bool=None):super().__init__(id, display_name, optional, tooltip, lazy, default, socketless, None, force_input, extra_dict, raw_link, advanced)self.min = min