🎨 ZML_NovelAI V4/V4.5
NovelAI V4/V4.5 generation from inside ComfyUI — subscription required
- Vibe图片
- 参考图
- 基础图
- 图像
- 生成信息
This node does not run a model on your GPU. It's an API wrapper: you give it a NovelAI token, it phones NovelAI's servers, and a nai-diffusion-4-5 image comes back into your ComfyUI graph as if a local sampler had made it. That's the whole framing, and the README even credits a community contributor (Hanzhihu) for the original NovelAI nodes this was built around.
NovelAI Diffusion is a closed, subscription-only service - there are no open weights, so "running it locally" isn't an option. The node is one of the two real reasons to route out to an API (see the KB's API-wrapper doc): the model isn't downloadable, so you call it or you don't use it. If you're not a NovelAI subscriber, this node does nothing for you; if you are, it drags the service's specific strengths - V4/V4.5's character control and reference handling - into your normal workflow.
What it sends
The required inputs cover the standard generation knobs: 提示词 / 负面提示词, 模型 (nai-diffusion-4-5-full, nai-diffusion-4-full, or nai-diffusion-3), 宽度/高度, 步数, CFG, 采样器 (five k-samplers), 种子 (−1 = random), and API_Token. No token, and the node raises immediately - it won't even try.
The optional half is where NovelAI's features live:
- 角色1/2/3_提示词 + 位置 - up to three character captions placed at positions (center/left/right/top/bottom and corners for character 1). V4's character composition, exposed as ports.
- Vibe图片 + Vibe强度 - vibe transfer, NovelAI's style-vibe feature.
- 参考图 + 参考模式 + 参考强度 - Precise Reference, in
character&style,character, orstylemode. 自动上传参考图 (default on) uploads the reference and gets the cache key for you; if the upload ever fails, the 参考图_CacheKey field is the manual fallback. - 基础图 + Img2Img强度 - plain img2img.
- VarietyBoost, 使用坐标, CFG重缩放 (default 0.61), and 代理地址 (a proxy like
http://localhost:7890, handy if your network can't reach the API directly).
Outputs: 图像 (IMAGE) and 生成信息 (STRING) with the response metadata.
Cost and trust, the honest version
Every generation is a paid API call, and your prompts and reference images leave your machine - that's the mechanism, not a bug, and the KB's API-wrapper doc is blunt that filtering follows the model: whatever NovelAI's moderation refuses, this node refuses, and there's no local bypass because there's nothing local to patch. Also: keep the token out of shared workflows. The pack's own LLM nodes store keys in browser cache for exactly this reason; this node wants the token in a field, so treat the workflow file as private.
Install
One node in ComfyUI-ZML-Image:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
# restart ComfyUI
or ComfyUI Manager → search "ComfyUI-ZML-Image". Uses requests (pack requirement). Chinese-first UI - 提示词 is "prompt," 代理地址 is "proxy address" - translation patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.
The README tags the NovelAI nodes as "待完善" (to be improved) - the author merged them in and flagged them as work-in-progress. Expect occasional rough edges, and check the pack's repo for updates if the API contract shifts.
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| 提示词 | STRING | masterpiece, best quality, 1girl, solo | — |
| 负面提示词 | STRING | lowres, bad anatomy, bad hands, text, error, missing fingers | — |
| 模型 | COMBO | nai-diffusion-4-5-full | 3 options: nai-diffusion-4-5-full, nai-diffusion-4-full, nai-diffusion-3 |
| 宽度 | INT | 832512–2048 | — |
| 高度 | INT | 1216512–2048 | — |
| 步数 | INT | 281–50 | — |
| CFG | FLOAT | 5.11–20 | — |
| 采样器 | COMBO | k_euler_ancestral | 5 options: k_euler, k_euler_ancestral, k_dpmpp_2m, k_dpmpp_sde, k_dpmpp_2s_ancestral |
| 种子 | INT | -1-1–4294967295 | — |
| API_Token | STRING | — | |
| 角色1_提示词opt | STRING | — | |
| 角色1_负面opt | STRING | — | |
| 角色1_位置opt | COMBO | center | 9 options: center, left, right, top, bottom, top-left, +3 |
| 角色2_提示词opt | STRING | — | |
| 角色2_位置opt | COMBO | center | 5 options: center, left, right, top, bottom |
| 角色3_提示词opt | STRING | — | |
| 角色3_位置opt | COMBO | center | 5 options: center, left, right, top, bottom |
| Vibe图片opt | IMAGE | Vibe Transfer 图片 | |
| Vibe强度opt | FLOAT | 0.500–1 | — |
| 参考图opt | IMAGE | Precise Reference 图片 | |
| 参考模式opt | COMBO | character&style | 3 options: character&style, character, style |
| 参考强度opt | FLOAT | 1.000–1 | — |
| 参考图_CacheKeyopt | STRING | 可选:手动输入 cache key(如果自动上传失败) | |
| 基础图opt | IMAGE | Img2Img 基础图像 | |
| Img2Img强度opt | FLOAT | 0.700–1 | — |
| VarietyBoostopt | BOOLEAN | false | — |
| 使用坐标opt | BOOLEAN | false | — |
| CFG重缩放opt | FLOAT | 0.610–1 | — |
| 自动上传参考图opt | BOOLEAN | true | 关闭则必须手动提供 cache key |
| 代理地址opt | STRING | 可选:http://localhost:7890 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 图像 | IMAGE | — |
| 生成信息 | STRING | — |