Nodes/comfyui-dsocr-bbox/DeepSeek OCR Draw BBox (Paste Text)
ComfyUI Node

DeepSeek OCR Draw BBox (Paste Text)

The Draw BBox node with a paste-it-yourself textbox

By maomaozi·Created 2 months ago·Updated 2 months ago· 0
DeepSeek OCR Draw BBox (Paste Text)
  • image
  • image
  • crop_images
  • crop_info
ocr_result<|ref|>BENBO本博<|/ref|><|det|>[[12, 0, 386, 45]]<|/det|>
coord_base1000
crop_expand0
box_color#ff0000
box_width3
labelnone
label_color#ffffff
label_font_size20
font_path

This is the same node as DeepSeek OCR Draw BBox, with one difference that changes when you'd use it: the ocr_result input is a multiline textbox instead of a STRING socket. So instead of wiring in a socket, you paste DeepSeek OCR output straight into the node. That's the entire delta - same drawing, same crops, same crop_info output.

The name's "Paste Text" refers to that input box, not to pasting images. Don't let it throw you.

When you'd reach for it

  • Testing without plumbing. You have a scrap of OCR output from the DeepSeek OCR web console or an API call you ran in a script, and you want to see the boxes before you build anything around it. Paste, hit run, done.
  • One-off inspection. You're checking whether a specific image's OCR caught everything, and you don't want to set up a socket chain just to look at it.
  • Offline/air-gapped fiddling. Since it needs no API key and no network, you can debug geometry (crop sizes, label rendering, CJK font loading) without touching any cloud service.

The default value is even a ready-made sample (<|ref|>BENBO本博<|/ref|><|det|>[[12, 0, 386, 45]]<|/det|>) so the node shows you the expected format before you type a thing.

What carries over

Everything from the socket version: coord_base (default 1000, set 0 for pixel coords), crop_expand for padded crops, box_color/box_width for the drawn lines, and the label / label_color / label_font_size / font_path set for drawing the OCR text next to each box. The three outputs are identical - annotated image, the crop_images batch, and crop_info JSON.

The one practical difference to remember: because this takes a static textbox, nothing updates automatically. If your OCR result changes, you're pasting again. That's fine for a scratch/debug node, and it's why the socket version exists for real pipelines.

Installing

Part of comfyui-dsocr-bbox - ComfyUI Manager (search "dsocr") or:

cd ComfyUI/custom_nodes
git clone https://github.com/maomaozi/comfyui-dsocr-bbox

then restart and install requirements if you haven't:

pip install -r custom_nodes/comfyui-dsocr-bbox/requirements.txt

Gotchas

Same coord_base trap as its sibling - if the pasted coordinates don't line up with your image, check whether the source used normalized 0–1000 values (coord_base=1000, the default) or raw pixels (coord_base=0). And if you paste malformed text, the parser silently skips what it can't parse; the box just won't draw. That's the one moment the "forgiving parser" framing bites: it's forgiving of format variety, not of garbage.

CategoryDeepSeek OCR

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
ocr_resultSTRING<|ref|>BENBO本博<|/ref|><|det|>[[12, 0, 386, 45]]<|/det|>
coord_baseINT10000–100000
crop_expandINT00–10000
box_colorSTRING#ff0000
box_widthINT31–100
labelCOMBOnone4 options: none, ref, text, ref + text
label_colorSTRING#ffffff
label_font_sizeINT206–200
font_pathSTRING

Outputs (3)

NameTypeDescription
imageIMAGE
crop_imagesIMAGE
crop_infoSTRING