zhenzhen-image-gk-v2-segment
GK V2 object segmentation — the node that gives editing something to aim at
- api_config
- image_id
- objects_json
- result_json
- task_id
- response
Comfly_zhenzhen_image_gk_v2_segment_lowprice is a bit of a strange beast until you see what it feeds. It doesn't produce an image at all. You give it the source_task_id of a GK V2 image-generation task, and it runs object segmentation on that image - breaking it into detected objects with bounding boxes and (optionally) masks - and returns an image_id plus machine-readable JSON describing what it found. That image_id is the key: it plugs into the GK V2 region edit node, which is where the actual pixel-changing happens.
Think of it as the pack's own SAM-style step: detect the objects first, then edit a specific one by index, box, or region. It shipped in the August drop alongside its region-edit partner, and it's the piece that makes "change just the chair" possible without hand-drawing a mask.
How it works
Give it a source_task_id (from any GK V2 image node's task_id output), choose include_mask_rle on or off, and it calls the storefront's segment operation, polls, and returns five outputs: image_id, objects_json (the detected objects), result_json (the full result), task_id, and response. The image_id is what you'll wire forward into the region-edit node.
Inputs that matter:
source_task_id- required, and it must be a GK V2 image task. It's markedforceInput, so the node expects a wire, not a typed value.include_mask_rle- off by default. Turn it on if you want run-length-encoded mask data back in the JSON; leave off if you only need object indices, which is what region editing actually uses.
Installing and setting up
Install via ComfyUI Manager (search Comfyui-zhenzhen) or:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-zhenzhen
Restart ComfyUI. No model files. Connect the Comfly Seedance2 Low Price Settings node's api_config, or set SEEDANCE_API_KEY. The pack ships a workflow showing the segment → region-edit chain.
Troubleshooting
Two things bite here. First, the config tripwire is universal in this family - no api_config, "empty api_key." Second, and more specific: source_task_id must come from a GK V2 image node (the task_id output). Feed it a task id from a different model family and the backend either errors or returns nothing usable. The node's own validation flags a missing source_task_id, but it can't catch a wrong-family id. The skip_error toggle is available.
The honest take: this node exists to make region editing smarter, and it's only worth adding to a workflow that needs precise, object-targeted edits at scale. For a one-off "fix that one element," you can skip segmentation and let the region-edit node take boxes directly. But if you're automating edits over many images, object-first beats guesswork every time.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| source_task_id | STRING | — | |
| include_mask_rle | BOOLEAN | false | — |
| api_configopt | ZHENZHEN_SEEDANCE2_CONFIG | — | |
| skip_erroropt | BOOLEAN | false | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image_id | STRING | — |
| objects_json | STRING | — |
| result_json | STRING | — |
| task_id | STRING | — |
| response | STRING | — |