Nodes/MD Nodes/MD: Advanced Text Input
ComfyUI Node

MD: Advanced Text Input

A ComfyUI node in MD_Nodes/Text with 12 inputs and 6 outputs.

By MDMAchine·Created about a year ago·Updated 2 months ago· 14
MD: Advanced Text Input
    • processed_text
    • original_text
    • seed_used
    • selected_seed
    • text_length
    • wildcard_count
    text
    seed0
    seed_modefixed
    seed_list
    seed_offset0
    wildcard_modefalse
    strip_whitespacefalse
    lowercasefalse
    uppercasefalse
    remove_extra_spacestrue
    wildcard_syntaxcurly_braces
    debug_mode0 - Silent
    CategoryMD_Nodes/Text

    Inputs (12)

    NameTypeDefaultDescription
    textSTRINGTEXT INPUT • Purpose: Main text input area for prompts, YAML, JSON, etc. • Usage: Type raw text or use wildcards like {option1|option2}. • Note: Multi-line compatible.
    seedoptINT00–9007199254740991RANDOM SEED • Purpose: Controls randomization for wildcard selection. • Range: 0 to 9,007,199,254,740,991 (JS Safe Max). • Note: Ignored if 'seed_mode' is set to 'random'. ⭐ Recommended: Fixed value for reproducible generation.
    seed_modeoptCOMBOfixedSEED MODE • Purpose: Defines how the seed updates per execution. • Options: - fixed: Uses the exact seed value provided. - random: Generates a new seed every run. - increment: Auto-adds 1 to the seed (great for batches). ⭐ Recommended: 'fixed' for testing, 'increment' for batching.
    seed_listoptSTRINGSEED LIST (WILDCARD) • Purpose: Randomly pick ONE seed from a wildcard string. • Example: {1234|5678|9012} or __42|777|1337__ • Output: Outputs chosen value to the 'selected_seed' INT. ⭐ Recommended: Leave empty unless injecting specific seeds.
    seed_offsetoptINT00–9007199254740991SEED OFFSET • Purpose: Adds an integer offset to the seed before processing seed_list. • Effect: Helps reduce repetition in batch workflows. ⭐ Recommended: 0.
    wildcard_modeoptBOOLEANfalseWILDCARD MODE • Purpose: Enable processing of {opt1|opt2} or __opt1|opt2__ patterns. • Effect: If disabled, text passes through exactly as written. ⭐ Recommended: True if writing dynamic prompts.
    strip_whitespaceoptBOOLEANfalseSTRIP WHITESPACE • Purpose: Removes leading/trailing whitespace from the ENTIRE block. ⭐ Recommended: False (unless cleaning bad JSON/YAML).
    lowercaseoptBOOLEANfalseFORCE LOWERCASE • Purpose: Converts entire output text to lowercase. • Note: Overrides 'Force Uppercase' if both are true. ⭐ Recommended: False.
    uppercaseoptBOOLEANfalseFORCE UPPERCASE • Purpose: Converts entire output text to UPPERCASE. ⭐ Recommended: False.
    remove_extra_spacesoptBOOLEANtrueREMOVE EXTRA SPACES • Purpose: Collapses multiple spaces into single spaces. ⭐ Recommended: True (keeps prompts clean).
    wildcard_syntaxoptCOMBOcurly_bracesWILDCARD SYNTAX • Purpose: Choose the pattern style for wildcard parsing. • Options: {curly_braces} or __double_underscore__. ⭐ Recommended: curly_braces.
    debug_modeoptCOMBO0 - SilentLOGGING VERBOSITY • Controls console output and parser profiling.

    Outputs (6)

    NameTypeDescription
    processed_textSTRING
    original_textSTRING
    seed_usedINT
    selected_seedINT
    text_lengthINT
    wildcard_countINT