Nodes/ComfyUI-Ideogram-Autoprompter/Ideogram 4 Autoprompter
ComfyUI Node

Ideogram 4 Autoprompter

Let a vision LLM build them

By collbroGTR·Created 3 months ago·Updated 3 months ago· 39
Ideogram 4 Autoprompter
    • prompt
    • preview
    width1024
    height1024
    high_level_description
    background
    style
    aesthetics
    lighting
    medium
    style_palette_data
    elements_data
    ai_state

    Ideogram 4 is the model where a plain English prompt isn't the point. It was trained on structured JSON captions - high_level_description, a compositional_deconstruction with typed elements, bounding boxes as [y_min, x_min, y_max, x_max], color palettes, per-box text. Feed it prose and it works, badly; the boxes are what get you the layout control nobody else's open weights really offer. That is also the catch: authoring that JSON by hand is a miserable way to spend an afternoon, and it's the exact job this node exists to automate.

    Ideogram 4 Autoprompter (one node, category Ideogram/text) is a "competing community builder" in the same niche as Kijai's KJNodes prompt builder: you describe an idea and optionally drop in a reference image, click Generate, and a vision LLM writes the whole caption for you - background, elements with bounding boxes, descriptions, any in-image text, and color palettes. Then it lays everything out on a black-and-white canvas where you can drag, resize, retype, and recolor boxes before anything ever reaches the sampler.

    How it works

    Generation doesn't happen in your graph. The node's UI talks to a backend over ComfyUI's PromptServer when you click Generate; the Python side runs a vision LLM, parses its output into the caption schema, and fills the node's fields. When you actually queue the workflow, the node's execute does nothing clever - it just reassembles the caption JSON from the serialized inputs you've already got and hands it back, plus a rendered layout preview.

    You get two engines. Local (default) uses huihui-ai/Huihui-Qwen3-VL-4B-Instruct-abliterated, downloaded automatically on first generate via transformers - the abliterated Qwen3-VL family is a known pick for uncensored prompt generation in the community. The model unloads after each generation by default so it isn't squatting on VRAM while Ideogram 4 renders. Gemini takes a free API key, lets you fetch and pick a model, and keeps the key in memory only - it is never written into the workflow. Worth knowing: on a CPU-only box the local engine runs float32 and it's glacial, so this is a "have a real GPU" feature unless you're on the Gemini path.

    The inputs that matter

    Most of what you'll actually touch is the canvas and the two text boxes, not the schema. The ones to know:

    • background - the required scene description. Everything else left blank is simply omitted from the caption.
    • width / height - canvas aspect, and the pixel grid your bounding boxes are measured against. Default 1024×1024; keep it matching what you'll actually render or your hand-drawn boxes land in the wrong place.
    • style - a dynamic combo of none, photo, or art_style; pick photo if you want the descriptor fields (aesthetics, lighting, medium) emitted in the style_description.

    The rest - style_palette_data, elements_data, ai_state - are serialized state the node UI manages for you; you don't edit them by hand. Outputs are prompt (the caption JSON string, which wires into wherever your Ideogram 4 workflow expects its caption - the same slot a prompt builder would feed the text encoder) and preview (an IMAGE of the layout, handy for a look before you commit).

    Install

    The straightforward way is ComfyUI Manager - search Ideogram Autoprompter and restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/collbroGTR/comfyui-ideogram-autoprompter
    

    then install its requirements into your ComfyUI Python environment:

    pip install -r requirements.txt
    

    That's pillow, requests, transformers>=4.57.0, accelerate, and huggingface_hub - transformers is the heavyweight, and it's genuinely required. Torch comes from ComfyUI. If you want the 4-bit local-model toggle, you also need pip install bitsandbytes (CUDA only); skip it and the node just loads the model in full precision, no harm done.

    Where people get burned

    Three things catch everyone. First, generation is a UI-time action: you have to click Generate before you queue, or you'll render with whatever stale caption is in the node. Second, the first Generate downloads a multi-gigabyte Qwen3-VL checkpoint, so budget a few minutes and a working Hugging Face connection; subsequent runs are fast, but because the model unloads after each generation, every new Generate pays a reload cost. Third, the Gemini key is session-only by design - reopening a workflow means re-pasting it. That's a privacy win, but it's also a workflow-sharing trap: someone who loads your saved graph gets an empty key field, not your API key.

    If it all works, this is the fastest path from "I want this composition" to the exact [y_min, x_min, y_max, x_max] boxes Ideogram 4 actually respects - and the canvas is forgiving enough that you can hand-tune whatever the LLM hallucinated before it ever touches the model.

    CategoryIdeogram/text

    Inputs (11)

    NameTypeDefaultDescription
    widthINT102464–16384Canvas aspect width (also the pixel grid the bbox is measured in).
    heightINT102464–16384Canvas aspect height (also the pixel grid the bbox is measured in).
    high_level_descriptionSTRINGOptional one-line overview of the whole image (blank = omitted).
    backgroundSTRINGRequired scene background description.
    styleCOMBO3 options: [object Object], [object Object], [object Object]
    aestheticsSTRINGStyle descriptor (blank = omitted).
    lightingSTRINGStyle descriptor (blank = omitted).
    mediumSTRINGStyle descriptor (blank = omitted).
    style_palette_dataSTRINGSerialized style color palette from the editor (managed by the node UI).
    elements_dataSTRINGSerialized regions from the editor (managed by the node UI).
    ai_stateSTRINGSerialized autoprompter UI state (managed by the node UI; never the API key).

    Outputs (2)

    NameTypeDescription
    promptSTRING
    previewIMAGE