Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon Luma AI Image API
ComfyUI Node

πŸ€– Leon Luma AI Image API

Luma Photon with full image, style and character reference support

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Luma AI Image API
  • input_image_ref_socket
  • input_style_ref_socket
  • input_char_ref_socket
  • image
  • image_url
  • seed
β—„promptA stunning fantasy landscapeβ–Ί
β—„modelphotonβ–Ί
β—„output_formatpngβ–Ί
β—„seed0β–Ί
β—„api_urlhttps://api.hyprlab.io/v1/images/generationsβ–Ί
β—„api_keyYOUR_API_KEY_HEREβ–Ί
β—„response_formaturlβ–Ί
β—„aspect_ratio1:1β–Ί
β—„input_image_ref_urlβ–Ί
β—„image_reference_weight0.50β–Ί
β—„input_style_ref_urlβ–Ί
β—„style_reference_weight0.50β–Ί
β—„input_char_ref_urlβ–Ί

Leon Luma AI Image API is the pack's Luma node, and it's the most feature-dense of the "just generate an image" crowd. It wraps Luma's photon and photon-flash models through the HyprLab API, and what makes it stand out is the reference stack: image reference, style reference, and character reference - each with its own socket, its own hosted-URL fallback, and its own strength slider. If you want Luma's look with an actual subject or art style carried over from images you already have, this node is set up for exactly that.

The three-way reference system is the headline. input_image_ref_socket/input_image_ref_url with image_reference_weight (0–1) controls compositional reference; input_style_ref_socket/input_style_ref_url with style_reference_weight steers the artistic direction; and input_char_ref_socket/input_char_ref_url aims at keeping a person or character recognizable. That's a lot of levers for a hosted wrapper, and it's the reason you'd pick this node over the pack's simpler Imagen or Grok ones.

How it works

Same base-class machinery as the pack's other generation nodes: JSON POST to https://api.hyprlab.io/v1/images/generations with a Bearer token, up to 5 retries with exponential backoff, download the result, return an RGBA tensor. The reference images are resolved the pack way - a tensor becomes a base64 data URI, a URL is passed through, and supplying both at once raises an error rather than guessing.

The inputs that matter:

  • model - photon (default) or photon-flash. Flash is the fast/cheap tier; photon is the quality pick.
  • aspect_ratio - 1:1, 3:4, 4:3, 9:16, 16:9, 9:21, 21:9.
  • The three reference pairs plus their _weight sliders.
  • seed - and here's an honest warning baked into the tooltip: "may not be used by Luma API via HyprLab". In other words, don't bet your reproducibility on it.

Outputs: image, image_url, seed.

Installing it

Pack-wide install, nothing special:

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. Light dependencies, no models to download.

Where people get burned

The seed caveat is the one to remember - if your Luma outputs keep varying run-to-run no matter what seed you set, that's the API (or HyprLab's handling of it), not you. The reference system also has a subtlety: the socket and URL versions are mutually exclusive per reference type, so pick one path per reference. And the pack's usual suspects apply: placeholder key (YOUR_API_KEY_HERE), slow-failing retries on bad auth, and HyprLab's thin public documentation. Set a real key, feed it one or two reference images with sane weights around 0.5, and Luma's output is genuinely hard to get locally.

CategoryLeon_API

Inputs (16)

NameTypeDefaultDescription
promptSTRINGA stunning fantasy landscapeMain text input to guide the generation process (max 10,000 characters)
modelCOMBOphotonLuma AI model to use for generation
output_formatCOMBOpngFormat of the output image
seedINT00–18446744073709550000Random seed for reproducible results (may not be used by Luma API via HyprLab)
api_urlSTRINGhttps://api.hyprlab.io/v1/images/generationsAPI URL
api_keySTRINGYOUR_API_KEY_HEREYour HyprLab API key
response_formatCOMBOurlHow the response data should be formatted
aspect_ratiooptCOMBO1:1Aspect ratio of the output. If not specified, model default may be used.
input_image_ref_socketoptIMAGEImage for image reference.
input_image_ref_urloptSTRINGImage reference URL (use when providing a hosted image instead of socket input)
image_reference_weightoptFLOAT0.500–1Influence of the image reference (0 to 1).
input_style_ref_socketoptIMAGEImage for style reference.
input_style_ref_urloptSTRINGStyle reference URL (use when providing a hosted image instead of socket input)
style_reference_weightoptFLOAT0.500–1Influence of the style reference (0 to 1).
input_char_ref_socketoptIMAGEImage for character reference.
input_char_ref_urloptSTRINGCharacter reference URL (use when providing a hosted image instead of socket input)

Outputs (3)

NameTypeDescription
imageIMAGEβ€”
image_urlSTRINGβ€”
seedINTβ€”