Nodes/ikki Pack/LLM Prompt Parser πŸ“‹
ComfyUI Node

LLM Prompt Parser πŸ“‹

The 'LLM' in the name is a lie β€” and that's why it's useful

By RedsAnalysisΒ·Created 2 months agoΒ·Updated about a month agoΒ· 0
LLM Prompt Parser πŸ“‹
    • QUALITY
    • CHARACTER_AND_SERIES
    • APPEARANCE
    • POSE
    • EXPRESSION
    • CLOTHING
    • CAMERA
    • LIGHTING
    • BACKGROUND
    • EFFECTS
    β—„textβ–Ί

    Call it LLM Prompt Parser and people assume it calls some API, loads a 7B model, or needs a key. None of that is true. IkkiPromptParser is a pure regex parser - zero network, zero model, zero dependencies - that takes a structured prompt (the kind a real LLM writes when you ask it for one) and splits it into ten category outputs you can wire into separate parts of your workflow.

    Why would you want that? Because structured prompts are getting common. Ask any decent chat model to write a ComfyUI prompt and it'll hand you something like:

    Quality: masterpiece, best quality, sharp focus
    Character and Series: a young woman, original
    Appearance: silver hair, blue eyes, gentle smile
    Clothing: black turtleneck
    Camera: close-up, 85mm
    Lighting: soft window light
    Background: cozy cafe
    

    That's a great prompt for a person to read, but it's one blob of text - you can't restyle just the clothing without retyping everything. The parser reads the Category: value structure, strips the formatting, and outputs each category on its own wire: QUALITY, CHARACTER_AND_SERIES, APPEARANCE, POSE, EXPRESSION, CLOTHING, CAMERA, LIGHTING, BACKGROUND, EFFECTS. Each output is cleaned (newlines collapsed to commas, empty segments dropped). Then you rebuild the prompt with IkkiPromptCombiner, and now "change the outfit" means editing one node.

    How the parsing works

    It looks for the ten category labels followed by a colon, case-insensitively, and splits on them. Text before the first category label is treated as Quality. It also recognizes "Character" as a shorthand for "Character and Series." If the input has no category labels at all, the whole text goes to QUALITY - so pasting an unstructured prompt is safe, it just won't help you.

    The honest limitations

    • The categories are fixed. Ten buckets, that's it. If your LLM writes "Environment:" or "Composition:", it gets lumped into whatever came before, or lost. The parser only understands its own ten labels.
    • It's a formatter, not a judge. It won't improve your prompt, remove duplicates, or fix grammar - it only re-buckets what the LLM already structured. The KB's LLM-in-ComfyUI essay is clear that the actual quality work happens upstream in the model that wrote the prompt.
    • Output slot order matters when wiring. The sockets are positional and named - plugging a parser into the pack's Text Box Switch nodes relies on matching output index to category name, which the switch's auto-rename handles for you.

    Install

    Via ComfyUI Manager (search "ikki") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/RedsAnalysis/comfyui-ikki-pack
    # restart ComfyUI
    

    No dependencies - this is the safest kind of "LLM" node to install, because it can't phone home.

    The workflow it's built for

    The pack's example workflow chains it as: LLM writes a structured prompt β†’ IkkiPromptParser splits it β†’ each category feeds an IkkiTextBoxSwitch (which can even sync itself to a category from the parser) β†’ IkkiPromptCombiner reassembles the positive prompt. That gives you a prompt that's editable by category in one screen. If you already prompt with an LLM, this is the missing glue; if you hand-write prompts, you'll probably never use it. For a brand-new pack with thin docs, the parser is simple, dependency-free, and does exactly one thing - refreshingly trustworthy.

    CategoryIkkiPack/Prompt

    Inputs (1)

    NameTypeDefaultDescription
    textSTRINGβ€”

    Outputs (10)

    NameTypeDescription
    QUALITYSTRINGβ€”
    CHARACTER_AND_SERIESSTRINGβ€”
    APPEARANCESTRINGβ€”
    POSESTRINGβ€”
    EXPRESSIONSTRINGβ€”
    CLOTHINGSTRINGβ€”
    CAMERASTRINGβ€”
    LIGHTINGSTRINGβ€”
    BACKGROUNDSTRINGβ€”
    EFFECTSSTRINGβ€”