generate_with_controlnet
Condition image generation on a ControlNet preprocessed image (pose, depth, canny) plus a text prompt. Upload control image first, then pass filename and prompt.
Instructions
Generate an image conditioned by a ControlNet preprocessed image (pose skeleton, depth, canny, normal, etc.) plus a text prompt. Upload the control image first with upload_image, then pass its filename as control_image. Unspecified params fall back to your defaults; checkpoint and controlnet_model auto-resolve from local models. Returns prompt_id immediately; asset_id arrives in the completion notification.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>",
"control_image": "<control_image>"
},
"name": "generate_with_controlnet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cfg | No | ||
| seed | No | ||
| steps | No | ||
| width | No | ||
| height | No | ||
| prompt | Yes | Positive text prompt | |
| sampler | No | ||
| strength | No | ControlNet conditioning strength (default 1.0) | |
| scheduler | No | ||
| checkpoint | No | Checkpoint filename; auto-selected if omitted | |
| control_image | Yes | Filename of the (already-uploaded) control image in ComfyUI's input dir | |
| negative_prompt | No | ||
| controlnet_model | No | ControlNet model file (in models/controlnet/); auto-selected if omitted |