π€ Leon FLUX 2 Image API
FLUX 2 Pro, Max and Flex from a ComfyUI node β the multi-image workhorse
- input_images_array
- image
- image_url
- seed
Leon FLUX 2 Image API is the node for when "local FLUX on my 3060" isn't good enough. It wraps Black Forest Labs' FLUX 2 line - Pro, Max, and Flex - through the HyprLab API and hands you back a ComfyUI-ready image tensor. If you've been on the FLUX 1.1 train, FLUX 2's big selling point is that it takes multiple input images natively and reasons over them together, and this node is built around exactly that.
FLUX 2 isn't a local-model situation. It's a hosted API product - you pay per generation, you get an image URL back, and the node downloads it and converts it to an RGBA tensor so the rest of your graph never knows the difference. There's no checkpoint to hunt down and no VRAM to manage, which is the entire appeal: the FLUX 2 workflow in ComfyUI is "write a prompt, maybe feed it some images, hit run."
How it works
The node POSTs a JSON payload to https://api.hyprlab.io/v1/images/generations (that's the api_url default - you can repoint it) with a Bearer token, then handles the response through the pack's shared base class: retry up to 5 times with exponential backoff, download the image, convert to RGBA. Outputs are image, image_url, and seed.
The inputs that actually matter:
model_choice-FLUX 2 Pro,FLUX 2 Max, orFLUX 2 Flex. Pro is the default and the generalist.input_images_array- the multi-image input. The node caps it: up to 8 images for Pro, up to 10 for Max and Flex, and it preserves their original dimensions. This is the feature. Chain it from the pack's Image Array Builder.aspect_ratioandresolution- pick frommatch_input_image, the usual ratios, and resolutions from 0.5 MP to 4 MP.stepsandguidance- these are FLUX 2 Flex only (the tooltips say so, and the code only adds them for Flex). Flex is the fast/cheap one; if you're on Pro or Max, changing them does nothing.
One subtle thing: steps and guidance have defaults of 30 and 3.5 that get added to the payload only for Flex. On Pro/Max they're ignored entirely, so don't chase weird settings wondering why output doesn't change - that's expected.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/l3ony2k/comfyui-leon-nodes
pip install -r requirements.txt
Restart ComfyUI, or install "ComfyUI Leon Nodes" via ComfyUI Manager. Requirements are minimal (tenacity, requests, pillow, torch, numpy) and there are no model files - it's all API calls.
Where people get burned
The API key is the usual suspect: the default YOUR_HYPRLAB_API_KEY placeholder won't generate anything but a slow 401. And because the retry logic backs off up to 5 times, that bad-key failure takes a while to surface - check your console output if a run hangs. Second, the HyprLab route means this is a paid service with essentially no public community footprint - don't expect a big Reddit thread troubleshooting it; the evidence base is thin and you'll be reading provider docs. Finally, remember multi-image mode is the reason to pick this node over the older FLUX 1.1 node in the same pack: if you're remixing references, you want the FLUX 2 one.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| model_choice | COMBO | FLUX 2 Pro | 3 options: FLUX 2 Pro, FLUX 2 Max, FLUX 2 Flex |
| prompt | STRING | A stunning artistic photo | β |
| response_format | COMBO | url | 2 options: url, b64_json |
| output_format | COMBO | png | 3 options: png, jpeg, webp |
| seed | INT | 00β18446744073709550000 | β |
| api_url | STRING | https://api.hyprlab.io/v1/images/generations | β |
| api_key | STRING | YOUR_HYPRLAB_API_KEY | β |
| input_images_arrayopt | IMAGE_ARRAY | Array of input images for FLUX 2 models. Connect Image Array Builder node output here. | |
| aspect_ratioopt | COMBO | 1:1 | Aspect ratio for generated image |
| resolutionopt | COMBO | 1 MP | Image resolution |
| stepsopt | INT | 301β50 | Number of steps (FLUX 2 Flex only) |
| guidanceopt | FLOAT | 3.51.5β10 | Guidance scale (FLUX 2 Flex only, range: 1.5-10) |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| image_url | STRING | β |
| seed | INT | β |