Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon Seedream 4 API
ComfyUI Node

πŸ€– Leon Seedream 4 API

Seedream 4, up to 4K, without touching ByteDance's UI

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Seedream 4 API
  • input_images_array
  • image
  • image_url
  • seed
β—„prompta cute catβ–Ί
β—„output_formatpngβ–Ί
β—„seed0β–Ί
β—„api_urlhttps://api.hyprlab.io/v1/images/generationsβ–Ί
β—„api_keyYOUR_API_KEY_HEREβ–Ί
β—„response_formaturlβ–Ί
β—„aspect_ratio1:1β–Ί
β—„size2Kβ–Ί

Seedream is ByteDance's closed image flagship - API-only, per the company's sharp two-track rule of "components open, products closed" - and its newer 4.x generation is exactly the kind of model you can't run locally and don't want to prompt inside a Chinese cloud app. Leon_Seedream4_API_Node is the pack's route to it: one HyprLab key, a prompt, an aspect ratio, and it comes back at 2K or 4K. There's no model dropdown here at all - the payload is hardcoded to seedream-4.5 (the 4.5 revision, so don't get thrown by the "4" in the node name). One node, one model, up to 4K output, zero VRAM.

How it works

Same shared HyprLabImageGenerationNodeBase as the pack's other image nodes: build an OpenAI-style payload, POST it to https://api.hyprlab.io/v1/images/generations with a Bearer token, retry with exponential backoff (up to five attempts), and turn the response into an RGBA tensor. The Seedream 4-specific payload fields are aspect_ratio, size (2K/4K), and an image_input that takes one or more reference images for guidance.

Inputs that matter

  • size - 2K (default) or 4K. This is where the remote-render trade pays off: a 4K generation that would melt a 6GB card locally costs you nothing in VRAM. It costs money instead, so don't set it to 4K out of habit.
  • aspect_ratio - ten options including match_input_image, which mirrors your reference image's ratio when you supply one (and is skipped with a console warning if you don't).
  • input_images_array - up to four reference images for guidance, via the pack's Image Array Builder (IMAGE_ARRAY). Seedream 4.5's multi-image guidance is a genuine strength - throw it a few frames or views of a subject and let it hold consistency.

Outputs: image, image_url, seed.

Installing

Same pack as every Leon node - 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, paste a HyprLab key, and you're generating. Light dependencies (tenacity, requests, pillow, torch, numpy), no model files anywhere.

Common issues

The two pack-wide classics apply: swap the default YOUR_API_KEY_HERE, and read the console when a 4xx comes back - the node logs the full request and error. The Seedream-specific trap is size expectations: if your HyprLab plan or the backend limits 4.5 to certain tiers, a 4K request can 4xx; drop to 2K and retry. And treat match_input_image properly - it only does its job when you actually feed it an image, and it tells you in the console when you don't. Finally, it's metered: pick your size and references before you run, not after a couple of paid 4K experiments you didn't need.

CategoryLeon_API

Inputs (9)

NameTypeDefaultDescription
promptSTRINGa cute catMain text input to guide the generation process (max 10,000 characters)
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 API key
response_formatCOMBOurlHow the response data should be formatted
input_images_arrayoptIMAGE_ARRAYArray of input images for guidance (up to 4). Connect Image Array Builder node output here.
aspect_ratiooptCOMBO1:1Aspect ratio of the generated image
sizeoptCOMBO2KImage resolution (2K/4K)

Outputs (3)

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