Nodes/ComfyUI_NAIDGenerator/LineArt βœ’οΈπŸ…πŸ…πŸ…˜
ComfyUI Node

LineArt βœ’οΈπŸ…πŸ…πŸ…˜

NovelAI's lineart tool, invoked straight from a ComfyUI node

By bedovyyΒ·Created 3 years agoΒ·Updated 4 days agoΒ· 114
LineArt βœ’οΈπŸ…πŸ…πŸ…˜
  • image
  • IMAGE
β—„limit_opus_freetrueβ–Ί
β—„ignore_errorsfalseβ–Ί

LineArtNAID is one of the pack's "director tools" - a family of nodes that call NovelAI's hosted image tools, the same ones you'd use in the NovelAI web app, except you can slot them into a ComfyUI graph. Feed it an image and it returns a clean lineart version: the edges and contours extracted, colors dropped, shading flattened. If you've ever wanted to take a finished render and turn it into a sketch you can color yourself (or re-feed through ControlNet-style workflows), this is the button.

The interface is minimal on purpose:

  • image - what to convert.
  • limit_opus_free (on) - caps the image size at 1024Γ—1024 for the free generation quota Opus-tier subscribers get. Keep it on unless you're paying per-image.
  • ignore_errors (off) - when on, an API failure prints to the console and returns a blank instead of stopping your queue.

Output is an IMAGE tensor, and like everything that hits NovelAI's API it's also autosaved to output/NAI_autosave/ with original metadata. Mechanically the node posts your image (base64, resized) to https://image.novelai.net/ai/augment-image with req_type: "lineart", unzips the PNG the server returns, and decodes it back into a tensor. The heavy lifting - the actual line extraction model - runs on NovelAI's hardware, so your GPU is idle and each call costs Anlas.

The same trade-offs as the rest of the pack apply. It's per-image paid, so it's for the images you care about, not batch experiments. And the result is NovelAI's lineart, which is tuned for the anime/illustration style the platform is built around - on a clean anime render it's great; on a photorealistic or heavily textured input it's a different proposition, so test before you build a pipeline on it.

Because the output is a normal IMAGE, you can do a lot with it downstream: drop it into GenerateNAID as an img2img source for an ink-and-color rework, or keep it as a base for the pack's own ColorizeNAID. Install is pack-standard - Manager search "ComfyUI_NAIDGenerator", or clone into custom_nodes/ and restart - and it needs your NAI_ACCESS_TOKEN in a .env in the ComfyUI root before the first call. If the node silently returns a blank, the console line is your clue: either ignore_errors swallowed a 401 (check the token) or you've hit a rate limit.

CategoryNovelAI/director_tools

Inputs (3)

NameTypeDefaultDescription
imageIMAGEβ€”
limit_opus_freeBOOLEANtrueLimit image size and steps for free generation by Opus.
ignore_errorsBOOLEANfalseβ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”