NAI Reference Inset Generate
It will block you on purpose
- inset
- characterPrompts
- image
- full_canvas
- applied_prompt
You wire it up, hit Queue, and it fails. Every time. That's not a broken install - that's the default doing exactly what the author intended.
This node spends Anlas. Reference inset generation is ordinary inpainting on NovelAI's side, and a base image can cost credits even at Opus-free dimensions, so the pack ships limit_opus_free = True as the default and refuses before it reads your token, before it uploads anything. The error says so and points you at the free preparation node. Once you've decided the layout is worth the money, you flip it to False and it runs.
What it does with the canvas
The inset input carries the prepared canvas, mask, and crop box from NAI Reference Inset. This node then:
- Appends the tag
reference insetto your prompt if it isn't already there - including weighted forms like{reference inset}or1.2::reference inset::, which it leaves alone rather than doubling up. - Sends the canvas and mask to NovelAI as inpainting at full strength (
inpaintImg2ImgStrength = 1.0,noise = 0). There is no denoise dial on this node. The knob that controls how much the reference matters lives on the prep node, asreference_percent. - Composites the response back through the mask, so the reference-side pixels are your prepared ones verbatim - even if the server returned something different there.
- Crops the generated area exactly and returns it.
- Autosaves both files under the usual dated
NAI_autosavefolder, namedNAI_inset…, with the full canvas getting a_canvassuffix and both keeping NovelAI's metadata plus anrs_nai_insetrecord of the canvas size and crop box.
If the API hands back a canvas of the wrong size, it raises an error rather than quietly resizing or cropping - which is the right call, since a silent resize would wreck the composite.
Inputs worth setting
- prompt - describe the reference character and the new scene. The tag gets added for you, so don't type it.
- negative_prompt - defaults to
lowres, bad anatomy. Keep it short; NovelAI's anime models are Danbooru-trained and don't want a forty-tag negative wall. - model - defaults to
NAI Diffusion V5 Full.V5 Full - Medium Effortworks but uses its fixed 14 steps, Euler Ancestral, zero CFG Rescale and the Heavy Undesired Content preset - yoursteps,negative_promptand sampler are ignored while it's selected, and the node shows a notice saying so. V5 Curated inpainting falls back to V4.5 Curated internally, as the official client does. - steps (28), cfg_scale (6), seed (
-1= random), optional sampler (k_euler_ancestral) and scheduler (karras). - limit_opus_free -
Trueblocks;Falsepermits possible spending. The tooltip is blunt about it. - characterPrompts - optional, from
NAI Character Prompt Select. Their 0–1 coordinates describe the cropped output, and the node maps them onto the canvas for you. That's a genuinely nice touch; hand-mapping coordinates into a padded canvas is exactly the sort of thing people get wrong. Positions still bleed between characters if you describe several in one slot set (regional-prompting.json), so keep using the slots properly.
Outputs
- image - the new area only, cropped to size. This is the one you preview and save.
- full_canvas - reference plus result, in one frame. Handy when you want the "before and after" layout as a single picture.
- applied_prompt - the exact string that went out, tag included. Wire it to a text display node when you're debugging a prompt you've been editing via Character Asset Load.
Install and run
cd ComfyUI/custom_nodes
git clone https://github.com/raspie10032/ComfyUI_RS_NAI_API_Request.git
cd ComfyUI_RS_NAI_API_Request
python -m pip install -r requirements.txt
ComfyUI Manager: search ComfyUI_RS_NAI_API_Request, Install, restart. Then put NAI_ACCESS_TOKEN=your_token_here in a .env inside the pack folder. The pack's requests share one lock with at least two seconds between network attempts, so graphs with several generative nodes feel paced rather than fast. A "not found in environment variables" error almost always means the .env is in the wrong folder.
Load Image → NAI Reference Inset → NAI Reference Inset Generate → Preview Image
Honest expectations
The author's release notes are unusually straight about this: two live requests on 2026-10-11 (V5 Full and Medium Effort, 1024×768 canvas, 50% left reference, both returning a 512×768 crop). Reference-side pixels were preserved exactly, and the blue robot's body, display face and red flower carried into the new park-bench scene. They call it a smoke test, not a consistency benchmark.
Believe them. Reference strength depends on the model, the source image, your prompt, and how much canvas the reference got. Simple backgrounds beat busy ones, style carries over more than you might want, and repeated panels happen. Expect "useful guidance," not "same character, guaranteed" - for nailing a character, the pack's character prompts and its Detailer are the tools built for it.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| inset | RS_NAI_INSET | — | |
| prompt | STRING | Describe the reference character and the new scene. reference inset is added automatically if absent. | |
| negative_prompt | STRING | lowres, bad anatomy | — |
| model | COMBO | NAI Diffusion V5 Full | V5 Full Medium Effort always uses 14 steps, Euler Ancestral, zero CFG Rescale, and fixed Heavy Undesired Content. Custom base/character negative prompts are ignored. Prompt Guidance remains adjustable. Image-to-image and inpainting require limit_opus_free=False and can spend Anlas. V5 Curated inpainting uses V4.5 Curated. |
| seed | INT | -1-1–4294967295 | — |
| steps | INT | 281–50 | — |
| cfg_scale | FLOAT | 6.00–30 | — |
| limit_opus_free | BOOLEAN | true | Reference inset uses ordinary inpainting. True blocks before token access or encoding. False permits possible Anlas spending. |
| sampleropt | COMBO | k_euler_ancestral | 7 options: k_dpmpp_2m, k_dpmpp_sde, k_dpmpp_2m_sde, k_dpmpp_2s_ancestral, k_euler_ancestral, k_euler, +1 |
| scheduleropt | COMBO | karras | 4 options: native, karras, exponential, polyexponential |
| characterPromptsopt | LIST,RS_MC_CHARACTER_PIPE,NAI_CONTEXT | Original character prompts. Coordinates 0–1 refer to the generated output and are mapped to the full canvas automatically. | |
| save_formatopt | COMBO | PNG | Autosave format. Preserves NovelAI generation information. No ComfyUI workflow is embedded. |
| webp_qualityopt | INT | 901–100 | Used only for lossy WebP. Lossless WebP preserves pixels. |
| request_delay_secondsopt | FLOAT | 0.00–3600 | Wait before each NovelAI request, including each detail region and uncached Vibe encoding. 0 adds no delay. The built-in 2-second gap overlaps this timer; a longer server retry wait still applies. Preview-only runs do not wait. Stop cancels the countdown. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| full_canvas | IMAGE | — |
| applied_prompt | STRING | — |