节点参考与 API(1/3)

```json { "$ref": "#/definitions/ComfyNodeDefV1", "definitions": { "ComfyNodeDefV1": { "type": "object", "properties": { "input": { "type": "object", "properties": { "required": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "const": "INT" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": { "anyOf": [ { "type": "number" }, { "type": "array", "items": { "type": "number" } } ] }, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "min": { "type": "number" }, "max": { "type": "number" }, "step": { "type": "number" }, "display": { "type": "string", "enum": [ "slider", "number", "knob" ] }, "control_after_generate": { "type": "boolean" } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "const": "FLOAT" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": { "anyOf": [ { "type": "number" }, { "type": "array", "items": { "type": "number" } } ] }, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "min": { "type": "number" }, "max": { "type": "number" }, "step": { "type": "number" }, "display": { "type": "string", "enum": [ "slider", "number", "knob" ] }, "round": { "anyOf": [ { "type": "number" }, { "type": "boolean", "const": false } ] } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "const": "BOOLEAN" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": { "type": "boolean" }, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "label_on": { "type": "string" }, "label_off": { "type": "string" } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "const": "STRING" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": { "type": "string" }, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "multiline": { "type": "boolean" }, "dynamicPrompts": { "type": "boolean" }, "defaultVal": { "type": "string" }, "placeholder": { "type": "string" } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "array", "items": { "type": [ "string", "number" ] } }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": {}, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "control_after_generate": { "type": "boolean" }, "image_upload": { "type": "boolean" }, "image_folder": { "type": "string", "enum": [ "input", "output", "temp" ] }, "allow_batch": { "type": "boolean" }, "video_upload": { "type": "boolean" }, "remote": { "type": "object", "properties": { "route": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "string", "pattern": "^\/" } ] }, "refresh": { "anyOf": [ { "type": "number", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "number", "maximum": 9007199254740991, "minimum": -9007199254740991 } ] }, "response_key": { "type": "string" }, "query_params": { "type": "object", "additionalProperties": { "type": "string" } }, "refresh_button": { "type": "boolean" }, "control_after_refresh": { "type": "string", "enum": [ "first", "last" ] }, "timeout": { "type": "number", "minimum": 0 }, "max_retries": { "type": "number", "minimum": 0 } }, "required": [ "route" ], "additionalProperties": false }, "options": { "type": "array", "items": { "type": [ "string", "number" ] } } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "const": "COMBO" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": {}, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "control_after_generate": { "type": "boolean" }, "image_upload": { "type": "boolean" }, "image_folder": { "type": "string", "enum": [ "input", "output", "temp" ] }, "allow_batch": { "type": "boolean" }, "video_upload": { "type": "boolean" }, "remote": { "type": "object", "properties": { "route": { "anyOf": [ { "type": "string", "format": "uri" }, { "type": "string", "pattern": "^\/" } ] }, "refresh": { "anyOf": [ { "type": "number", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "number", "maximum": 9007199254740991, "minimum": -9007199254740991 } ] }, "response_key": { "type": "string" }, "query_params": { "type": "object", "additionalProperties": { "type": "string" } }, "refresh_button": { "type": "boolean" }, "control_after_refresh": { "type": "string", "enum": [ "first", "last" ] }, "timeout": { "type": "number", "minimum": 0 }, "max_retries": { "type": "number", "minimum": 0 } }, "required": [ "route" ], "additionalProperties": false }, "options": { "type": "array", "items": { "type": [ "string", "number" ] } } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": {}, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" } }, "additionalProperties": true } ] } ] } ] } }, "optional": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "const": "INT" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": { "anyOf": [ { "type": "number" }, { "type": "array", "items": { "type": "number" } } ] }, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "min": { "type": "number" }, "max": { "type": "number" }, "step": { "type": "number" }, "display": { "type": "string", "enum": [ "slider", "number", "knob" ] }, "control_after_generate": { "type": "boolean" } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "const": "FLOAT" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": { "anyOf": [ { "type": "number" }, { "type": "array", "items": { "type": "number" } } ] }, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "min": { "type": "number" }, "max": { "type": "number" }, "step": { "type": "number" }, "display": { "type": "string", "enum": [ "slider", "number", "knob" ] }, "round": { "anyOf": [ { "type": "number" }, { "type": "boolean", "const": false } ] } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "const": "BOOLEAN" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": { "type": "boolean" }, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "label_on": { "type": "string" }, "label_off": { "type": "string" } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "const": "STRING" }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": { "type": "string" }, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "multiline": { "type": "boolean" }, "dynamicPrompts": { "type": "boolean" }, "defaultVal": { "type": "string" }, "placeholder": { "type": "string" } }, "additionalProperties": true } ] } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "array", "items": { "type": [ "string", "number" ] } }, { "anyOf": [ { "not": {} }, { "type": "object", "properties": { "default": {}, "defaultInput": { "type": "boolean" }, "forceInput": { "type": "boolean" }, "tooltip": { "type": "string" }, "hidden": { "type": "boolean" }, "advanced": { "type": "boolean" }, "rawLink": { "type": "boolean" }, "lazy": { "type": "boolean" }, "control_after_generate": { "type": "boolean" }, "image_upload": { "type": "boolean" }, "image_folder": { "type": "string", "enum": [ "input", "output", "temp" ] }, "allow_batch": { "type": "boolean" }, "