Zhenzhen Image GK v2 区域编辑
Change one object in a picture, leave the rest exactly alone
- api_config
- image
- image_url
- task_id
- response
This is the payoff node of the GK v2 "segment then edit" pipeline. Zhenzhen_Image_GK_V2_Region_Edit takes the image_id produced by Zhenzhen_Image_GK_V2_Segment, takes your edit instruction, and regenerates only the region you selected - the rest of the picture stays put. It's server-side masked editing, and it answers the exact complaint that kept masks alive in the local world: whole-image instruction editors drift the parts you wanted untouched, while a region edit changes precisely what you point at.
The KB's inpainting essay makes this case cleanly - edit models like Qwen/Kontext take the whole image into context and emit a whole new image, so unmasked regions come back "close but not identical," and the drift compounds across a chain of edits. That's the failure this node is built to avoid, and it's the reason this whole family is structured as segment → region-edit rather than just "describe the edit."
How it works
Three inputs do the work. image_id is the link from the segmentation node. prompt is the edit instruction for the target region. And the pair selection_mode + selection_json decides which region:
object_indices(default) - target objects by their index in the segmentation, e.g.[0]for the first detected object.boxes- target by bounding boxes described in JSON.selection_regions- target by explicit region structures.
The default selection_json is [0], so the quickest way to learn this node is: segment, then edit object zero. The node validates that your JSON parses and matches the mode before it spends any credits, which is a nice touch - bad selections fail cheap.
Inputs and outputs that matter
image_id- required; from the GK v2 segment node'simage_idoutput.prompt- the region edit instruction.selection_mode-object_indices,boxes, orselection_regions.selection_json- JSON list matching the mode; default[0].
Outputs: image (a real ComfyUI IMAGE this time), image_url, 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
Mostly by the chain. This node cannot run on its own - no image_id, no job, and the strict validation will say so. If you land here from a search, know the full flow is: generate with a GK v2 image node → take its task_id into the segment node → take that node's image_id into here. Second, the pack's changelog mentions the segment/region path supports 30-way image concurrency for batch work - but for a first run, don't. One segment, one region, confirm the selection_json matches the mode you picked (a boxes selection against object_indices will fail validation). And the usual hosted-model rule: the edit happens on their server, your images are already there from the generation step, and moderation applies to the prompt regardless.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image_id | STRING | image_id returned by the GK v2 segment node. | GK v2 分割节点返回的 image_id。 | |
| prompt | STRING | Region editing instruction. | 区域编辑指令。 | |
| selection_mode | COMBO | object_indices | How the target region is described. | 目标区域描述方式。 |
| selection_json | STRING | [0] | JSON list matching the selected mode. | 与选择方式匹配的 JSON 数组。 |
| api_configopt | SEEDANCE_CONFIG | Connect Seedance API Config; otherwise SEEDANCE_API_KEY is used. | |
| skip_erroropt | BOOLEAN | false | On failure return a placeholder image instead of stopping. | 失败时输出占位图片而不中断工作流。 |
| seedopt | INT | 00–18446744073709550000 | ComfyUI 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 (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| image_url | STRING | — |
| task_id | STRING | — |
| response | STRING | — |