Nodes/comfyui_nai_api/NovelAI Image Generate
ComfyUI Node

NovelAI Image Generate

Call NAI Diffusion straight from your ComfyUI graph

By Creeper-MZ·Created 2 years ago·Updated 2 years ago· 0
NovelAI Image Generate
  • input_image
  • vibe_pipe
  • IMAGE
prompt_positivePOSITIVE prompt
prompt_negativeNEGATIVE prompt
noise_seed0
samplerk_euler_ancestral
modelnai-diffusion-3
schedulerkarras
smeaenable
smea_dynenable
steps28
cfg_scale6.00
width832
height1216

This one's not a model you download - it's a phone call. The NovelAI node takes your prompt, ships it off to NovelAI's own servers, and hands you back whatever their hosted NAI Diffusion model produced. No checkpoint, no VRAM budget, no local sampling loop. If you've ever wanted NovelAI's specific anime look inside a ComfyUI graph - chained into an upscaler, a face-detailer, a batch pipeline - instead of the NovelAI website, this is the node that does it.

Worth knowing who you're actually calling. NovelAI is the service whose 2022 model leak effectively started the anime side of the whole Stable Diffusion ecosystem - it's also where the "CLIP skip 2" convention that Illustrious, Pony, and every anime checkpoint after them inherited actually came from. NAI has kept building on that lineage since, training their own tuned SDXL-based models rather than sitting on the leak. This node is a thin wrapper: all it does is format your fields into an API call and hand back the image.

How it works

You need a paid NovelAI account and an API key - that's the whole prerequisite, and it's the part the README doesn't spell out beyond "configure your API key in config.py." Once that's set, this node sends your prompt, negative prompt, sampler, seed, and dimensions to NAI's generation endpoint and returns an IMAGE. The compute happens on NovelAI's GPUs, not yours or comfy.icu's - the node is just plumbing.

The inputs and outputs that matter

Most fields map straight to what you'd type into NovelAI's own web UI:

  • prompt_positive / prompt_negative - the usual pair. NAI's tag-based prompting works differently from natural-language prompting; think Danbooru-style tags, not sentences.
  • model - nai-diffusion-2, nai-diffusion-3, or nai-diffusion-furry-3. Default is nai-diffusion-3, NAI's current flagship anime model. Notice there's no v4 option here - this pack's schema only reaches NAI's SDXL-generation models, so if your subscription includes their newest model, this node won't call it.
  • sampler - a list like k_euler_ancestral, k_dpmpp_2m_sde, ddim_v3. These are NAI's own API sampler names, not ComfyUI's - don't expect a 1:1 match to what you see in a KSampler dropdown.
  • smea / smea_dyn - NAI-specific and easy to skip past. SMEA runs the diffusion U-Net multiple times per step instead of once; it's NAI's built-in fix for the classic high-res problem of duplicated heads and extra limbs, functionally a hires-fix baked into the sampler. It also costs a bit more on NAI's end for the same reason - more passes, more compute - so it's not free, but it's on by default for a reason.
  • steps / cfg_scale / width / height - steps up to 100 (default 28), cfg 1–20 (default 6), and the default 832×1216 is NAI's standard portrait preset, not an arbitrary number.
  • input_image (optional, IMAGE) - wire this in for img2img against the NAI model instead of pure text-to-image.
  • vibe_pipe (optional, VIBE_PIPE) - plug in a NovelAI Apply Vibe node here to steer the output's style from reference images without doing full img2img. See the NovelAI_VIBE article for that node specifically.

Output is a single IMAGE - treat it like any generated image, feed it into a Save Image, an upscaler, whatever comes next in your graph.

Installing it

Through ComfyUI Manager: search comfyui_nai_api, install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Creeper-MZ/comfyui_nai_api

Then restart ComfyUI. There's no model to download and no heavy Python dependency chain - the README is genuinely three lines long, and that's most of what it says. The one thing you must do that the installer won't do for you: open the pack's config.py and paste in your NovelAI API key. Without it, every node in this pack fails at the API call, not at load time - so if generation errors out with an auth failure, this is the first thing to check.

Common issues & troubleshooting

Auth errors are the most likely first failure - a missing or expired key in config.py, or a lapsed subscription. NAI's free tier gives you a tiny anonymous allowance; this node needs a real paid account behind it, not a trial.

No v4 support - if you're paying for NovelAI's newest model and model here still only offers v2/v3/furry-3, that's not a bug on your end; the pack's schema hasn't been extended to it.

Rate limits and cost - every call spends against your NovelAI account, same as generating on their site. Batch runs and high step counts with SMEA on will burn through your allowance fast, so budget accordingly before queuing a big batch.

Storing the key in a plaintext config.py is a rough edge worth knowing: it's not ComfyUI's credential system, so if you ever fork or share your custom_nodes folder, that file is easy to accidentally carry along with it. Keep it out of anything you share.

CategoryNovelAI

Inputs (14)

NameTypeDefaultDescription
prompt_positiveSTRINGPOSITIVE prompt
prompt_negativeSTRINGNEGATIVE prompt
noise_seedINT00–18446744073709550000
samplerCOMBOk_euler_ancestral7 options: k_euler, k_euler_ancestral, k_dpmpp_2s_ancestral, k_dpmpp_2m_sde, k_dpmpp_2m, k_dpmpp_sde, +1
modelCOMBOnai-diffusion-34 options: , nai-diffusion-2, nai-diffusion-3, nai-diffusion-furry-3
schedulerCOMBOkarras4 options: native, karras, exponential, polyexponential
smeaCOMBOenable2 options: enable, disable
smea_dynCOMBOenable2 options: enable, disable
stepsINT281–100
cfg_scaleFLOAT6.001–20
widthINT83264–2560
heightINT121664–2560
input_imageoptIMAGE
vibe_pipeoptVIBE_PIPE

Outputs (1)

NameTypeDescription
IMAGEIMAGE