comfyui_create_workflow
Create a ComfyUI workflow from a template (txt2img, img2img, etc.) with optional parameter overrides for prompt, size, steps, and more.
Instructions
Create a ComfyUI workflow from a template with optional parameter overrides.
Available templates: ``txt2img``, ``img2img``, ``upscale``, ``inpaint``,
``txt2vid_animatediff``, ``txt2vid_wan``, ``controlnet_canny``,
``controlnet_depth``, ``controlnet_openpose``, ``ip_adapter``,
``lora_stack``, ``face_restore``, ``flux_txt2img``, ``sdxl_txt2img``.
Args:
template (required): Template name from the list above.
params (optional): JSON string of parameter overrides. Defaults to
an empty string, meaning "use template defaults". Pass either
``""`` or ``"{}"`` for no overrides. Common keys:
``prompt``, ``negative_prompt``, ``width``, ``height``,
``steps``, ``cfg``, ``model``, ``denoise``, ``controlnet_model``,
``control_strength``, ``lora_name``, ``lora_strength``.
Example:
``comfyui_create_workflow(template="txt2img",
params='{"prompt": "a sunset", "width": 768, "steps": 30}')``
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | ||
| template | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||