create_workflow
Create a ComfyUI API-format workflow from templates like txt2img, img2img, or upscale. Returns JSON locally without side effects; unspecified parameters use template defaults.
Instructions
Create a ready-to-run ComfyUI API-format workflow from a built-in template (txt2img, img2img, upscale, inpaint, controlnet, ip_adapter). Pure local generation — does not contact ComfyUI and has no side effects. Returns the complete workflow JSON; pass it to validate_workflow or enqueue_workflow. Unsupplied params fall back to template defaults, so the result may reference checkpoints/models that must exist on your ComfyUI server before it will execute.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template | Yes | Template name: txt2img, img2img, upscale, or inpaint | |
| params | No | Template parameters; recognized keys depend on the template. txt2img: checkpoint, positive_prompt, negative_prompt, width, height, steps, cfg, seed, sampler_name, scheduler. img2img/inpaint add image_path (and mask_path for inpaint) and denoise. upscale adds upscale_model. Unknown keys are ignored; omitted keys use template defaults. |