ComfyUI Node

ConvertToEnglish

Turn 01 into AB, the laziest string transformer

By 438443467·Created 2 years ago·Updated about a year ago· 27
ConvertToEnglish
    • text
    number

    Every digit in your input string becomes a letter: 0→A, 1→B, 2→C, and so on through 9→J. Non-digits pass through untouched. That's the whole node, and honestly it's the sort of thing you could do in three lines of Python - which is probably why it exists, because this pack is full of small utilities its author wanted without importing a bigger toolkit.

    What you'd use it for

    The realistic use case is turning a numeric counter into a filename-safe letter sequence. ComfyUI's batch systems love giving you integers; some downstream tools, dataset organizers, and old workflows expect alphabetical suffixes (A, B, C...). Feed ConvertToEnglish the string form of a counter and it produces the letter equivalent - "1""B", "12""BC", "0""A". You can also feed it mixed strings like "img_01""img_AB", since non-digit characters are left alone. The mismatch to watch: it maps by character, not by number, so "10" becomes "BA" (1→B, 0→A), not a tenth letter. If you wanted base-26 numbering you're in the wrong node.

    Inputs and outputs

    One input: number (STRING - yes, it's typed as a string; type numbers into it and it'll still work since the conversion is character-based). One output: text (STRING) with the conversion applied.

    Honest assessment

    This is a one-line convenience node with zero hidden depth: no state, no files, no API, no failure modes worth discussing. If your downstream expects a letter and your upstream gives you a number, it saves you a math node or a text-editor detour. If it's not in your node list after installing, that's the pack's standard story - the "Sanmi Simple Nodes" were removed in the April 2025 rewrite, so this node only exists in the repo's older history (Load_Image_Batch.py). For a letter-suffix need that's actually worth the install, a maintained string-utility pack will serve you better long term.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/438443467/ComfyUI-GPT4V-Image-Captioner
    

    Restart ComfyUI. No models, no dependencies worth mentioning - it's a pure string function.

    CategorySanmi Simple Nodes/Simple NODE

    Inputs (1)

    NameTypeDefaultDescription
    numberSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING