Nodes/ComfyUI_NYJY/VolcengineTxt2Img(NYJY)
ComfyUI Node

VolcengineTxt2Img(NYJY)

The generic Seedream text-to-image node (and its near-identical twin)

By aidenli·Created 2 years ago·Updated 4 months ago· 146
VolcengineTxt2Img(NYJY)
    • Image
    • Width
    • Height
    modeldoubao-seedream-4-0-250828
    prompt
    ratio_or_size1:1 2048x2048
    override_with0
    override_height0
    max_images1
    api_key
    watermarkfalse
    seed0

    Here's a confusing moment you'll hit the first time you open this pack's Volcengine menu: there are two nodes that look identical - VolcengineTxt2Img and Seedream4Txt2Img. The reason is more interesting than a copy-paste mistake: in the source, Seedream4Txt2Img is literally a subclass of VolcengineTxt2Img with a different display name. Same schema, same code, same API call. Pick whichever your muscle memory prefers; they're the same node wearing two labels.

    Both belong to ComfyUI_NYJY (aidenli's pack), and both are thin clients for ByteDance's Seedream image generation over the Volcano Engine Ark API. If you've read the Seedream 4.0 article in this pack, you already know everything this node does - this page is about why it exists and how the pack is put together.

    What it does. Prompt goes in, image comes out. The default model is doubao-seedream-4-0-250828 (Seedream 4.0), with ratio_or_size giving you the 2K aspect presets plus 1K/2K/4K, override_with/override_height for exact pixels, and max_images (1–15) for sequential batch generation. Optional api_key, watermark, and seed complete the list. Outputs are Image, Width, Height - the standard trio across the pack's generation nodes.

    The architecture behind it. All the cloud nodes in this pack sit on an AIModelBridge: a shared factory that knows which platform (Volcengine, Bailian, StepFun) a node belongs to and loads that platform's config - API key from config.json and the base URL (https://ark.cn-beijing.volces.com/api/v3 for Volcengine). The generation nodes then funnel through one images.generate call on the Ark SDK, with behavior switching on the model ID. So when the pack added Seedream 4.0, the cleanest move was to subclass the generic node rather than fork the code - which is why your node menu shows both names doing the same thing.

    The inputs that matter. Just the generation-relevant three: prompt (your text-to-image prompt), ratio_or_size (aspect or resolution bucket), and max_images (how many to generate per call). The model field is free text, so it'll also accept the newer doubao-seedream-4-5-251128 from the pack's model list.

    The gotchas. Shared with the whole Volcengine family: API errors return a black 512×512 tensor with the real error printed to the console, and you need a Volcano Engine Ark API key - historically the non-China sign-up has been the real friction point. Also note this is pay-per-image cloud generation; max_images is effectively a spend control.

    Install. Comes with the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aidenli/ComfyUI_NYJY
    pip install -r requirements.txt
    

    or ComfyUI Manager → "Install via Git URL" → https://github.com/aidenli/ComfyUI_NYJY. Dependency that matters: volcengine-python-sdk[ark].

    When to reach for it. Whenever you'd reach for Seedream4Txt2Img - the only real difference is which name shows up in your search. If you're importing a workflow built by someone who used the generic name, now you know they're interchangeable.

    CategoryNYJY/Volcengine

    Inputs (9)

    NameTypeDefaultDescription
    modelSTRINGdoubao-seedream-4-0-250828
    promptSTRING
    ratio_or_sizeCOMBO1:1 2048x204811 options: 1:1 2048x2048, 2:3 1664x2496, 3:4 1728x2304, 9:16 1440x2560, 3:2 2496x1664, 4:3 2304x1728, +5
    override_withINT0
    override_heightINT0
    max_imagesINT11–15
    api_keyoptSTRING
    watermarkoptBOOLEANfalse
    seedoptINT00–2147483647

    Outputs (3)

    NameTypeDescription
    ImageIMAGE
    WidthINT
    HeightINT