Labnana Image Generation
Text-to-image, image editing, and 4K in one node — no GPU required
- client
- reference_images
- images
- image_urls
- task_id
This is the headline node of ComfyUI-Labnana, and the one you'll actually use. Labnana is a pay-per-credit image API (by Marswave) serving closed models you can't run locally - Google's Gemini 3 Pro Image, GPT Image 2, Seedream 5.0 Pro, and the Wan family. This node wraps all of that into a single generator: you type a prompt, pick a model, and it submits the job, waits for it, downloads the result, and hands you a normal ComfyUI IMAGE tensor. From the canvas it looks exactly like a local sampler, right down to a seed widget. Underneath it's an HTTP client, which is the whole pitch - and it's the standard API-wrapper tradeoff: your prompt leaves the machine, per-image credit costs apply, and the model's own content filtering is not something a node can bypass.
How it works
The node POSTs to the async generation endpoint, polls the task every 5 seconds until it's done, then downloads the images and converts them to an IMAGE batch. If the job fails or times out, you get a Labnana API error with a code and a plain-English hint in the dialog.
The inputs that matter:
prompt- generation or editing instructions, multiline. Wire aLoad Imageintoreference_imagesand write editing instructions in the prompt for img2img.model- six choices:gemini-3-pro-image,gemini-3.1-flash-image,gpt-image-2,wan2.7-image-pro,wan2.7-image,seedream-5-0-pro. Theprovideris derived automatically.image_size(1K/2K/4K) andaspect_ratio(12 ratios) - these constrain each other per model, and invalid combos fail locally before a single credit is spent. Watch the 4K trap:wan2.7-imageandseedream-5-0-prodon't do 4K at all, andwan2.7-image-proonly does 4K for text-to-image, not with reference images.seed- the sneaky one. It is never sent to the API. It only exists so changing it forces ComfyUI to re-run the node instead of serving the cached result. Set it to randomize to regenerate every run.
Optional extras: system_prompt is prepended to your prompt (the API has no native system-prompt field - handy for sharing one style preamble), reference_image_urls lets you pass one https:// or gs:// URL per line instead of tensors, and timeout (default 600s) is what you raise for slow 4K jobs.
Outputs: images (the IMAGE batch - wire into Save Image), image_urls (public result URLs, valid for 7 days), and task_id (the server-side job id, handy if you want to fetch it again later).
Install
cd ComfyUI/custom_nodes
git clone https://github.com/exoticknight/ComfyUI-Labnana.git
Restart, or just search Labnana in ComfyUI Manager. The only dependency is requests (already in ComfyUI). You do need a key: create one at labnana.com/api-keys, then either paste it into the Labnana API Client node or set LABNANA_API_KEY as an environment variable and leave the field empty.
Cost and gotchas
Generation costs credits per image (roughly 4–15 credits at 1K depending on model, more for 4K), so run the Labnana Estimate Credits node first to see the live price before you commit. Free usage (if your account has freeUsages) is consumed before credits for 1K/2K but never covers 4K, and a purely free account may hit retryable busy responses at peak times. The error codes that actually bite: 21007 invalid key, 26004 insufficient credits, 29003 parameter error (check your model/size/ratio combo), 29998 rate limited (the client already retried with backoff). And because the model refuses at the source - Google's moderation, OpenAI's, ByteDance's - a prompt that a local checkpoint would happily render will just error here. That's the price of running a model you were never allowed to download.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| client | LABNANA_CLIENT | — | |
| prompt | STRING | Generation or editing instructions. | |
| model | COMBO | gemini-3-pro-image | 6 options: gemini-3-pro-image, gemini-3.1-flash-image, gpt-image-2, wan2.7-image-pro, wan2.7-image, seedream-5-0-pro |
| image_size | COMBO | 2K | 4K is unsupported on wan2.7-image / seedream-5-0-pro and on reference-guided wan2.7-image-pro requests. |
| aspect_ratio | COMBO | 1:1 | Supported ratios depend on the selected model; invalid combinations fail locally. |
| seed | INT | 00–18446744073709550000 | Not sent to the API — changes force ComfyUI to re-run the node instead of using the cached result. |
| system_promptopt | STRING | Optional style/behavior instructions prepended to the prompt (the API has no native system-prompt field). | |
| reference_imagesopt | IMAGE | Batch of reference images, sent inline as base64. Max count depends on model (4-14). | |
| reference_image_urlsopt | STRING | Optional http(s):// or gs:// image URLs, one per line, sent as fileData references. | |
| timeoutopt | FLOAT | 60030–3600 | Max seconds to wait for the result (4K jobs can be slow). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| image_urls | STRING | — |
| task_id | STRING | — |