build_workflow
Builds a runnable ComfyUI workflow from a template and parameters, returning JSON ready to execute or save.
Instructions
Build a ComfyUI workflow from a template and parameters. Returns workflow JSON ready to execute or save. For txt2img_flux, call get_system_resources first and use only when flux_ready is true (FLUX needs ~12GB+ VRAM).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | Optional: width, height, steps, cfg, prompt, negative_prompt, seed, ckpt_name, filename_prefix, batch_size, denoise; for txt2img_flux: clip_l, t5xxl, guidance | |
| template | Yes | Template id (e.g. txt2img, txt2img_flux). Use list_templates to see available. |