Merge branch 'main' into glary/widget-control-mode-e2e-tests

This commit is contained in:
Alexander Brown
2026-05-20 12:58:27 -07:00
committed by GitHub
81 changed files with 2050 additions and 249 deletions

View File

@@ -2,6 +2,8 @@ from __future__ import annotations
import time
from comfy_api.v0_0_2 import IO
class LongComboDropdown:
@classmethod
@@ -317,6 +319,30 @@ class NodeWithLegacyWidget:
def node_with_legacy_widget(self):
return ()
class NodeWithPriceBadge(IO.ComfyNode):
@classmethod
def define_schema(cls):
return IO.Schema(
node_id="DevToolsNodeWithPriceBadge",
display_name="Node With Price Badge",
description="An API node with a price badge",
inputs=[IO.Combo.Input("price", options=["1x", "2x", "3x"])],
is_api_node=True,
price_badge=IO.PriceBadge(
depends_on=IO.PriceBadgeDepends(widgets=["price"]),
expr="""
(
$p := widgets.price;
{"type":"usd","usd": $contains($p, "2x") ? 2 : $contains($p, "3x") ? 3 : 1}
)
""",
),
)
@classmethod
async def execute(cls, price):
return IO.NodeOutput()
class NodeWithComboControlWidget:
@classmethod
@@ -360,6 +386,7 @@ NODE_CLASS_MAPPINGS = {
"DevToolsNodeWithV2ComboInput": NodeWithV2ComboInput,
"DevToolsNodeWithComboControlWidget": NodeWithComboControlWidget,
"DevToolsNodeWithLegacyWidget": NodeWithLegacyWidget,
"DevToolsNodeWithPriceBadge": NodeWithPriceBadge,
}
NODE_DISPLAY_NAME_MAPPINGS = {
@@ -379,6 +406,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"DevToolsNodeWithV2ComboInput": "Node With V2 Combo Input",
"DevToolsNodeWithComboControlWidget": "Node With Combo Control Widget",
"DevToolsNodeWithLegacyWidget": "Node With Legacy Widget",
"DevToolsNodeWithPriceBadge": "Node With Price Badge",
}
__all__ = [