[Python] Comfyui, how to create a custom node that dynamically updates the sub-options based...

Discussão em 'Python' iniciado por Stack, Julho 30, 2025.

  1. Stack

    Stack Membro Participativo

    This custom node have a first option (main) to select the type of other options. I can´t get the condition to act as a selector to show a serie of options or the other.

    `@classmethod def INPUT_TYPES(s):

    return {
    "required": {
    "mode": (["text", "file"],)
    ...
    IF mode == "text":
    "text_content": ("STRING", {
    "multiline": False,
    "default": "Text",
    })
    ELSE:
    "file_path": ("STRING", {
    "multiline": False,
    "default": "/",
    })


    },
    }`


    i also can´t find an existing custom node that offers this type of selection and auto-update... anyone?

    i tried various options, including suggestions from Perpexity, without success.

    Continue reading...

Compartilhe esta Página