Nodes/ComfyUI_LiteLLM/MarkdownNode
ComfyUI Node

MarkdownNode

MarkdownNode renders Markdown while passing text through

By Hopping-Mad-Games·Created 2 years ago·Updated 11 months ago· 7
MarkdownNode
    • Markdown Output
    markdown_inputEnter Markdown text here...

    Sometimes the most useful node in a workflow is the one that just makes things readable. MarkdownNode does exactly that: it renders whatever Markdown you type or wire in as formatted HTML on the node itself, and passes the raw Markdown string straight through as its output.

    It sounds trivial. It isn't, once you've squinted at a wall of plain text trying to figure out which of your 40 nodes produced that prompt fragment. Drop one of these at a junction, keep your notes as proper headings and bullets, and the graph stops being a jumble of unreadable strings.

    How it works

    Two inputs on the surface, one real one: markdown_input is the multiline text field (default "Enter Markdown text here..."), and that's it - there's no optional second input. The node runs the text through the markdown library to get HTML, hands that HTML to the UI so it renders formatted on the node, and returns the original Markdown string as its single Markdown Output (STRING).

    That split is the whole trick and worth internalizing: what you see (formatted) and what you get (raw Markdown) are different things. The rendered version is display-only; downstream nodes receive the untouched source. So you can use it as a documentation/annotation layer mid-graph and nothing downstream is affected - the node is a pure passthrough for anything you wire through it.

    Use cases that actually come up:

    • Keeping system-prompt drafts formatted so you can review them on the canvas before they hit a completion node.
    • Labeling workflow stages ("### Pass 1: sketch", "### Pass 2: upscale") without adding a STRING node that pollutes data flow.
    • Formatting LLM output for a human - send it Markdown, watch it render, still have the raw string for saving to disk.

    The gotcha that takes down the whole pack

    Here's the sharp edge. MarkdownNode imports markdown at module level in the pack's main file - but markdown is not in the pack's requirements.txt. If it's missing from your Python environment, the import fails when the pack loads, and ComfyUI drops every node from the pack, not just this one. The symptom is "I installed ComfyUI_LiteLLM and nothing shows up."

    If that happens:

    cd ComfyUI/custom_nodes/ComfyUI_LiteLLM
    pip install markdown
    

    Then restart ComfyUI. Whether it's already present depends on whatever else you've installed - some setups have it as a transitive dependency, many don't. If the pack appears but this node throws ModuleNotFoundError: No module named 'markdown', same fix.

    Installing

    Pack-level install as always: ComfyUI Manager → search "LiteLLM" (repo Hopping-Mad-Games/ComfyUI_LiteLLM) → Install → Restart, or git clone https://github.com/Hopping-Mad-Games/ComfyUI_LiteLLM into ComfyUI/custom_nodes followed by pip install -r requirements.txt. That file is heavy (litellm, boto3, sentence-transformers, a LightRAG fork), so the first install is slow - but this node itself is just Python-markdown, no API keys, no network.

    Bottom line

    A display-and-passthrough utility with one missing dependency that can bite the whole pack. Once markdown is installed it just works, costs nothing per run, and makes your workflows dramatically easier to navigate. Worth having on the canvas, honestly - every ComfyUI LLM workflow eventually wants a place to write itself notes, and this is that place.

    CategoryETK/LLM/LiteLLM

    Inputs (1)

    NameTypeDefaultDescription
    markdown_inputSTRINGEnter Markdown text here...

    Outputs (1)

    NameTypeDescription
    Markdown OutputSTRING