Nodes/ComfyUI-DeepGen-API/Generate Image (from Text)
ComfyUI Node

Generate Image (from Text)

Nano Banana and friends as ComfyUI nodes, no GPU required

By deepiksdev·Created 8 months ago·Updated 6 months ago· 0
Generate Image (from Text)
    • IMAGE
    • output_prefix_and_model
    • total_credits_used
    model
    prompt
    seed_value1000
    nb_results1
    output_prefix
    config_json
    minimum_resolution1K
    aspect_ratio1:1
    output_formatpng

    This is the flagship node of the DeepGen pack and the one that tells you what the whole pack is about. DeepGen_T2I0 is a text-to-image node that doesn't run a single weight locally. You type a prompt, pick a model, and the generation happens in the cloud at deepgen.app; the finished image drops back into your graph as a normal IMAGE tensor, ready to feed an upscaler or a save node. It's the same "API wrapper" pattern ComfyUI's own Partner Nodes use - just via a third-party gateway instead of a Comfy account.

    Why reach for it? Two reasons, and they're the standard ones for this whole category. First, most of the models in the dropdown are closed: Nano Banana Pro (Gemini 3 Pro Image), Nano Banana 2, GPT Image 1.5, Grok Imagine Image, Seedream 5.0, Wan 2.6, Hunyuan Image 3.0. You cannot download those weights, so a hosted call is the only way to get them inside a ComfyUI workflow. Second, the whole thing runs on someone else's GPU - if your card is weak or absent, you still get frontier-model output. At the cheap end there's even FLUX.1 [schnell], the open-weights model that DeepGen hosts for a per-call fee, which is the same "pay a little instead of paying for electricity" trade the KB's API-node essay describes.

    How it works

    The node reads your prompt, seed, resolution and format, then POSTs them to {base_url}/{model}/api with a Bearer key from your config. Images come back as URLs, get downloaded, and are stacked into a batch tensor. Nothing here is complicated, which is the point - the node is an HTTP client with good manners.

    The inputs that matter

    • model - a dropdown filtered to models that actually support text-to-image. Don't bother memorizing it; the list is generated from the pack's models.csv at startup, so a freshly-updated pack has the current roster.
    • prompt - your text. Multiline, and for the closed models a plain-English description beats comma-tag soup. These are instruction-tuned, not Danbooru-tuned.
    • nb_results (1–10, default 1) - how many images to generate. Each extra one is a separate billable call, so don't crank it on a whim.
    • minimum_resolution (500 / 1K / 2K / 4K, default 1K) and aspect_ratio (14 presets, default 1:1) - the pack maps these onto whatever that model actually supports, picking the closest pixel size from its capabilities. That's why a preset model's dropdown has its own limits.
    • seed_value (default 1000), output_prefix - a string prepended to the returned model alias, handy for downstream filename organization.
    • config_json - the power-user escape hatch. It's merged into the API request as extra JSON, so you can pass parameters the node doesn't expose directly (things like num_inference_steps, which the pack maps to the API's steps). Leave it empty unless you know what you're doing.
    • output_format - png / jpeg / webp.

    The outputs

    • IMAGE - a batch tensor of your results. Wire it into a preview or SaveImage. This is the whole point; from here the graph is ordinary ComfyUI.
    • output_prefix_and_model (STRING) - the model alias (with your prefix), for naming or logging.
    • total_credits_used (FLOAT) - feed this into the pack's DeepGen_F2T0 display node to see what a run cost.

    Install and the one thing you must do first

    Same pack, same steps as every DeepGen node:

    cd ComfyUI/custom_nodes
    git clone https://github.com/deepiksdev/ComfyUI-DeepGen-API.git
    cd ComfyUI-DeepGen-API
    pip install -r requirements.txt
    

    Restart, then get a DeepGen API key at deepgen.app and paste it into ComfyUI Settings → "DeepGen API Key". It's saved to ComfyUI/user/deepgen/config.json. No key, and the node dies with "DeepGen API Key not found" before anything happens.

    Where people get burned

    The 401/403 family of errors means the key is wrong, expired, or missing - that's the first thing to check. And remember the metering: every generation spends credits, and a nb_results of 10 is a very short path to an empty balance. Watch total_credits_used, and note that your prompts leave your machine - that's inherent to the node, not a bug. If you need a local, offline, uncensored alternative, the KB's LLM-and-local-model essays cover that road; this node is the cloud road, and it's great at it.

    CategoryDeepGen/Generators

    Inputs (9)

    NameTypeDefaultDescription
    modelCOMBO10 options: FLUX.1 [schnell] (flux_schnell), Grok Imagine Image Pro (grok-imagine-image-pro), Hunyuan Image 3.0 Edit (hunyuan-image-v3-edit), Grok Imagine Image (grok-imagine-image), Wan 2.6 (wan-2.6), FLUX.2 [max] Edit (flux-2_max), +4
    promptSTRING
    seed_valueINT1000
    nb_resultsINT11–10
    output_prefixSTRING
    config_jsonSTRING
    minimum_resolutionoptCOMBO1K4 options: 500, 1K, 2K, 4K
    aspect_ratiooptCOMBO1:114 options: 1:1, 9:16, 16:9, 3:4, 4:3, 3:2, +8
    output_formatoptCOMBOpng3 options: png, jpeg, webp

    Outputs (3)

    NameTypeDescription
    IMAGEIMAGE
    output_prefix_and_modelSTRING
    total_credits_usedFLOAT