The queue API (queue.fal.run) for the /edit endpoint gets stuck at
IN_PROGRESS indefinitely. Switch to the synchronous API (fal.run)
which blocks until the result is ready in a single HTTP call.
Also adds diagnostic logging to the ComfyUI console.
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7
The fal.ai nano-banana-pro/edit endpoint expects safety_tolerance as a
string (e.g. "4"), not an integer. Sending an integer caused the backend
to silently hang at IN_PROGRESS indefinitely.
Also:
- Add "auto" to ASPECT_RATIOS (the API default for edit, preserves
input image dimensions)
- Replace invalid "9:21" with "4:5" to match the API's enum
- Default the edit node's aspect_ratio to "auto"
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7
Large base64 data URIs in the JSON payload were causing fal.ai to hang
at IN_PROGRESS indefinitely. Now we upload images to fal.media CDN
first and pass the resulting URLs in the image_urls array.
Also removes debug logging from the previous commit.
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7
The queue submission response includes `status_url` and `response_url`
with the correct app path. Previously we stripped the `/edit` route from
the endpoint to build these URLs ourselves, which could cause polling to
target the wrong path and time out.
Now we use the URLs fal.ai returns directly, falling back to
full-endpoint construction if they're absent.
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7
The fal.ai nano-banana-pro/edit endpoint expects an `image_urls` array
containing all reference images, not separate `image_url`, `image_2_url`,
`image_3_url` fields. This was causing a 422 validation error:
{"detail":[{"loc":["body","image_urls"],"msg":"field required"}]}
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7
Instead of raise_for_status() which discards the response body,
check resp.ok and include the response text in the error message.
This will reveal the actual validation error from fal.ai.
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7
The fal.ai queue status/result URLs must use only the base app ID
(owner/name), not the full endpoint path. The /edit route was being
included in the polling URLs, causing a 405 Method Not Allowed.
Submit URL: queue.fal.run/fal-ai/nano-banana-pro/edit (correct)
Status URL: queue.fal.run/fal-ai/nano-banana-pro/requests/{id}/status
(was incorrectly: .../nano-banana-pro/edit/requests/{id}/status)
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7
The string-list combo was rendering as an INT widget defaulting to 300
(the timeout value). Changed to a proper INT type with min=1, max=6,
default=4 so it renders correctly in the ComfyUI UI.
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7
Users can now paste their fal.ai API key directly on the node
instead of setting the FAL_KEY environment variable. The env var
is still supported as a fallback when the field is left empty.
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7
Implements the two ComfyUI custom nodes for fal.ai Nano Banana Pro:
- NanoBananaProTextToImage: text-to-image generation via fal-ai/nano-banana-pro
- NanoBananaProImageEdit: image editing with safety_tolerance (1-6) via fal-ai/nano-banana-pro/edit
Uses fal.ai queue API with polling, supports all parameters from README
(aspect ratio, resolution, seed, web search, output format, etc).
https://claude.ai/code/session_01VtRzQMdLschx9awGyTGGH7