Nodes/ComfyUI Labnana/Labnana Image Generation
ComfyUI Node

Labnana Image Generation

Text-to-image, image editing, and 4K in one node — no GPU required

By exoticknight·Created about a month ago·Updated 19 days ago· 0
Labnana Image Generation
  • client
  • reference_images
  • images
  • image_urls
  • task_id
prompt
modelgemini-3-pro-image
image_size2K
aspect_ratio1:1
seed0
system_prompt
reference_image_urls
timeout600

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 a Load Image into reference_images and 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. The provider is derived automatically.
  • image_size (1K/2K/4K) and aspect_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-image and seedream-5-0-pro don't do 4K at all, and wan2.7-image-pro only 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.

CategoryLabnana/Generate

Inputs (10)

NameTypeDefaultDescription
clientLABNANA_CLIENT
promptSTRINGGeneration or editing instructions.
modelCOMBOgemini-3-pro-image6 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_sizeCOMBO2K4K is unsupported on wan2.7-image / seedream-5-0-pro and on reference-guided wan2.7-image-pro requests.
aspect_ratioCOMBO1:1Supported ratios depend on the selected model; invalid combinations fail locally.
seedINT00–18446744073709550000Not sent to the API — changes force ComfyUI to re-run the node instead of using the cached result.
system_promptoptSTRINGOptional style/behavior instructions prepended to the prompt (the API has no native system-prompt field).
reference_imagesoptIMAGEBatch of reference images, sent inline as base64. Max count depends on model (4-14).
reference_image_urlsoptSTRINGOptional http(s):// or gs:// image URLs, one per line, sent as fileData references.
timeoutoptFLOAT60030–3600Max seconds to wait for the result (4K jobs can be slow).

Outputs (3)

NameTypeDescription
imagesIMAGE
image_urlsSTRING
task_idSTRING