EmpirioLabs AI Generate Image
Klein 4B behind a dropdown, billed per image
- images
- url
Here's the honest framing before anything else: the default model here, flux-2-klein-4b, is one you can run locally in about 8GB of VRAM in one to two seconds a picture. Paying per image for it is not obviously smart. So this node is for the three cases where it is: you're on a laptop with no card worth the name, you want a four-up seed sweep without loading a checkpoint, or you're prototyping a graph tonight and downloading weights can wait.
What it is
A text-to-image node that doesn't run a model. It sends model, prompt and your options to the EmpirioLabs AI endpoint and hands back the finished images, decoded into a normal ComfyUI IMAGE tensor. On the canvas it's indistinguishable from a local sampler - same input slot, same output slot, same Save Image downstream. Underneath it's an HTTP client with your API key.
That shape has a cost no node can hide: everything you type goes to a server you don't control, subject to that server's filters, and each call is metered. In this pack's favour: the key never appears as a node input (workflows and saved PNGs keep widget values, so a typed key would travel with every shared workflow), requests go to one fixed host, and downloads only come from links the API returned.
How it works
It POSTs to /v1/images/generations with sync on and asks for URLs back, so the usual path is one request, one answer, no polling. If the API replies with a job envelope instead, the node polls and pushes progress as it goes. Then it downloads each file and stacks them into one [B, H, W, C] float tensor in the 0–1 range, keeping an alpha channel if anything in the batch has transparency, and fitting odd sizes to the first image so the batch can exist at all.
The inputs you'll touch
model- dropdown from the live EmpirioLabs catalog, refreshed on startup and every few hours.flux-2-klein-4bis the default and also the internal fallback, so if the catalog didn't load you'll see exactly one entry.prompt- required. Empty is an error, not a request.aspect_ratioandresolution- combos whose options come from the catalog, withdefaultmeaning "whatever the model likes". Resolution options are things like 1K / 2K / 4K, and they're model-dependent - pick a 4K Klein does not offer and the API will tell you so.num_images- 1 to 4. Each one is billed, so four is four times the spend, not a free batch.seed- 0 to 2147483647, with control-after-generate. Only forwarded if the chosen model actually accepts a seed.extra_parameters- raw JSON for anything else the model takes, e.g.{"negative_prompt": "blurry"}. It can't overridemodel,prompt,syncorwait; the node owns those.
Two outputs: images (IMAGE) goes to Save Image, a preview, or an upscaler. url (STRING) is a link to the first image, and its real purpose is being wired into the image_url input of EmpirioLabs AI Generate Video to animate that frame. It expires, so it's a handoff, not storage.
Install and the key
In ComfyUI Manager, search EmpirioLabs AI under Custom Nodes Manager, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/EmpirioLabs-AI/comfyui-empiriolabs.git
ComfyUI 0.3.48 or newer is required - the pack uses the newer comfy_api node class, so it won't load on an old build. It pulls no extra Python packages.
The key comes from platform.empiriolabs.ai (they start sk-empiriolabs-). Set EMPIRIOLABS_API_KEY and restart ComfyUI, or copy config.example.ini to config.ini inside the pack folder and paste the key in - that file is re-read on every run, so it takes effect immediately. Note the folder name depends on how you installed: custom_nodes/comfyui-empiriolabs for git, custom_nodes/empiriolabs for the registry version.
Where people get burned
Re-queueing re-bills you. A new request happens every run. Leave control-after-generate on randomize and every re-queue is a fresh charge; set it to fixed while you're tweaking your prompt, and the workflow repeats the last result while the inputs stay the same.
The links expire. Nothing you generate lands on your disk unless a Save node puts it there. If the image matters, wire it into Save Image.
The dropdown froze at one model. The catalog couldn't be reached when ComfyUI started. The node still works with that one model and retries in the background for a couple of minutes; reload the browser to pick up the refreshed list. A workflow saved with a model that isn't currently listed still runs - the API decides.
Errors are the API's words, not the node's. An unsupported parameter comes back as a message plus a request ID, and it usually names the offending field.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | flux-2-klein-4b | Image model from the EmpirioLabs AI catalog. Prices and details: https://empiriolabs.ai/models |
| prompt | STRING | Description of the image to create. | |
| aspect_ratio | COMBO | default | Output aspect ratio. default uses the model's default. Supported values depend on the model. |
| resolution | COMBO | default | Output resolution. default uses the model's default. Supported values depend on the model. |
| num_images | INT | 11–4 | Number of images to create. Each image is billed. |
| seed | INT | 00–2147483647 | Change the seed to run the node again. Models that accept a seed also receive it. |
| extra_parametersopt | STRING | Optional request fields as a JSON object, for example {"negative_prompt": "blurry"}. Each model lists the fields it accepts on its page at https://empiriolabs.ai/models. Fields set here take precedence over the dropdowns above. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| url | STRING | Link to the first image. It expires, so save the image to keep it. Connect it to image_url on EmpirioLabs AI Generate Video to animate the image. |