create_workflow
Generate a ComfyUI workflow JSON from a built-in template (txt2img, img2img, upscale, inpaint) locally. Pass the result to validate_workflow or enqueue_workflow for execution.
Instructions
Create a ready-to-run ComfyUI API-format workflow from a built-in template (txt2img, img2img, upscale, inpaint, controlnet, ip_adapter, ace_step_15, stable_audio_3, remove_background, ltx_video). 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 |
|---|---|---|---|
| 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. | |
| template | Yes | Template name: txt2img, img2img, upscale, or inpaint |