Image to Markdown
Get an image described in words — but bring your own vision model
- llm_client
- markdown
The rest of this pack converts files to Markdown locally, for free. This node doesn't. Image2Markdown is the one that needs an LLM, because markitdown without a language model can only read an image's EXIF metadata - the description part has to come from a vision model looking at the actual pixels. That's the trade-off, and it's the reason this node has two required inputs where its siblings have one.
How it works
Set up a WIZ_LLM_CLIENT node pointing at any OpenAI-compatible endpoint, wire its llm_client output in here, give it a path, and markitdown does the rest. It reads the image, base64-encodes it into a data: URI, and sends it as an image_url message in a chat.completions call along with your prompt. The response comes back as a # Description: block in the Markdown output, with any EXIF metadata (size, date, camera) above it. The whole thing is synchronous - the node blocks until the model answers, so a slow endpoint means a slow workflow.
The inputs and outputs that matter
Two required inputs, and the first one will bite you:
source_file- a STRING path to your image. Here's the trap: the default value is a Windows path from the author's own machine,D:\work\industry\ai\work\ComfyUI-MarkItDown\data\test.jpg. It does not exist on your computer. Click into the field and type your real path or the node fails on a file-not-found.llm_client- theLLM_CLIENTwire fromWIZ_LLM_CLIENT. Required, not optional; this node refuses to run without a vision model configured.
Output is the usual markdown STRING. Accepted extensions: jpg, jpeg, png, gif, bmp, tiff, webp, svg. Yes, svg - it gets sent as a base64 image like everything else, which some vision models handle better than others.
Installing it
Same pack, standard story: ComfyUI Manager, search "ComfyUI MarkItDown", install, restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ciga2011/ComfyUI-MarkItDown
The real dependency isn't in requirements.txt - it's the vision model. For a cloud option, Groq works and is what the README demonstrates; for privacy, run Ollama or LM Studio locally with a vision model and point base_url at it.
Gotchas
Three, in order of pain. First, the broken default path - replace it before you run anything. Second, the model must be multimodal; a text-only model fails on the image message. Third, whatever endpoint you configure sees your image, so if the images are sensitive, use a local server. One more: this node sends the raw image to the model, so huge photos mean big base64 payloads - resize before converting if your endpoint has request limits.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| source_file | STRING | D:\work\industry\ai\work\ComfyUI-MarkItDown\data\test.jpg | — |
| llm_client | LLM_CLIENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| markdown | STRING | — |