QR Code Preview
QR Code Preview
- image
QR Code Preview is the pack's built-in display for Upload Submission to AI Plotter. It's an output node with a single image input and zero outputs - a sink, not a source. You feed it the qr_code that UploadSubmission returns and it shows that QR right on the node in your graph, so the whole "scan this to get your plotted art" loop stays on one canvas.
What makes it worth reading about is how it displays. This isn't ComfyUI's default thumbnail strip; the pack ships a custom frontend extension that draws a proper panel on the node itself. Before the upload finishes you get a spinning "Processing…" state, which matters more than it sounds - in a real workflow the upload is followed by Plot SVG with AxiDraw, which can run for many minutes. Without this, you'd be staring at a frozen node wondering if anything happened. The panel flips to the actual QR the moment the API responds, because UploadSubmission pushes an early penplotter.qr_ready event to the browser the second the upload succeeds. If the run fails or gets interrupted, the panel shows an error icon instead of leaving you guessing.
How it works
Under the hood there are two halves. The Python node grabs the first frame of the incoming image, saves it as a PNG into ComfyUI's temp folder, and returns it under a custom qr_images UI key so the default image strip doesn't also render it. The JavaScript side listens for three things: execution start (switch to spinner), the early penplotter.qr_ready push (load the QR immediately), and the normal executed event as a fallback for cases where there's no UploadSubmission upstream. That last one means the node still works if you feed it any QR-ish image, not just UploadSubmission's output.
The image input is all there is. Wire UploadSubmission's qr_code output into it and you're done.
Install
It's part of the ComfyUI PenPlotter pack. Install via ComfyUI Manager (search "ComfyUI PenPlotter") or:
cd ComfyUI/custom_nodes
git clone https://github.com/wouterverweirder/comfyui-penplotter
Restart ComfyUI. The custom widget lives in the pack's web/ directory and loads automatically. Like the rest of the pack it installs numpy>=2.3.4, opencv-python, numba, vpype, websockets, requests, qrcode[pil] and the AxiDraw API, though this node itself is light - it mostly needs Pillow and the frontend file.
Common issues
- The panel stays on the spinner forever - the upload didn't complete. Check UploadSubmission's error (usually a bad
api_keyor unreachableapi_endpoint), not this node. - Stuck on "Upload failed" after an error - that's the frontend doing its job; the error state is one of the panel's three modes. Fix the upload and rerun.
- Node shows nothing at all - the custom widget needs the browser page refreshed after install. A stale tab won't have the extension loaded.
- Using it without UploadSubmission - works, but there's no early push, so the QR only appears when the node itself executes.
It's the rare "preview" node that's actually a small UX improvement rather than a box that echoes an image. Plotting is slow, and this keeps you from refreshing the page wondering if your upload vanished.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (0)
No outputs