mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-08 10:47:32 +08:00
fix: update typed wrapper unwrap keys to __type__ and __value__
This commit is contained in:
parent
cb64b957f2
commit
7f5abae149
@ -1239,17 +1239,15 @@ class BoundingBox(ComfyTypeIO):
|
|||||||
|
|
||||||
@comfytype(io_type="CURVE")
|
@comfytype(io_type="CURVE")
|
||||||
class Curve(ComfyTypeIO):
|
class Curve(ComfyTypeIO):
|
||||||
Type = list
|
CurvePoint = tuple[float, float]
|
||||||
|
Type = list[CurvePoint]
|
||||||
|
|
||||||
class Input(WidgetInput):
|
class Input(WidgetInput):
|
||||||
def __init__(self, id: str, display_name: str=None, optional=False, tooltip: str=None,
|
def __init__(self, id: str, display_name: str=None, optional=False, tooltip: str=None,
|
||||||
socketless: bool=True, default: list=None, advanced: bool=None):
|
socketless: bool=True, default: list[tuple[float, float]]=None, advanced: bool=None):
|
||||||
super().__init__(id, display_name, optional, tooltip, None, default, socketless, None, None, None, None, advanced)
|
super().__init__(id, display_name, optional, tooltip, None, default, socketless, None, None, None, None, advanced)
|
||||||
if default is None:
|
if default is None:
|
||||||
self.default = [[0, 0], [1, 1]]
|
self.default = [[0.0, 0.0], [1.0, 1.0]]
|
||||||
|
|
||||||
def as_dict(self):
|
|
||||||
return super().as_dict()
|
|
||||||
|
|
||||||
|
|
||||||
DYNAMIC_INPUT_LOOKUP: dict[str, Callable[[dict[str, Any], dict[str, Any], tuple[str, dict[str, Any]], str, list[str] | None], None]] = {}
|
DYNAMIC_INPUT_LOOKUP: dict[str, Callable[[dict[str, Any], dict[str, Any], tuple[str, dict[str, Any]], str, list[str] | None], None]] = {}
|
||||||
|
|||||||
13
execution.py
13
execution.py
@ -876,10 +876,15 @@ async def validate_inputs(prompt_id, prompt, item, validated):
|
|||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
# Unwraps values wrapped in __value__ key. This is used to pass
|
# Unwraps values wrapped in __value__ key or typed wrapper.
|
||||||
# list widget value to execution, as by default list value is
|
# This is used to pass list widget values to execution,
|
||||||
# reserved to represent the connection between nodes.
|
# as by default list value is reserved to represent the
|
||||||
if isinstance(val, dict) and "__value__" in val:
|
# connection between nodes.
|
||||||
|
if isinstance(val, dict):
|
||||||
|
if "__value__" in val:
|
||||||
|
val = val["__value__"]
|
||||||
|
inputs[x] = val
|
||||||
|
elif "__type__" in val and "__value__" in val:
|
||||||
val = val["__value__"]
|
val = val["__value__"]
|
||||||
inputs[x] = val
|
inputs[x] = val
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user