NovelAI 云端生图
NovelAI's models are cloud-only — this node puts them inside your ComfyUI graph
- positive
- negative_cond
- image
- mask
- 图像
The one model family you can't download
NovelAI's V4.5 and V5 anime models are genuinely good, and they're also the ones you'll never run locally. No checkpoints, no Diffusers repo - NovelAI keeps the weights behind its paid cloud API. Want that specific look? Their servers are the only legal route.
NovelAICloudGenerator is the bridge: one node turns a ComfyUI graph into a client for NovelAI's official endpoint, so you keep your habits - saving, upscaling with ESRGAN, batching - while their V5 does the denoising. No GPU work, no checkpoint, nothing to download.
What it actually is
Under the NovelAI category (display name "NovelAI 云端生图"), it covers text-to-image, img2img, and masked inpainting. Heads-up: the whole UI is Chinese, so dropdowns show 欧拉·a (that's Euler a) and 完整版/策展版 (Full/Curated). Don't panic - the fields map cleanly onto NovelAI's website options.
You need a NovelAI account with a subscription or Anlas credits plus a Persistent API Token (pst-...), fetched in the browser under avatar → Account Settings → Get Persistent API Token. No GPU, no model files, no extra Python packages: the pack depends only on ComfyUI's own numpy/Pillow/torch, doing HTTP via the standard library.
How it works
Every generation is an HTTP POST to api.novelai.net with your token as a Bearer header; the finished PNG comes back over the wire. NovelAI encodes your prompt server-side, so your local CLIP model is irrelevant - which is why the CONDITIONING inputs (positive, negative_cond) do something sneaky. A CONDITIONING tensor only carries encoded numbers, no plaintext, so the node walks the execution graph backwards to the upstream encoder's text widget and reads the literal prompt from it. Wire up a CLIP Text Encode and its text replaces the built-in boxes; if no readable text is found, it errors clearly instead of guessing.
Because the API returns finished PNGs, there's no latent to grab. The single output is IMAGE - wire it into SaveImage, or an image upscaler (ESRGAN / 4x-UltraSharp) first. Those PNGs also carry NovelAI's full generation metadata, seed included, so runs stay reproducible.
Inputs a beginner actually touches
- token and proxy - your key, plus an optional HTTP proxy (a necessity in mainland China; falls back to the
NAI_PROXYenv var, and can stay blank under TUN mode). - model - V5 / V4.5 / V4 (Full and Curated), plus V3 anime and V3 furry. New official releases go into custom_model_id, which overrides the dropdown.
- size_tier × aspect - two-step sizing like the website, resolving to officially-supported resolutions (832×1216, 1024×1024, 1536×1024…). Unsupported sizes fail or silently burn credits; this sidesteps both.
- steps, cfg_scale, positive_text / negative_text, seed, n_samples.
- quality_tags (Standard auto-appends NovelAI's quality words - "best quality, very aesthetic" heritage) and uc_preset (official negative presets; Heavy adds nsfw suppression).
- Optional image / mask / img2img_strength flip it into img2img or inpainting; a mask auto-switches to the matching
-inpaintingmodel variant (white = redraw area) and source images get resized to the target dimensions.
Cost, and the part people forget
Generation spends real money (Anlas). The node live-estimates as you tweak any parameter and auto-cancels when your balance can't cover it - no charge, no surprise. Opus subscribers get the first image free at ≤28 steps and ≤1024², and since your account runs one image at a time, batches generate serially with the seed bumped per image. The 429 concurrency lock is handled for you with exponential backoff.
One honest note: it's anime/illustration only. NovelAI is the danbooru-tag lineage that handed anime SD its clip-skip-2 convention, so reach for this when you want that aesthetic - not photorealism. Already generating locally with Illustrious or Anima? This is how NovelAI's tuned output joins the same graph.
Install and troubleshooting
cd ComfyUI/custom_nodes
git clone https://github.com/Bigesila-B/ComfyUI-NovelAI-Cloud.git
Restart ComfyUI - or use ComfyUI Manager → search NovelAI Cloud → Install. No model downloads, no heavy deps, MIT license; the bundled workflows/basic.json skips the hand-wiring.
Where people get burned:
- The token lives in the workflow. Never share one containing this node - anyone with it can spend your Anlas.
- 401 - you regenerated the token and killed the old one, or pasted quotes/newlines. Re-copy the whole
pst-line. - 402 - out of credits. Drop to V4.5 Full at 832×1216 and ≤28 steps (free first image on Opus), or top up.
- 403 - NovelAI's content policy rejected the prompt. Rewrite it; don't try to route around the filter.
- 429 / concurrency lock - handled automatically; nothing to do.
- Network errors or timeouts - check the proxy port and that the proxy client is running; try 7890/7897/7899, or enable TUN and leave proxy blank.
- Wallpaper tier has no square option - you get a clear error, not a wasted generation.
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| token | STRING | NovelAI Persistent API Token(网页右上角 Account → Get Persistent API Token,pst- 开头)。存在工作流里,不要分享含此节点的工作流 | |
| proxy | STRING | http 代理地址,如 http://127.0.0.1:7897。留空则读环境变量 NAI_PROXY;开 TUN 模式可留空 | |
| model | COMBO | 模型列表可点“刷新模型”联网更新;官方出新模型可在“自定义模型ID”直接填 | |
| custom_model_id | STRING | 填了则覆盖上面的下拉框,用于第一时间使用新模型 | |
| model_search | STRING | 输入关键词即时过滤上方模型下拉框(仅界面用) | |
| positive_text | STRING | 正面提示词。接了 CONDITIONING 输入后此项被忽略 | |
| negative_text | STRING | 额外负面提示词,会拼在 UC 预设串之后 | |
| uc_preset | COMBO | 无 | 官方负面预设。Heavy 含官方负面词(Full 系含 nsfw 压制) |
| quality_tags | COMBO | 标准 | 官方质量词 |
| size_tier | COMBO | 常规 | 出图尺寸档位(与官网一致),搭配右侧比例得到官方支持的精确分辨率,避免填入不支持的尺寸 |
| aspect | COMBO | 竖 | 画面比例:竖/方/横 |
| steps | INT | 231–50 | 步数。Opus 订阅 ≤28 步且 ≤1024² 时首张免费 |
| cfg_scale | FLOAT | 5.00–10 | Guidance/提示词引导度,官方推荐 5~6(V3 社区惯用 11) |
| sampler | COMBO | 7 options: 欧拉·a, 欧拉, DPM++ 2S a, DPM++ 2M, DPM++ SDE, DDIM, +1 | |
| cfg_rescale | FLOAT | 0.000–1 | — |
| variety_plus | BOOLEAN | false | Variety+ 增加多样性 |
| decrisp | BOOLEAN | false | Decrisper(V4.5+) |
| smea | COMBO | 关 | 仅 V3 有效;会提高积分消耗 |
| seed | INT | 00–4294967295 | — |
| n_samples | INT | 11–8 | 张数。账号同时只能跑 1 张,因此串行逐张生成 |
| positiveopt | CONDITIONING | 可选:接文本编码器节点(如 CLIP Text Encode),接上后其文本替代内置正面提示词 | |
| negative_condopt | CONDITIONING | 可选:负面提示词编码,接上后替代内置负面框 | |
| imageopt | IMAGE | 可选:图生图原图(img2img) | |
| maskopt | MASK | 可选:局部重绘蒙版(白色=重绘区域),需搭配 image;模型会自动切换到对应 inpainting 变体 | |
| img2img_strengthopt | FLOAT | 0.700.01–0.99 | 重绘幅度:越小越接近原图;也影响积分消耗 |
| img2img_noiseopt | FLOAT | 0.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 图像 | IMAGE | 生成的图片,可接放大节点后再接保存节点 |