Nodes/ComfyUI Seedance/Zhenzhen Image GK v2 智能分割
ComfyUI Node

Zhenzhen Image GK v2 智能分割

Split a generated image into objects server-side, no local SAM needed

By T8mars·Created 2 months ago·Updated 3 days ago· 31
Zhenzhen Image GK v2 智能分割
  • api_config
  • image_id
  • objects_json
  • result_json
  • task_id
  • response
source_task_id
include_mask_rlefalse
skip_errorfalse
seed0

Zhenzhen_Image_GK_V2_Segment is the odd one out in T8mars/ComfyUI_Seedance: it doesn't generate anything. It takes a completed GK v2 image-generation task and asks the server to segment it - split the picture into its objects, give each one an ID, and hand back structured JSON. It's a processing node, the middle step of the pack's segment → region-edit pipeline, and it's the kind of thing you'd otherwise need a local SAM/BiRefNet or an ADetailer-style detector stack to do. Here it happens in the cloud on the same task that made the image.

The mechanism is worth spelling out because it changes how you wire the workflow. Because segmentation runs on the server side against the generation task, this node doesn't take an image - it takes a source_task_id, which you get from the task_id output of a completed single-image GK v2 generation node (e.g. Zhenzhen_Image_GK_V2). You can't feed it an arbitrary local image; it segments what the API already generated. That's the "walled garden" nature of this family: image, segment, and region-edit are all hosted operations on one task chain.

How it works

Connect source_task_id and set include_mask_rle if you want mask RLE data in the result (default off). The node submits a segment operation, polls it to completion, and returns:

  • image_id - the ID that feeds Zhenzhen_Image_GK_V2_Region_Edit.
  • objects_json - the detected objects as pretty-printed JSON.
  • result_json - the full segmentation result.
  • task_id / response - the operation's own task ID and raw response.

This node is not an output node - it has no OUTPUT_NODE = True in the class - which in practice means you're expected to pass its outputs forward to the region-edit node rather than treat it as a terminal. The whole design is "segment now, edit later."

Inputs and outputs that matter

  • source_task_id - required, from a completed single-image generation task.
  • include_mask_rle - include mask RLE data in the result, default off.

Outputs: image_id, objects_json, result_json, task_id, response.

Install

One node in T8mars/ComfyUI_Seedance:

# ComfyUI Manager: search "ComfyUI Seedance", or:
comfy node install seedance

Or clone https://github.com/T8mars/ComfyUI_Seedance.git into ComfyUI/custom_nodes, pip install -r requirements.txt, restart, and configure a key from api.seedance.nz/console via the Seedance API Config node or SEEDANCE_API_KEY.

Where people get burned

The source_task_id requirement is where everyone stumbles: there's no IMAGE input, so you can't just load a picture and segment it. If you try, the node's strict validation rejects it - it must be a task ID from this pack's GK v2 generation. Also remember skip_error here returns empty structured outputs on failure rather than a placeholder image, because there is no image. And keep the privacy frame in mind: your generated image is already on their server (that's where it was made), so segmentation adds no new exposure - but it also means the whole segment/edit chain is stuck inside the reseller's ecosystem. If you want to segment arbitrary local images, the local SAM/BiRefNet stack remains the open alternative.

CategorySeedance/Image Tools

Inputs (5)

NameTypeDefaultDescription
source_task_idSTRINGTask ID from a completed single-image generation. | 已完成单图生成任务的 task_id。
include_mask_rleBOOLEANfalseInclude mask RLE data in the segmentation result. | 在分割结果中包含掩码 RLE。
api_configoptSEEDANCE_CONFIGConnect Seedance API Config; otherwise SEEDANCE_API_KEY is used.
skip_erroroptBOOLEANfalseReturn empty structured outputs instead of stopping. | 失败时返回空结构而不中断工作流。
seedoptINT00–18446744073709550000ComfyUI cache seed. Fixed reuses the cached result while all other inputs stay unchanged; randomize/increment/decrement starts a new execution. This value is not sent to models without documented seed support. | ComfyUI 缓存种子;Fixed 在其他输入不变时复用缓存,随机、递增或递减会触发新任务。未声明支持 seed 的模型不会收到此参数。

Outputs (5)

NameTypeDescription
image_idSTRING
objects_jsonSTRING
result_jsonSTRING
task_idSTRING
responseSTRING