Nodes/ComfyUI_NYJY/Seedream4Img2Img(NYJY)
ComfyUI Node

Seedream4Img2Img(NYJY)

Feed Seedream 4.0 an image and let it redraw

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

Text-to-image gets you a first draft. Getting from there to something you'd actually use usually means giving the model an image to react to. Seedream4Img2Img is the image-to-image side of the Seedream 4.0 API wrapper in ComfyUI_NYJY: you feed it an image, it sends that image to ByteDance's cloud, and the prompt reshapes what comes back.

It's the img2img sibling of Seedream4Txt2Img in aidenli's pack, and the two share almost everything - same model, same resolution grid, same max_images batch logic. The difference is the input: a reference image goes in, and the output is a re-imagining of it rather than a fresh generation.

How it works. The node converts every image in your batch to base64, sends them along with the prompt to the Ark image endpoint, and decodes the returned images back into a ComfyUI tensor. The default model is doubao-seedream-4-0-250828 (free text - the pack's list also has the newer doubao-seedream-4-5-251128 if you type it). The prompt is the instruction for the transformation: restyle it, change the setting, redo the subject, make it a different medium. This is the node for "take this and make it that" - for precise point-edits like "remove the background", use the pack's Seededit3 instead, which is the dedicated instruction-editing model.

The inputs that matter:

  • images - the input batch, straight from a load or the output of another node.
  • prompt - what changes about the image.
  • ratio_or_size - same eleven options as the txt2img node: aspect presets at 2K (1:1 2048x2048, …) plus 1K / 2K / 4K. Seedream will produce at the size you choose, not necessarily the input's size.
  • override_with / override_height - set both to force exact pixels.
  • max_images - 1–15; how many results to generate per call (sequential generation), which with an input image is effectively "how many variations of this do you want".

The outputs. Image - the result (a batch when max_images > 1). Width and Height from the first returned image.

The gotchas. The same pack-wide failure mode: an API error returns a black 512×512 tensor with the real error in the console, so black output = check the log. The Volcano Engine Ark key is required and non-China sign-up has historically been the wall. And the cost reality of the img2img side: you're paying per generated image and feeding it reference content, so the batch size is your cost dial.

Install. It's part of the pack:

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

(ComfyUI Manager → "Install via Git URL" → https://github.com/aidenli/ComfyUI_NYJY also works.) The dependency that matters is volcengine-python-sdk[ark].

When to reach for it. When a text-only prompt isn't getting you there and you want the reference power of Seedream 4.0 without local GPU load. Pair it with the txt2img node and you've got the full generation-and-iterate loop in one pack.

CategoryNYJY/Volcengine

Inputs (10)

NameTypeDefaultDescription
modelSTRINGdoubao-seedream-4-0-250828
imagesIMAGE
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