Files
CavinHuang-comfyui-nodes-docs/docs/SeargeConditionMixing.md
2024-05-26 20:35:16 +08:00

1.2 KiB

Documentation

该节点便于将搜索条件整合进数据流中,增强数据处理和检索操作的特定性。

Input types

Optional

  • data
    • data参数作为节点的主要输入,允许在系统内传输和操作信息。
    • Comfy dtype: SRG_DATA_STREAM
    • Python dtype: Union[Dict[str, Any], None]

Output types

  • data
    • 输出数据是输入的修改版,现在包含搜索条件,可在后续流程中使用。
    • Comfy dtype: SRG_DATA_STREAM
    • Python dtype: Dict[str, Any]

Usage tips

  • Infra type: CPU

Source code

class SeargeConditionMixing:

    @classmethod
    def INPUT_TYPES(cls):
        return {'required': {}, 'optional': {'data': ('SRG_DATA_STREAM',)}}
    RETURN_TYPES = ('SRG_DATA_STREAM',)
    RETURN_NAMES = ('data',)
    FUNCTION = 'get'
    CATEGORY = UI.CATEGORY_UI_INPUTS

    @staticmethod
    def create_dict(example):
        return {UI.EXAMPLE: example}

    def get(self, data=None):
        if data is None:
            data = {}
        data[UI.S_CONDITION_MIXING] = self.create_dict('example')
        return (data,)