Nodes/ComfyUI-Inpaint-CropStitch-NB2/Nano Banana 2 Edit (FAL API)
ComfyUI Node

Nano Banana 2 Edit (FAL API)

Nano Banana 2 Edit — the 'generate' step in the crop-and-stitch roundtrip

By amortegui84·Created 5 months ago·Updated 3 months ago· 3
Nano Banana 2 Edit (FAL API)
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • images
  • info
promptEdit Image 1 using the connected reference images. Preserve the original identity, pose, lighting, and framing unless explicitly requested.
num_images1
aspect_ratioauto
resolution2K
output_formatpng
safety_tolerance4
limit_generationstrue
enable_web_searchfalse
thinking_levelnone
seed-1
sync_modefalse
api_key
api_key_env_varFAL_KEY

The first thing to understand about Nano Banana 2 is that it's a generation model, not an inpainting model. It doesn't accept a mask. You hand it an image and a sentence and it hands back a brand new image, and the pixels outside your intended edit come back similar but not identical. That's why every other week someone posts "can I do inpainting with Nano Banana?" and the answer is always the same: crop, edit, stitch back.

This node is the middle of that dance. NB2NanoBanana2Edit calls FAL's fal-ai/nano-banana-2/edit endpoint - one base image plus up to five references, no mask input anywhere in the payload - and it's meant to sit between NB2 Crop and NB2 Stitch in the pack's signature roundtrip:

NB2 Mask Generator or NB2 Smart Region -> NB2 Crop
    -> cropped_image -> Nano Banana 2 Edit
    -> NB2 Stitch -> back onto the original

What you set

Only image_1 (your cropped region) and prompt are required. The default prompt tells the model to preserve identity, pose, lighting and framing unless told otherwise - leave it, and describe only the change. The rest:

  • resolution (0.5K / 1K / 2K / 4K) and aspect_ratio - NB2 outputs at fixed resolutions (16:9, 9:16, 1:1 in 1K/2K/4K). The crop nodes have already matched this, so if you changed resolution on the crop, change it here too or the stitch has to resample harder than it should.
  • num_images (1–4) - generate a few candidates, pick the one where Nano Banana actually listened.
  • thinking_level - none / minimal / high. Bumping this to high genuinely helps on fiddly instructions; it costs latency and money, so save it for the passes that keep missing.
  • enable_web_search - off by default, and you'll rarely need it on for retouching. Leave it off.
  • safety_tolerance (1–6, default 4) - how much the safety filter lets through. This is the dial to touch if the node keeps refusing perfectly innocent garment edits; FAL's default stance is cautious.
  • seed - -1 omits it. Set a real seed to lock in a good result across tweaks.
  • api_key / api_key_env_var - the FAL key, or FAL_KEY from the environment. Same story as every FAL node in this pack.

Outputs are images and info; wire images into NB2 Stitch's inpainted_image.

Why the fixed resolution matters

This is the part that trips people up. NB2 only emits at exact sizes - 1376×768 for 16:9 at 1K, 2752×1536 at 2K, 5504×3072 at 4K, and the vertical/square equivalents. The pack's whole resolution table is built around that, because NB2 Stitch needs to downscale the generated image back to the crop's size and composite it. The README even shows the fun case: crop a 2K-sized area, generate at 4K for extra detail, and let the stitch downscale. That works, and it's a nice free detail boost.

Install & the usual suspects

One pack, fifteen nodes: Manager search comfyui-inpaint-cropstitch-nb2, or

cd ComfyUI/custom_nodes
git clone https://github.com/amortegui84/comfyui-inpaint-cropstitch-nb2

then restart. No models to download - Nano Banana runs on FAL's side, so you need a FAL key (FAL_KEY env var, or pasted into api_key). If your first run dies with 401 Unauthorized from storage/auth/token, the key isn't reaching the process: set it before launching ComfyUI and fully restart, don't just refresh the browser tab. And if you're on ComfyUI Windows Portable, make sure fal-client is installed into the embedded Python, not your system Python - the README has the exact python_embeded\python.exe -m pip install ... incantation for that.

Categoryinpaint/api

Inputs (19)

NameTypeDefaultDescription
image_1IMAGE
promptSTRINGEdit Image 1 using the connected reference images. Preserve the original identity, pose, lighting, and framing unless explicitly requested.
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE
image_6optIMAGE
num_imagesoptINT11–4
aspect_ratiooptCOMBOauto15 options: auto, 21:9, 16:9, 3:2, 4:3, 5:4, +9
resolutionoptCOMBO2K4 options: 0.5K, 1K, 2K, 4K
output_formatoptCOMBOpng3 options: png, jpeg, webp
safety_toleranceoptCOMBO46 options: 1, 2, 3, 4, 5, 6
limit_generationsoptBOOLEANtrue
enable_web_searchoptBOOLEANfalse
thinking_leveloptCOMBOnone3 options: none, minimal, high
seedoptINT-1-1–2147483647
sync_modeoptBOOLEANfalse
api_keyoptSTRING
api_key_env_varoptSTRINGFAL_KEY

Outputs (2)

NameTypeDescription
imagesIMAGE
infoSTRING