Inkvec Denoise (ConvNeXt)
Cleaning JPEG and VAE damage out of a logo before you trace it
- image
- mask
- image
- mask
A tracer wants flat colour. What it usually gets is a logo that's been through a JPEG, a lossy WebP, or a VAE decode, and every one of those leaves faint garbage in what should be a solid region: mosquito noise around edges, blotchy blocking, a slight haze across the white. The tracer then does exactly what you asked and fits geometry to the noise. That's how you end up with an SVG of a clean-looking logo that has twice the paths it should, wobbly outlines and speckles nobody can see at 100%.
Inkvec Denoise is the pre-pass that fixes the source instead of fighting the output. It's the same restorer that runs behind inkvec --restore, wrapped as a node.
How it works
It's a 19.7M-parameter ConvNeXt U-Net (Logolabs/inkvec-denoiser-001, Apache-2.0) running under ONNX Runtime, and the node reproduces the engine's processing chain rather than inventing its own: the image is composited onto white - the network is RGB-only and was trained on opaque renders - padded to a multiple of 16 by replicating the last row and column, restored, clamped, quantised back to 8-bit levels, and then anything within 6 levels of pure white or pure black on every channel is snapped to it. That last step is the one that matters for tracing: it makes "white" actually white again, and flat.
Your alpha is untouched. The mask input passes through as it arrived, so transparency survives the trip.
Inputs worth setting
mode-onrestores everything.auto(default) traces the image with CLI defaults, renders the trace, and only restores if the input disagrees with its own trace in the flat interiors (residual above 0.5). It's a damage detector, basically. The reasonautoexists: on genuinely clean input the restorer costs a few percent of colour accuracy. Soautois the polite default andonis what you pick when you already know the source is a mangled JPEG.device-autouses ONNX Runtime's CUDA provider when it's available, otherwise CPU. Output is identical either way.tile-0runs the whole image at once, exactly as the engine does.128is the tiled inference (32 px overlap) the model card's accuracy numbers were measured with, and it's also the fix for the faint grey wash this network paints over large, mostly-white images at whole-image inference. Tiling bounds memory too. Note that the node rejects a tile size that is smaller than the 32 px overlap - it has to be 0 or bigger than 32.weights_path- optional escape hatch: a localrestorer.onnxor its folder. Otherwise the weights (about 80 MB) download once intoComfyUI/models/inkvec/.
Outputs are plain image and mask - wire them into Inkvec Trace.
Install
ComfyUI Manager: search "Inkvec" (publisher logolabs-org), install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/logolabs/inkvec-comfyui.git
pip install -r inkvec-comfyui/requirements.txt
The dependency this node actually needs is onnxruntime - it's in the pack's requirements.txt, so a Manager install gets it. If you want CUDA inference, swap in the GPU build yourself:
pip install onnxruntime-gpu # CUDA 12 + cuDNN 9
The first run downloads the weights from Hugging Face, pinned to a fixed revision and verified against a SHA-256 before use. A file you supply via weights_path is used as-is and not hash-checked - that's the point of the escape hatch.
Where it goes wrong
mode auto refuses to run. It needs to trace and re-render your image to judge damage, so it requires both the inkvec binary (downloaded on first trace) and an SVG renderer - resvg-py, which the pack installs. The error says so and tells you the alternative: set mode to on.
on GPU drivers. device auto only picks CUDA if the installed ONNX Runtime build can actually see it; a CPU-only onnxruntime pip install won't, and you'll silently run on CPU - fast enough at small sizes, less fun at 1024 px.
Don't forget the second half. Restoration is only half of the CLI's --restore recipe. After this node, set Inkvec Trace's lossy widget to on - that's the noise-aware intake for compressed-input sources, and the CLI turns it on for exactly this reason. For a badly compressed or heavily blurred logo, the full chain is Denoise → Upscale → Trace, with the masks carried through each node.
One expectation to set: this is a logos and flat art restorer. Point it at a photograph and you get an ironed photo, not a restored one.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mode | COMBO | auto | on = always restore. auto = trace once, and restore only if the input disagrees with its own trace where the trace is flat (interior residual above 0.5, the threshold of `inkvec --restore auto`); otherwise the image passes through unchanged. On clean input the restorer costs a few percent of colour accuracy. |
| device | COMBO | auto | auto = CUDA when available, else CPU. |
| tile | INT | 00–4096 | 0 = whole image at once, as the Inkvec engine runs it. 128 = the tiled inference (32 px overlap) the model card's accuracy numbers were measured with; it also bounds memory on large images. |
| maskopt | MASK | Transparency, 1 = transparent (LoadImage's MASK). Passed through. | |
| weights_pathopt | STRING | Local restorer.onnx (or its folder) instead of the download. Empty = download from Hugging Face into models/inkvec/. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |