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

πŸ€– Leon Pruna Image Edit API

Edit images in place with a single sentence

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Pruna Image Edit API
  • input_images_array
  • image
  • image_url
  • seed
β—„promptmake it cyberpunk styleβ–Ί
β—„output_formatpngβ–Ί
β—„seed0β–Ί
β—„api_urlhttps://api.hyprlab.io/v1/images/generationsβ–Ί
β—„api_keyYOUR_API_KEY_HEREβ–Ί
β—„response_formaturlβ–Ί
β—„aspect_ratio1:1β–Ί

The pack's Pruna family has three nodes, and this is the interesting one. Leon_Pruna_Image_Edit_Node sends the pack's p-image-edit model an image plus a plain-English instruction - "make it cyberpunk style", the default - and gets back an edited version that keeps the composition while changing what you asked for. It's the instruction-editing pattern the whole community has been chasing since Qwen-Edit and Nano Banana made it look easy: give the model a reference and a sentence, not a mask and a denoise slider.

The mechanism is the standard pack base class (HyprLabImageGenerationNodeBase), so the plumbing is identical to the other API nodes: an OpenAI-style POST to HyprLab's /v1/images/generations endpoint with a Bearer token, exponential-backoff retries up to five attempts, and a response that becomes an RGBA tensor. What's specific here is the payload - model: "p-image-edit" and an images field carrying your input images - and one hard rule: this node refuses to run without at least one input image. The tooltip on input_images_array says it plainly, and the code enforces it with a ValueError if you leave it empty.

Inputs that matter

  • input_images_array - the one that makes it work. It's an IMAGE_ARRAY, so feed it from the pack's Leon Image Array Builder node (which serializes up to four images to base64 data URIs by default). This is the single most common beginner failure: connecting a plain LoadImage tensor into an IMAGE_ARRAY socket won't work.
  • prompt - the edit instruction, not a fresh-scene description. Say what changes, keep what stays.
  • aspect_ratio - same nine choices as the other Pruna nodes, defaulting to 1:1. If your reference is a different ratio, the output will follow this field, not the input - worth setting deliberately.

Outputs: image, image_url, seed - the pack's standard triple.

Installing

Same pack, same two ways - ComfyUI Manager (search Leon) or clone:

cd ComfyUI/custom_nodes/
git clone https://github.com/l3ony2k/comfyui-leon-nodes comfyui-leon-nodes
pip install -r requirements.txt

Restart, and you're done - no models, no VRAM, just an API key from HyprLab.

Common issues

Beyond the Image Array Builder gotcha above, the failure modes are the usual API-node ones: the default YOUR_API_KEY_HERE key, and 4xx responses that the node prints in full to the console. One thing worth knowing about instruction editing generally: these models are surprisingly sensitive to prompt wording, so if the edit misses, try being more explicit about what not to touch ("keep the lighting and pose, change only the background"). And remember every run is a paid API call - iterate on the prompt, not the seed roulette.

CategoryLeon_API

Inputs (8)

NameTypeDefaultDescription
promptSTRINGmake it cyberpunk styleMain text input to guide the edit process
output_formatCOMBOpngFormat of the output image
seedINT00–18446744073709550000Random seed for reproducible results
api_urlSTRINGhttps://api.hyprlab.io/v1/images/generationsAPI URL
api_keySTRINGYOUR_API_KEY_HEREYour HyprLab/Pruna API key
response_formatCOMBOurlHow the response data should be formatted
input_images_arrayoptIMAGE_ARRAYArray of input images for guidance. Connect Image Array Builder node output here.
aspect_ratiooptCOMBO1:1Aspect ratio of the generated image

Outputs (3)

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