cd /news/generative-ai/running-novelai-v5-in-comfyui-nai-di… · home topics generative-ai article
[ARTICLE · art-128147] src=dev.to ↗ pub= topic=generative-ai verified=true sentiment=· neutral

Running NovelAI V5 in ComfyUI: nai-diffusion-5-full works, and the Error fetching Anlas 400 is a moved endpoint

A developer verified that NovelAI's nai-diffusion-5-full and nai-diffusion-5-curated model IDs work through the ComfyUI_NAIDGenerator node, despite a README caveat that they had not been confirmed against the live API. The recurring "Error fetching Anlas" 400 error was traced not to the models but to the node's _get_user_data function still querying api.novelai.net/user/data, which NovelAI moved to image.novelai.net around the V5 launch; fixing the host in two spots in nodes.py resolves it, though the new endpoint returns trainingStepsLeft as a dictionary that breaks the node's Anlas subtraction. On an Opus account, a 832×1216 image at 28 steps cost 0 Anlas, and the PNG Source metadata read "NovelAI Diffusion V5 0ADF9AB7" and "NovelAI Diffusion V5 DB276663" respectively.

by read4 min views2 publishedSep 13, 2026

nai-diffusion-5-full and nai-diffusion-5-curated work as they are through the ComfyUI_NAIDGenerator node, even though the README says the IDs haven't been checked against the live API. The Error fetching Anlas 400 that shows up next to them has nothing to do with the models: the node still asks https://api.novelai.net/user/data for your balance, and NovelAI moved its user endpoints to image.novelai.net, so two spots in nodes.py fix it.

Version Description
1.0 2026-09-13 first written (ComfyUI 0.35.0 + ComfyUI_NAIDGenerator 52da75a, measured on an Opus account)

The Source metadata in the PNGs the node brought back read NovelAI Diffusion V5 0ADF9AB7 and NovelAI Diffusion V5 DB276663 respectively, and on an Opus account one image at Normal size (832×1216) and 28 steps cost 0 Anlas. Two terms if NovelAI is new to you: Anlas is NovelAI's generation credit, and Opus is the top subscription tier, which generates the common sizes without spending any.

I wrote this for people who read the README line "have not been independently confirmed against the live API yet" and hesitated, and for anyone hitting Error fetching Anlas the way issue #51 describes. I installed ComfyUI v0.35.0 fresh on macOS and pinned the node to its 2026-08-21 commit, 52da75a (package version 1.0.9).

Wire the Anlas Tracker node into Preview Any and run it, and the preview text reads Error fetching Anlas while the console prints one line:

[NovelAI] Failed to fetch Anlas balance: 400 Client Error: Bad Request for url: https://api.novelai.net/user/data

The node added the two V5 model IDs in PR #50 on 2026-08-21, but the README still carries the caveat that they were never compared against the live API. Issue #51, opened the next day, reports a generation 400 on a trial account together with Error fetching Anlas, and as of 2026-09-13 it has no replies.

Meanwhile NovelAI moved its user endpoints to image.novelai.net around the V5 launch. The 400 from the old host is exactly what I saw in my earlier Korean post, so I checked whether the node was failing for the same reason.

It is because _get_user_data in nodes.py calls /user/data with USER_API_BASE_URL = "https://api.novelai.net". Attach a token and call both hosts directly, and their answers diverge:

Call Response
GET https://api.novelai.net/user/data 400 {"statusCode":400,"message":"Please refresh NovelAI.net. If using a third-party tool, update to the image URL."}
GET https://image.novelai.net/user/data 200, includes subscription.trainingStepsLeft

Without a token both hosts return 401, so reproducing this needs a valid one. Swapping the host isn't the end of it either. On the new host trainingStepsLeft is not an integer but a shape like {"fixedTrainingStepsLeft": 9898, "purchasedTrainingSteps": 32}, so the Tracker text prints the dictionary verbatim and the Generate node's before-and-after subtraction start_anlas - final_anlas dies with TypeError: unsupported operand type(s) for -: 'dict' and 'dict'.

The model IDs themselves were fine. Here is what a ModelOption → Generate → Save Image workflow returned over POST /prompt, with the same prompt, seed, and 28 steps as the earlier post:

Model Size Result PNG Source Subscription Anlas
nai-diffusion-5-full 832×1216 200, 4.1 s NovelAI Diffusion V5 0ADF9AB7 9,898 → 9,898
nai-diffusion-5-curated 512×768 200, 1.6 s NovelAI Diffusion V5 DB276663 9,898 → 9,898

There is one trap. The PNG that Save Image writes keeps only the prompt chunk, and the Source field NovelAI set is gone. The node saves the original separately under a running number such as output/NAI_autosave_00001_.png, so read the metadata from the file whose number matches the run you just made.

_get_user_data in nodes.py in two places. Point the host at image.novelai.net, and normalize the dictionary-shaped trainingStepsLeft into an integer total:

-    USER_API_BASE_URL = "https://api.novelai.net"
+    USER_API_BASE_URL = "https://image.novelai.net"
@@
     response.raise_for_status()
-    return response.json()
+    data = response.json()
+    steps = data.get("subscription", {}).get("trainingStepsLeft")
+    if isinstance(steps, dict):
+        data["subscription"]["trainingStepsLeft"] = int(steps.get("fixedTrainingStepsLeft", 0) or 0) + int(steps.get("purchasedTrainingSteps", 0) or 0)
+    return data

9930 Anlas. That is the subscription 9,898 plus the purchased 32, the same number the web UI shows as your total, and when I generated one more V5 image at Normal size after the patch, the console printed Generation cost: 0 Anlas. nai-diffusion-5-full in ModelOption is all there is to it. On Opus, leave limit_opus_free on and Normal size at 28 steps or fewer stays in the free band. Image: the sample output was generated with NovelAI Diffusion V5.

Both V5 model IDs work through the node as shipped, and the Error fetching Anlas 400 is the balance lookup still pointing at api.novelai.net. Fixing it takes the new host plus one normalization, because trainingStepsLeft now arrives as a dictionary rather than an integer.

── more in #generative-ai 4 stories · sorted by recency
── more on @novelai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/running-novelai-v5-i…] indexed:0 read:4min 2026-09-13 ·