Nodes/ComfyUI-HaiperAI-API/Haiper Text to Image
ComfyUI Node

Haiper Text to Image

Four images per prompt, straight from Haiper's cloud

By Haiper-ai·Created 2 years ago·Updated 2 years ago· 14
Haiper Text to Image
    • output_image_dir_path
    • output_image_0_path
    • output_image_1_path
    • output_image_2_path
    • output_image_3_path
    promptadd prompt here
    negative_promptbad, slow
    seed-1
    aspect_ratio16:9
    resolution720
    is_publicfalse
    is_enable_prompt_enhancertrue

    Haiper Text to Image is the odd one out in this pack: it's the only node that makes stills, not video. One prompt in, four images out, rendered by Haiper's in-house image model in the cloud. If you're deep in the local Stable Diffusion ecosystem this isn't a replacement for your SDXL checkpoint - but it's a genuinely handy complement, especially as the first step of a video workflow. Generate four candidates with zero VRAM cost, pick the winner, and feed it into the pack's own Image to Video node.

    It's part of Haiper's official ComfyUI pack (launched on r/comfyui in late 2024), which is worth knowing for trust reasons: custom nodes execute arbitrary code on import, and this one is vendor-signed rather than a random community wrapper.

    How it works

    Thin wrapper, thick backend. The node POSTs your prompt to Haiper's text2image endpoint and polls the job every 20 seconds until it succeeds. It then downloads all four output images into a temp directory and returns their file paths. That's the entire local workload - no models, no sampling, no VRAM.

    Where people trip: the outputs are five STRING paths, not images. output_image_dir_path is the folder, and output_image_0_path through output_image_3_path are the individual JPGs. To actually see them you wire the folder path into VHS_LoadImagesPath from ComfyUI-VideoHelperSuite, with skip_first_images set to 0, 1, 2, and 3 on four copies to preview each of the four results. The pack's example workflow lays this out, so install VideoHelperSuite first.

    The inputs that matter

    Only prompt is required. The rest, briefly:

    • aspect_ratio - string, default 16:9. Valid: 21:9, 16:9, 9:16, 3:4, 4:3, 1:1.
    • resolution - 720 default; 720, 1080, and 2160 are the documented values. Higher costs more per image.
    • seed - -1 for random. Set it and rerun to explore variations of the same idea.
    • negative_prompt - default bad, slow; write a real one if the cloud model's aesthetic annoys you.
    • is_enable_prompt_enhancer - the AI prompt-rewriter, on by default. Flip it off if it changes your style.
    • is_public - defaults to False, keeping generations private to your account (the raw API would make them public by default - the node is the safer sibling).

    One thing to know before you hammer the queue button: the API bills per image, and this node always asks for four. Each run is four charges at your resolution tier.

    Install

    Get an API key from haiper.ai/haiper-api. Haiper requires prepaid credit before the API accepts requests, so a fresh account with no top-up will fail immediately. Then:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Haiper-ai/ComfyUI-HaiperAI-API.git
    cd ComfyUI-HaiperAI-API
    pip install -r requirements.txt
    

    Edit the .env file in that folder, replacing the placeholder HAIPER_KEY with your real one, then restart ComfyUI. The key loads at import time, so no restart means no luck. Via Manager, search "Haiper" or "ComfyUI-HaiperAI-API" (the README's suggested "ComfyUI-HaiperAI-AP" is missing a letter and finds nothing). Dependencies are trivial - requests plus python-dotenv, and ComfyUI already ships the rest.

    Common issues

    First-run failures are almost always auth: placeholder key, no credits, or the .env edit didn't get a restart. And the temp-directory caveat applies here too - the downloaded JPGs live in /tmp/<random>/, so if you want them to survive, pipe them through VHS_VideoCombine or copy them out before a reboot.

    CategoryHaiperAI

    Inputs (7)

    NameTypeDefaultDescription
    promptSTRINGadd prompt here
    negative_promptoptSTRINGbad, slow
    seedoptINT-1
    aspect_ratiooptSTRING16:9
    resolutionoptINT720
    is_publicoptBOOLEANfalse
    is_enable_prompt_enhanceroptBOOLEANtrue

    Outputs (5)

    NameTypeDescription
    output_image_dir_pathSTRING
    output_image_0_pathSTRING
    output_image_1_pathSTRING
    output_image_2_pathSTRING
    output_image_3_pathSTRING