Nodes/comfyui_cv/CV WeChat QR Detect
ComfyUI Node

CV WeChat QR Detect

Detects and decodes every QR code in an image with cv2.wechat_qrcode.WeChatQRCode (one shot - it both locates and reads them). Pick the two .onnx models from ComfyUI/models/onnx: a detect model (detect_2026april.onnx) and a super-resolution model (sr_2026april.onnx) that upscales small codes before decoding. Outputs are DATA only - draw the boxes with the core 'Draw BBoxes' node, the 4 corners with 'CV Draw Points', the code outline by feeding 'corners' + 'connections' to 'CV Draw Connections', and the decoded text onto the image by feeding 'corners' + 'labels' to 'CV Draw Labels'. Zero codes is a valid result (empty outputs). Processes a single image (the first frame of a batch). Needs the wechat_qrcode CONTRIB module in the loaded OpenCV build (opencv-contrib-python(-headless)).

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV WeChat QR Detect
  • image
  • bboxes
  • corners
  • connections
  • texts
  • labels
  • qr_count
detect_model
sr_model
Categoryimage/CV/dnn

Inputs (3)

NameTypeDefaultDescription
imageNPARRAY,IMAGEInput image. An IMAGE batch uses its first frame; an NPARRAY (gray/BGR/BGRA, any dtype) is treated as one frame. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
detect_modelCOMBOWeChat QR DETECT .onnx model from ComfyUI/models/onnx (detect_2026april.onnx).
sr_modelCOMBOWeChat QR SUPER-RESOLUTION .onnx model from ComfyUI/models/onnx (sr_2026april.onnx) - upsamples small codes so they decode.

Outputs (6)

NameTypeDescription
bboxesBOUNDING_BOXOne {x, y, width, height, score} dict per QR code (the axis-aligned box around its 4 corners, label = decoded text) - feed the core 'Draw BBoxes' node.
cornersNPARRAY(N*4, 2) float32: the 4 corner points of every code, in order. Feed 'CV Draw Points', or 'CV Draw Connections'/'Draw Labels' with the matching outputs below. Empty (0, 2) when no codes.
connectionsNPARRAY(N*4, 2) int32 edge index-pairs closing each code's quad, already offset per code to index 'corners' directly. Feed 'corners' + this into 'CV Draw Connections' to outline the codes. Empty (0, 2) when no codes.
textsNPARRAY(N,) string array: the decoded text of each code (one entry per code). Feed 'Preview as Text'/'Inspect CV Data'. An empty string means the code was located but not decoded.
labelsNPARRAY(N*4,) string array aligned row-for-row with 'corners': each code's decoded text on its FIRST corner, blank on the other three. Feed 'corners' + this into 'CV Draw Labels' to write the text once per code. Empty (0,) when no codes.
qr_countINTNumber of QR codes detected.