comfy_generate
Generate images, videos, or upscales via curated ComfyUI workflows. Submit a prompt and operation, get reproducible outputs.
Instructions
Generate image, video, or upscale via a curated ComfyUI workflow.
RATIONALE
Consolidated portmanteau: all generation modes share the same ComfyUI workflow submission and result polling pipeline. The operation discriminator selects the workflow type.
Return Format
{"success": bool, "prompt_id": str, "outputs": [...], "seed": int, "message": str}
Examples
comfy_generate(operation="image", workflow_id="flux-klein-t2i",
prompt="a cat surfing on a pizza slice", seed=42)
comfy_generate(operation="upscale", workflow_id="esrgan-upscale",
prompt="", image_input="<base64>")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": {
"operation": "<operation>",
"workflow_id": "<workflow_id>",
"prompt": "<prompt>"
},
"name": "comfy_generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Random seed for reproducibility. Omit for random. | |
| size | No | Image size as WxH (e.g. '1024x1024'). | |
| prompt | Yes | Text prompt for generation. | |
| operation | Yes | Generation type. | |
| image_input | No | Base64 image for i2v/inpaint/edit. | |
| workflow_id | Yes | Workflow ID from comfy_workflows/list. | |
| negative_prompt | No | Negative prompt. | |
| auto_install_nodes | No | Install missing custom nodes via ComfyUI-Manager. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||