Nodes/Leon's Utility and API Integration Nodes/πŸ€– Leon Stable Diffusion XL API
ComfyUI Node

πŸ€– Leon Stable Diffusion XL API

SDXL with the full Stability sampler menu, via API

By l3ony2kΒ·Created about a year agoΒ·Updated 2 months agoΒ· 3
πŸ€– Leon Stable Diffusion XL API
    • image
    • image_url
    • seed
    β—„promptA cute catβ–Ί
    β—„modelsdxl-1.0β–Ί
    β—„output_formatwebpβ–Ί
    β—„seed0β–Ί
    β—„api_urlhttps://api.hyprlab.io/v1/images/generationsβ–Ί
    β—„api_keyYOUR_API_KEY_HEREβ–Ί
    β—„response_formaturlβ–Ί
    β—„height1024β–Ί
    β—„width1024β–Ί
    β—„cfg_scale5.0β–Ί
    β—„samplerK_DPM_2_ANCESTRALβ–Ί
    β—„steps20β–Ί
    β—„style_presetphotographicβ–Ί

    SDXL is the old reliable of this pack: the 1024-native model that defined realism work for two years and is still the baseline half the community compares everything against. It's also something you can absolutely run locally - so why would you want it as an API node? Because this is the Stability API flavor of SDXL, with the sampler menu, steps, CFG, and style presets you remember from the hosted service, all exposed as inputs. Leon_StableDiffusion_XL_API_Node gives you that classic SDXL parameter surface from inside a ComfyUI graph: pick sdxl-1.0, set your sampler and steps, and let HyprLab run the 2.6B model on hardware that isn't yours.

    Where this shines: consistent batch work on a machine that can't hold SDXL comfortably, or anywhere you want the exact Stability sampler lineup (the K_DPM_2_ANCESTRAL-style k-diffusion names) without reconstructing it from memory. If you already run SDXL locally and love your tuned setup, honestly, keep doing that - this node isn't better, it's just remote.

    How it works

    Same StableDiffusionImageGenerationNodeBase as the pack's other SD nodes: POST an OpenAI-style payload to https://api.hyprlab.io/v1/images/generations with a Bearer token, retry with exponential backoff (five attempts), decode to RGBA tensor. What sets this node apart is how much of the classic SDXL API it exposes:

    • sampler - 10 choices: DDIM, DDPM, K_DPMPP_2M, K_DPMPP_2S_ANCESTRAL, K_DPM_2, K_DPM_2_ANCESTRAL, K_EULER, K_EULER_ANCESTRAL, K_HEUN, K_LMS.
    • steps - 1–50, default 20.
    • cfg_scale - 0–35, default 5. The KB's troubleshooting notes the classic SDXL sweet spot is roughly 5–9, so the default sits at the low end; if output feels under-adhered, nudge it up.
    • height / width - 640–1536, default 1024, and the tooltip warns they "must match allowed dimensions." SDXL has trained aspect ratios; feed it 1024x1536-ish shapes it knows, not arbitrary rectangles.
    • style_preset - 17 presets like photographic, anime, cinematic, digital-art, isometric, low-poly. This is the Stability-API flavor of style steering; it does real work on this model.

    Outputs: image, image_url, seed (seed maxes at 4,294,967,295 here - one more than the SD3 nodes).

    Installing

    Same pack, both 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, paste a HyprLab key. No model files, no VRAM.

    Common issues

    The pack-wide classics apply (default api_key, console 4xx bodies). SDXL-specific: the "must match allowed dimensions" warning is the one to respect - SDXL's native aspect ratios are the trained set, and requesting 1536x900 will usually 4xx or come back warped, which is the same "resolution wrong" failure the troubleshooting KB flags for local SDXL. And sampler knowledge transfers: K_DPMPP_2M at 20–25 steps is the boring reliable pick, K_EULER_ANCESTRAL gives the looser high-variance look - same folklore as local generation, now billed per call.

    CategoryLeon_API

    Inputs (13)

    NameTypeDefaultDescription
    promptSTRINGA cute catText prompt for image generation
    modelCOMBOsdxl-1.0Stable Diffusion XL 1.0 model
    output_formatCOMBOwebpFormat of the output image
    seedINT00–4294967295Seed for deterministic generation (0-4294967295)
    api_urlSTRINGhttps://api.hyprlab.io/v1/images/generationsAPI URL
    api_keySTRINGYOUR_API_KEY_HEREYour HyprLab API key
    response_formatCOMBOurlFormat of the response data
    heightoptINT1024640–1536Height in pixels (must match allowed dimensions)
    widthoptINT1024640–1536Width in pixels (must match allowed dimensions)
    cfg_scaleoptFLOAT5.00–35How strictly the model follows the prompt (0-35)
    sampleroptCOMBOK_DPM_2_ANCESTRALSampling algorithm
    stepsoptINT201–50Number of processing steps (1-50)
    style_presetoptCOMBOphotographicPreset style to apply to the generated image

    Outputs (3)

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