mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-12 03:22:37 +08:00
Merge 97ba2a5155 into a500f1edac
This commit is contained in:
commit
1ca46786ce
@ -91,6 +91,46 @@ class SoftSwitchNode(io.ComfyNode):
|
|||||||
return io.NodeOutput(on_true if switch else on_false)
|
return io.NodeOutput(on_true if switch else on_false)
|
||||||
|
|
||||||
|
|
||||||
|
class SwitchInverseNode(SwitchNode):
|
||||||
|
@classmethod
|
||||||
|
def define_schema(cls):
|
||||||
|
template = io.MatchType.Template("switch")
|
||||||
|
return io.Schema(
|
||||||
|
node_id="ComfySwitchInverseNode",
|
||||||
|
display_name="Switch (Inverse)",
|
||||||
|
category="logic",
|
||||||
|
is_experimental=True,
|
||||||
|
inputs=[
|
||||||
|
io.Boolean.Input("switch"),
|
||||||
|
io.MatchType.Input("on_true", template=template, lazy=True),
|
||||||
|
io.MatchType.Input("on_false", template=template, lazy=True),
|
||||||
|
],
|
||||||
|
outputs=[
|
||||||
|
io.MatchType.Output(template=template, display_name="output"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class SoftSwitchInverseNode(SoftSwitchNode):
|
||||||
|
@classmethod
|
||||||
|
def define_schema(cls):
|
||||||
|
template = io.MatchType.Template("switch")
|
||||||
|
return io.Schema(
|
||||||
|
node_id="ComfySoftSwitchInverseNode",
|
||||||
|
display_name="Soft Switch (Inverse)",
|
||||||
|
category="logic",
|
||||||
|
is_experimental=True,
|
||||||
|
inputs=[
|
||||||
|
io.Boolean.Input("switch"),
|
||||||
|
io.MatchType.Input("on_true", template=template, lazy=True, optional=True),
|
||||||
|
io.MatchType.Input("on_false", template=template, lazy=True, optional=True),
|
||||||
|
],
|
||||||
|
outputs=[
|
||||||
|
io.MatchType.Output(template=template, display_name="output"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class CustomComboNode(io.ComfyNode):
|
class CustomComboNode(io.ComfyNode):
|
||||||
"""
|
"""
|
||||||
Frontend node that allows user to write their own options for a combo.
|
Frontend node that allows user to write their own options for a combo.
|
||||||
@ -260,8 +300,10 @@ class LogicExtension(ComfyExtension):
|
|||||||
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
||||||
return [
|
return [
|
||||||
SwitchNode,
|
SwitchNode,
|
||||||
|
SwitchInverseNode,
|
||||||
CustomComboNode,
|
CustomComboNode,
|
||||||
# SoftSwitchNode,
|
# SoftSwitchNode,
|
||||||
|
# SoftSwitchInverseNode,
|
||||||
# ConvertStringToComboNode,
|
# ConvertStringToComboNode,
|
||||||
# DCTestNode,
|
# DCTestNode,
|
||||||
# AutogrowNamesTestNode,
|
# AutogrowNamesTestNode,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user