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)).
- image
- bboxes
- corners
- connections
- texts
- labels
- qr_count
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY,IMAGE | Input 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_model | COMBO | WeChat QR DETECT .onnx model from ComfyUI/models/onnx (detect_2026april.onnx). | |
| sr_model | COMBO | WeChat QR SUPER-RESOLUTION .onnx model from ComfyUI/models/onnx (sr_2026april.onnx) - upsamples small codes so they decode. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| bboxes | BOUNDING_BOX | One {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. |
| corners | NPARRAY | (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. |
| connections | NPARRAY | (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. |
| texts | NPARRAY | (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. |
| labels | NPARRAY | (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_count | INT | Number of QR codes detected. |