ComfyUI Node

Path Sanitizer

A ComfyUI node in utils/string with 6 inputs and 1 output.

By logicalor·Created 8 months ago·Updated 8 months ago· 0
Path Sanitizer
    • sanitized_path
    input_string
    replacement_char_
    max_length255
    lowercasefalse
    strip_spacesfalse
    collapse_replacementtrue
    Categoryutils/string

    Inputs (6)

    NameTypeDefaultDescription
    input_stringSTRINGThe string to sanitize for filesystem use
    replacement_charoptSTRING_Character to replace invalid characters with
    max_lengthoptINT2551–255Maximum length of the sanitized path component
    lowercaseoptBOOLEANfalseConvert the result to lowercase
    strip_spacesoptBOOLEANfalseRemove all spaces from the result
    collapse_replacementoptBOOLEANtrueCollapse consecutive replacement characters into one

    Outputs (1)

    NameTypeDescription
    sanitized_pathSTRING