mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-06-03 10:02:09 +08:00
Fixed 'display' serialization for Float/IntergerInput, some commented out code made during exploration
This commit is contained in:
parent
0400497d5e
commit
937d2d5325
@ -143,7 +143,7 @@ class IntegerInput(WidgetInputV3, io_type="INT"):
|
||||
"max": self.max,
|
||||
"step": self.step,
|
||||
"control_after_generate": self.control_after_generate,
|
||||
"display_mode": self.display_mode,
|
||||
"display": self.display_mode, # NOTE: in frontend, the parameter is called "display"
|
||||
})
|
||||
|
||||
class FloatInput(WidgetInputV3, io_type="FLOAT"):
|
||||
@ -168,7 +168,7 @@ class FloatInput(WidgetInputV3, io_type="FLOAT"):
|
||||
"max": self.max,
|
||||
"step": self.step,
|
||||
"round": self.round,
|
||||
"display_mode": self.display_mode,
|
||||
"display": self.display_mode, # NOTE: in frontend, the parameter is called "display"
|
||||
})
|
||||
|
||||
class StringInput(WidgetInputV3, io_type="STRING"):
|
||||
@ -717,7 +717,10 @@ class TestNode(ComfyNodeV3):
|
||||
node_id="TestNode_v3",
|
||||
display_name="Test Node (V3)",
|
||||
category="v3_test",
|
||||
inputs=[IntegerInput("my_int")],
|
||||
inputs=[IntegerInput("my_int"),
|
||||
#AutoGrowDynamicInput("growing", ImageInput),
|
||||
MaskInput("thing"),
|
||||
],
|
||||
outputs=[ImageOutput("image_output")],
|
||||
hidden=[Hidden.api_key_comfy_org, Hidden.auth_token_comfy_org, Hidden.unique_id]
|
||||
)
|
||||
|
@ -2,7 +2,7 @@ import torch
|
||||
|
||||
from comfy_api.v3.io import (
|
||||
ComfyNodeV3, SchemaV3, CustomType, CustomInput, CustomOutput, InputBehavior, NumberDisplay,
|
||||
IntegerInput, MaskInput, ImageInput,
|
||||
IntegerInput, MaskInput, ImageInput, ComboDynamicInput,
|
||||
)
|
||||
|
||||
|
||||
@ -23,6 +23,16 @@ class V3TestNode(ComfyNodeV3):
|
||||
IntegerInput("some_int", display_name="new_name", min=0, tooltip="My tooltip 😎"),
|
||||
MaskInput("mask", behavior=InputBehavior.optional),
|
||||
ImageInput("image", display_name="new_image"),
|
||||
# IntegerInput("some_int", display_name="new_name", min=0, tooltip="My tooltip 😎", display=NumberDisplay.slider, ),
|
||||
# ComboDynamicInput("mask", behavior=InputBehavior.optional),
|
||||
# IntegerInput("some_int", display_name="new_name", min=0, tooltip="My tooltip 😎", display=NumberDisplay.slider,
|
||||
# dependent_inputs=[ComboDynamicInput("mask", behavior=InputBehavior.optional)],
|
||||
# dependent_values=[lambda my_value: IO.STRING if my_value < 5 else IO.NUMBER],
|
||||
# ),
|
||||
# ["option1", "option2". "option3"]
|
||||
# ComboDynamicInput["sdfgjhl", [ComboDynamicOptions("option1", [IntegerInput("some_int", display_name="new_name", min=0, tooltip="My tooltip 😎", display=NumberDisplay.slider, ImageInput(), MaskInput(), String()]),
|
||||
# CombyDynamicOptons("option2", [])
|
||||
# ]]
|
||||
],
|
||||
is_output_node=True,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user