NetworkOption βοΈπ π π
The knob for NovelAI API timeouts, retries, and not killing your queue
- option
- NAID_OPTION
Most option nodes in the ComfyUI_NAIDGenerator pack change what gets generated. NetworkOptionNAID changes how the request is made - and it's the one you'll reach for the moment NovelAI's servers cough on you, which they do.
Connect its NAID_OPTION output to the option input on GenerateNAID (or to any other option node upstream, since they chain), and it sets three things:
- timeout_sec - 120 by default, 30 to 3000. Big canvases, high steps, and busy servers all make slow generations; if you keep timing out at the default, raise this. The warning in the README is worth quoting in full: set the timeout too short and you can be charged Anlas without ever receiving an image. NovelAI starts the job when the request lands, not when you get the reply.
- retry - 3 by default, up to 100. Retries kick in on HTTP 429 (rate limit) and the 5xx family, with a backoff factor, so a busy weekend at NovelAI doesn't fail your whole queue.
- ignore_errors - default on, and this is the setting that saves a batch. With it on, an API error prints to the console and the node returns a blank 1Γ1 image instead of raising, so ComfyUI keeps executing instead of stalling the queue mid-run. Turn it off when you're debugging and want failures to be loud.
One honest gotcha about ignore_errors: a 1Γ1 blank still looks like output. If you're running a long batch with this on, the blank results are easy to miss until you inspect the autosaved files in output/NAI_autosave/. The console line starting ignore error: is your only heads-up.
This node is pure plumbing - the source just copies your values into the option dict (timeout, retry, ignore_errors), which GenerateNAID reads when it builds its requests session. It uses urllib3's Retry with a status list of 429/500/502/503/504, so the retry count is per-request against real server errors, not a loop over your whole workflow.
Install is the standard pack path: Manager β "ComfyUI_NAIDGenerator", or git clone into custom_nodes/, restart, and make sure your NAI_ACCESS_TOKEN is set in a .env in the ComfyUI root. You don't strictly need this node at all - the defaults are sane - but if you're building workflows you plan to leave running, treat it as the "don't babysit the queue" insurance.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| ignore_errors | BOOLEAN | true | β |
| timeout_sec | INT | 12030β3000 | β |
| retry | INT | 31β100 | β |
| optionopt | NAID_OPTION | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| NAID_OPTION | NAID_OPTION | β |