mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-06 11:47:03 +08:00
Add String (Multiline) node (#93)
This commit is contained in:
parent
1f5818aa00
commit
aad07cb34c
@ -21,6 +21,21 @@ class String(ComfyNodeABC):
|
|||||||
return (value,)
|
return (value,)
|
||||||
|
|
||||||
|
|
||||||
|
class StringMultiline(ComfyNodeABC):
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(cls) -> InputTypeDict:
|
||||||
|
return {
|
||||||
|
"required": {"value": (IO.STRING, {"multiline": True,},)},
|
||||||
|
}
|
||||||
|
|
||||||
|
RETURN_TYPES = (IO.STRING,)
|
||||||
|
FUNCTION = "execute"
|
||||||
|
CATEGORY = "utils/primitive"
|
||||||
|
|
||||||
|
def execute(self, value: str) -> tuple[str]:
|
||||||
|
return (value,)
|
||||||
|
|
||||||
|
|
||||||
class Int(ComfyNodeABC):
|
class Int(ComfyNodeABC):
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(cls) -> InputTypeDict:
|
def INPUT_TYPES(cls) -> InputTypeDict:
|
||||||
@ -68,6 +83,7 @@ class Boolean(ComfyNodeABC):
|
|||||||
|
|
||||||
NODE_CLASS_MAPPINGS = {
|
NODE_CLASS_MAPPINGS = {
|
||||||
"PrimitiveString": String,
|
"PrimitiveString": String,
|
||||||
|
"PrimitiveStringMultiline": StringMultiline,
|
||||||
"PrimitiveInt": Int,
|
"PrimitiveInt": Int,
|
||||||
"PrimitiveFloat": Float,
|
"PrimitiveFloat": Float,
|
||||||
"PrimitiveBoolean": Boolean,
|
"PrimitiveBoolean": Boolean,
|
||||||
@ -75,6 +91,7 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
|
|
||||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||||
"PrimitiveString": "String",
|
"PrimitiveString": "String",
|
||||||
|
"PrimitiveStringMultiline": "String (Multiline)",
|
||||||
"PrimitiveInt": "Int",
|
"PrimitiveInt": "Int",
|
||||||
"PrimitiveFloat": "Float",
|
"PrimitiveFloat": "Float",
|
||||||
"PrimitiveBoolean": "Boolean",
|
"PrimitiveBoolean": "Boolean",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user