Generate βοΈπ π π
The node that turns ComfyUI into a NovelAI client (and spends your Anlas)
- option
- IMAGE
GenerateNAID is the node that actually talks to NovelAI. Everything else in the ComfyUI_NAIDGenerator pack either builds a settings dict for it (the *OptionNAID nodes) or hits a different endpoint entirely. This one takes a prompt, ships it to NovelAI's servers, and hands you back an image tensor - which means it does not need a GPU, does not load a checkpoint, and does not run for free.
Let's get the cost thing out of the way first, because it's the part people miss. NovelAI's V4/V4.5 models are closed - you can't download the weights, so there's no local-GPU equivalent to swap in. The pack is a paid API client: every generation burns Anlas, NovelAI's in-app currency, and the README flat-out warns you can be charged even if a request times out and returns nothing. There's a limit_opus_free toggle (on by default) that caps resolution at 1024Γ1024 and steps at 28 - Opus-tier subscriptions get a quota of free generations, and this toggle keeps you inside it. Leave it on unless you know you're past the free tier.
The full list of dials looks intimidating, but you'll actually set maybe five of them:
- positive / negative - the prompt fields. Defaults are the classic anime quality-tag opener (
, best quality, amazing quality, very aesthetic, absurdres) withlowresas the negative. NovelAI is a Danbooru-vocabulary model, so quality tags earn their keep here the way they do on Illustrious. - width / height - 64 to 1600, stepped by 64; the defaults are 832Γ1216. The pack snaps your requested canvas to the nearest 64-multiple of that aspect, so don't fight it.
- steps - 28 default, capped at 50. Lower saves Anlas.
- cfg - 5.0 default.
- seed - set 0 for random, or pin it to reproduce.
- sampler / scheduler / smea / decrisper / variety - sampler defaults to
k_eulerwith anativescheduler; the other six samplers are the usual k-family suspects.smea(SMEA / SMEA+DYN) is a detail-recovery pass that NovelAI disables when you pickddim.decrisperis dynamic thresholding, andvarietysets a skip-CFG-above-sigma value so looser prompt adherence kicks in on the coarse early steps.
Output is a single IMAGE tensor plus an automatic save to output/NAI_autosave/NAI_autosave_#####_.png. That autosave is deliberate - the PNG carries NovelAI's original generation metadata, and if you only route the tensor through a SaveImage you lose it. keep_alpha (default on) preserves the RGBA output; flip it off when you want to feed the image into local nodes that choke on an alpha channel.
Mechanically it's a thin, honest client: it builds a parameters dict (including a v4_prompt block with your positive as the base caption), POSTs to https://image.novelai.net/ai/generate-image with your bearer token, unzips the returned PNG, and decodes it. The console prints your Anlas balance before and after each run, plus the cost. That's the closest thing to a meter this pack has.
Wire an option input into the node to change what gets generated: ModelOptionNAID swaps the model, Img2ImgOptionNAID / InpaintingOptionNAID / VibeTransferOptionNAID change the action, NetworkOptionNAID tunes timeout and retry. Left alone, it runs txt2img on nai-diffusion-4-5-full.
The two issues that actually bite, both from people hitting 401s in the wild: your token goes in a .env file in the ComfyUI root folder (the one containing custom_nodes/), not inside the node folder - and that file is hidden and may not exist yet, so create it. Second, a persistent API token comes from User Settings β Account β Get Persistent API Token on the NovelAI site; a copy of your web-session token will expire in 30 days and then fail. If a generation silently yields nothing, check the console for the swallowed error and confirm you haven't enabled ignore_errors via a NetworkOption node while debugging.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| limit_opus_free | BOOLEAN | true | Limit image size and steps for free generation by Opus. |
| width | INT | 83264β1600 | β |
| height | INT | 121664β1600 | β |
| positive | STRING | , best quality, amazing quality, very aesthetic, absurdres | β |
| negative | STRING | lowres | β |
| steps | INT | 280β50 | β |
| cfg | FLOAT | 5.00β10 | β |
| variety | BOOLEAN | false | β |
| decrisper | BOOLEAN | false | β |
| smea | COMBO | none | 3 options: none, SMEA, SMEA+DYN |
| sampler | COMBO | k_euler | 7 options: k_euler, k_euler_ancestral, k_dpmpp_2s_ancestral, k_dpmpp_2m_sde, k_dpmpp_2m, k_dpmpp_sde, +1 |
| scheduler | COMBO | native | 4 options: native, karras, exponential, polyexponential |
| seed | INT | 00β9999999999 | β |
| uncond_scale | FLOAT | 1.000β1.5 | β |
| cfg_rescale | FLOAT | 0.000β1 | β |
| keep_alpha | BOOLEAN | true | Disable to further process output images locally |
| optionopt | NAID_OPTION | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |