Nodes/ComfyUI-ASSSSA/Load ASS subtitles
ComfyUI Node

Load ASS subtitles

Feed subtitle dialogue into your workflow as plain text

By HighDoping·Created about a year ago·Updated about a year ago· 1
Load ASS subtitles
    • all_text
    • dialog_only
    • styles_info
    ass_file_pathsubtitles.ass
    encodingutf-8
    max_lines0
    filter_style
    strip_formattingFalse

    ASSSubtitleReader is the odd one out in this pack: it doesn't touch ffmpeg at all. It's a pure-Python parser that reads an .ass subtitle file and hands the text to your workflow as strings. Why would you want that? Because subtitles aren't just output - they're data. You can hand the dialogue to an LLM node for translation or rewording, feed it into a search, pull the line count for pacing checks, or just dump the raw file into a prompt. For anime subs especially, the encoding list alone is worth the install.

    It parses the ASS format properly - sections, Dialogue: lines, styles - and gives you three outputs:

    • all_text - the entire file content, verbatim, as one string.
    • dialog_only - just the spoken dialogue, one line per subtitle, with the timing and position cruft stripped. This is the one you feed to an LLM.
    • styles_info - the raw Style: lines from the [V4+ Styles] section, so you can see what fonts/colors the file uses.

    The inputs that matter

    • ass_file_path - path to the .ass file. Same story as the rest of the pack: plain text, no file picker, so use an absolute path or one relative to where ComfyUI runs.
    • encoding - default utf-8, but here's the genuinely nice part: utf-8-sig, latin-1, cp1252, shift-jis, euc-jp, gbk, big5. Old or Japanese subtitle files in the wrong encoding are a classic mojibake disaster, and this node gives you the fix without a round trip through a text editor.
    • filter_style - only keep Dialogue: lines whose style name matches. Handy when a file mixes "Default" dialogue with OP/ED credit styles you don't want in your transcript.
    • strip_formatting - set to True and it strips ASS override codes like {\\pos(..)} and {\\b1} from the dialogue, leaving clean text. Do this before feeding an LLM; the formatting codes will just confuse it.
    • max_lines - cap how many dialogue lines come out (0 = everything).

    One thing to know: this is an ASS parser, not a universal subtitle reader. Feed it a .srt file and dialog_only will come back empty because there's no Dialogue: syntax to match - all_text still returns the raw content, but the parsing is ASS-shaped. If you're dealing with SRT, convert it first.

    Using it with the rest of the pack

    The natural pipeline: ASSSubtitleReader → LLM (translate/rewrite the dialogue) → ASSSubtitleSave → SubtitleEmbedding. You can rebuild a whole subtitled video from scratch, or just use the reader as an inspection tool. It's also genuinely handy as a way to extract the subtitle track you pulled with SubtitleExtraction and turn it into workflow-usable text.

    Installing

    It ships in the ComfyUI-ASSSSA pack. Install via ComfyUI Manager (search "ComfyUI-ASSSSA") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/HighDoping/ComfyUI_ASSSSA
    

    Restart ComfyUI and you're done. No pip packages, no models - and unlike the ffmpeg-backed nodes, this one works even if your FFmpeg install is missing, since it never calls out to it.

    CategoryComfyUI_ASSSSA

    Inputs (5)

    NameTypeDefaultDescription
    ass_file_pathSTRINGsubtitles.ass
    encodingoptCOMBOutf-8Character encoding of the ASS file
    max_linesoptINT00–10000Maximum number of lines to read (0 = all lines)
    filter_styleoptSTRINGOnly include lines with this style name (leave empty for all styles)
    strip_formattingoptCOMBOFalseRemove ASS formatting codes from text

    Outputs (3)

    NameTypeDescription
    all_textSTRING
    dialog_onlySTRING
    styles_infoSTRING