ComfyUI Node

NovelAIRequestPayload

The settings hub for a NovelAI generation

By DiaoDaiaChan·Created 2 years ago·Updated 11 months ago· 7
NovelAIRequestPayload
  • characterPrompts
  • payload
  • payload_dict
promptprompt here
negative_promptnegative prompt here
seed-1
sampler
n_iter1
steps28
cfg_scale6.00
width832
height1216
scheduler
ucPreset
cfg_rescale0
prefer_brownianfalse
model
skip_cfg_above_sigma_enablefalse

If NovelAI_Request is the phone call, NovelAI_Request_Payload (shown as NovelAIRequestPayload) is the phone you dial with. It's where every generation setting for NovelAI's hosted models lives: the prompt, the sampler, the resolution, which model to use, and - if you're on the v4 line - the per-character prompt layout. You build the payload here, then wire it into NovelAI_Request, which actually makes the request.

This is the node you'll spend most of your time on, because it's the one with opinions. It's not a dumb passthrough: it remaps your inputs into NovelAI's internal parameter names and does a couple of transformations you'd otherwise have to do by hand.

How it works

Under the hood the node builds a BaseRequest, then wraps it in a NovelAITXT2IMGPayload. The remapping is where it earns its keep:

  • cfg_scale becomes scale, sampler becomes sampler, n_iter becomes n_samples, and scheduler becomes noise_schedule - NovelAI's API names, not ComfyUI's.
  • The selected ucPreset string gets appended to your negative_prompt automatically. There are three presets: a long quality-filter list, a shorter one, and an empty one for when you want to handle negatives yourself.
  • skip_cfg_above_sigma_enable (a v4-specific trick) computes a per-resolution sigma value from a lookup table - or a fallback formula if your resolution isn't in the table - and only activates when you toggle it on.

The result is a payload object plus a payload_dict (a DICT) that shows you exactly what's about to be sent. If you're debugging, that dict is gold: it's the ground truth of what NovelAI will receive.

Inputs a beginner actually sets

Most of these are self-explanatory if you've used any diffusion UI. The ones worth knowing:

  • prompt and negative_prompt - plain text, defaults are placeholders.
  • model - this is where NovelAI's lineup lives: nai-diffusion-4-5-full and -curated, nai-diffusion-4-full and -curated-preview, nai-diffusion-3, nai-diffusion-furry-3, and nai-diffusion-2. Note the "preview" and "curated" suffixes - some of these are experiments, not the flagship.
  • sampler - NovelAI's k_* names (k_dpmpp_2m, k_euler_ancestral, ddim_v3, …). These are NovelAI's own sampler names; don't go looking for ComfyUI's sampler list here.
  • seed (default -1), steps (28), cfg_scale (6), width/height (832×1216 portrait by default).
  • characterPrompts - a LIST input, normally fed by the pack's Character_Prompt_Select node. Only meaningful on the nai-diffusion-4 models; see that node's article for how it works.
  • ucPreset and skip_cfg_above_sigma_enable - covered above. Both are v3/v4-era niceties; leave them alone until you know you need them.

Outputs are payload (NovelAITXT2IMGPayload, into NovelAI_Request) and payload_dict (DICT, for inspection).

Install

Same as the rest of the pack - this is one install for six nodes. Via ComfyUI Manager (search "ComfyUI_API_Request") or:

cd ComfyUI/custom_nodes
git clone https://github.com/DiaoDaiaChan/ComfyUI_API_Request

Restart ComfyUI. The only extra dependency is python-dotenv; there are no model downloads because the models live on NovelAI's servers.

Common issues

The classic beginner mistake is treating the model list like a free buffet: a "curated-preview" v4 model can behave differently from nai-diffusion-4-full on the same prompt, and character prompts (characterPrompts) simply won't do anything on nai-diffusion-3 or nai-diffusion-2. Also remember the payload only describes a generation - you haven't spent any Anlas until you connect the payload to NovelAI_Request and run. If you're iterating on settings, get the payload right first; each run of the request node is a billed generation.

CategorySDWebUI-API/SDWebUI-API

Inputs (16)

NameTypeDefaultDescription
promptSTRINGprompt here
negative_promptoptSTRINGnegative prompt here
seedoptINT-1
sampleroptCOMBO7 options: k_dpmpp_2m, k_dpmpp_sde, k_dpmpp_2m_sde, k_dpmpp_2s_ancestral, k_euler_ancestral, k_euler, +1
n_iteroptINT1
stepsoptINT28
cfg_scaleoptFLOAT6.00
widthoptINT832
heightoptINT1216
scheduleroptCOMBO1 options: karras
ucPresetoptCOMBO3 options: blurry, lowres, error, film grain, scan artifacts, worst quality, bad quality, jpeg artifacts, very displeasing, chromatic aberration, logo, dated, signature, multiple views, gigantic breasts, blurry, lowres, error, worst quality, bad quality, jpeg artifacts, very displeasing, logo, dated, signature,
cfg_rescaleoptINT0
characterPromptsoptLIST
prefer_brownianoptBOOLEANfalse
modeloptCOMBO7 options: nai-diffusion-4-5-full, nai-diffusion-4-5-curated, nai-diffusion-4-full, nai-diffusion-4-curated-preview, nai-diffusion-3, nai-diffusion-furry-3, +1
skip_cfg_above_sigma_enableoptBOOLEANfalse

Outputs (2)

NameTypeDescription
payloadNovelAITXT2IMGPayload
payload_dictDICT