Getting Started with Comfy Custom Workflows
This guide explains the small naming contract that turns a ComfyUI workflow into a clear SQUAD Studio bot. It does not teach ComfyUI or maintain instructions for installing nodes, models, or servers. Build and test the graph in ComfyUI first, then use these names to tell SQUAD Studio what a creator may control.
Working with a coding agent? Give it ComfyUI setup for coding agents for exact node titles, input bindings and a checklist to verify the imported workflow.
Try a simple example
Want to try a simple recipe on your canvas? Download the SDXL starter workflow, then follow the Quick Start to connect it to ComfyUI and make your first picture. Its input and output labels are already filled in, so you can explore your own prompt right away.
The four markers
Put a marker in the title of the node that receives or supplies the value.
| Marker | Meaning |
|---|---|
$IN$ |
Expose the connected value and use its Comfy input name. |
$IN name$ |
Expose the connected value with a creator-friendly name. |
$OUT$ |
Return the connected image using its Comfy input name. |
$OUT name$ |
Return the connected image with a specific name. |
Names are case-insensitive. $IN Prompt$, $IN prompt$, and $IN PROMPT$ mean the same thing. Use one spelling consistently because that is what creators will see.
Every workflow needs at least one image $OUT$. Use a SaveImage node for the result: preview-only images are temporary and are not returned to SQUAD Studio. Inputs are optional. A depth-map or upscaling workflow, for example, may not need a text prompt.
Names with special behavior
Use these names only when the workflow needs the related value.
| Name | What SQUAD Studio does |
|---|---|
prompt |
Uses the main prompt area. |
negative |
Shows the larger negative-prompt area. |
width |
Supplies the bot frame width without showing a technical control. |
height |
Supplies the bot frame height without showing a technical control. |
seed |
Shows a simple variation control. It chooses a new variation for each run unless the creator keeps the current one. |
batch_count |
Supplies 1 to each Comfy job because the prompt modal already creates and arranges the requested variations. |
width and height may connect to stock or custom nodes. SQUAD Studio follows the marked connection and uses the type declared by the selected Comfy endpoint.
Use $IN batch_count$ when the graph has its own batch-size value. SQUAD Studio runs each requested variation as a separate job so retries, progress, and canvas placement stay independent. Supplying 1 prevents a four-image prompt-modal batch from accidentally becoming four jobs of four images.
Any other name becomes an ordinary creator control. The name does not set its range or behavior. For example, calling a value CFG does not make SQUAD Studio invent CFG limits.
How SQUAD Studio chooses the control
SQUAD Studio reads the selected endpoint's Comfy node schema and renders the control the graph declares.
| Comfy value | Creator control |
|---|---|
Single-line STRING |
Text field |
Multiline STRING |
Larger text area |
INT or FLOAT with minimum and maximum |
Slider with the same bounds and step |
INT or FLOAT without a complete range |
Number field using any bounds and step Comfy supplies |
| Choice list | Select menu |
BOOLEAN |
Toggle |
IMAGE or MASK |
Named @ reference |
Internal graph values such as MODEL, CLIP, VAE, LATENT, and CONDITIONING are not creator controls. If a marker resolves to one of them, SQUAD Studio stops and names the marker that needs different wiring.
This also works with custom nodes when the selected Comfy endpoint reports a usable input schema. SQUAD Studio does not guess from the marker name or current value.
Named image and mask inputs
Give each visual input a short, useful name:
$IN subject$
$IN pose$
$IN helmet_mask$
A creator can then use @subject, @pose, or @helmet_mask. Matching is case-insensitive, so @Helmet_Mask reaches $IN helmet_mask$.
For an API-format graph, a named LoadImage or LoadImageMask exposes its image file as a reference. A mask loader can keep its channel setting, such as red, without turning that setting into another required input.
For several source images, expose one named IMAGE or MASK input for each role the graph expects. This keeps the order understandable: @subject always reaches the subject input and @pose always reaches the pose input. SQUAD Studio does not combine several references into an unmarked image batch.
For names containing spaces, creators use underscores in the prompt. A marker named $IN hero pose$ is reached as @hero_pose. Short snake-case names are usually easiest to explain.
Audio and video inputs are not supported on the canvas. A marked audio, video, or internal custom-node type fails readiness and names the node that needs different wiring.
Check before publishing
- Export the workflow as API-format JSON from ComfyUI.
- Open Bot Squads, choose the file, give the bot a name, and choose Import Workflow.
- Open Overview and run Comfy readiness.
- Fix any marker, missing node, unsupported type, or missing output it names.
- Choose Validate Using Comfy to let the selected endpoint inspect the finished graph.
- Keep Workflow is active on when you want its card on the canvas. Save if you changed that setting.
API-format JSON is the most reliable choice for custom workflows. If you import a regular graph export, SQUAD Studio uses your endpoint's node definitions to translate its saved settings. If a custom editor control cannot be matched safely, export the workflow again with Save (API Format) in ComfyUI.
Importing saves the workflow's first published version. Later edits in RAW Editor stay in a draft until you choose Publish. Run both checks before publishing those changes, so creators receive a recipe you have verified.
Comfy validation confirms that the graph is accepted for execution. Run the bot once on a test canvas and check the returned image before sharing it with your team. For an inpaint workflow, also check that the area outside your mask stays unchanged.
Model filenames must match the selected endpoint, including any subfolders. If Comfy rejects a filename and reports the same file in another folder, SQUAD Studio shows those exact paths so you can update the workflow. It does not move or download models for you.
Changing the endpoint can change which custom nodes and input schemas are available. Readiness checks the currently selected endpoint so the controls creators see match the machine that will run the workflow.
For connecting an endpoint, see Comfy endpoints. For managing and publishing the finished bot card, see Workflows and bot squads.