DSL Best Practices¶
Guidelines for using ComfyKit's Workflow DSL effectively.
Parameter Naming¶
✅ Good: Use descriptive names
❌ Bad: Use single letters
Required Markers¶
Use ! for parameters with no reasonable default:
✅ Good: Prompt is required
❌ Bad: Seed probably has a good default
Upload Markers¶
Always use ~ for image/video/audio parameters:
✅ Good:
Output Variables¶
Use $output.xxx for important outputs:
✅ Good: Named outputs are easy to reference
Display Text¶
Add descriptive text for clarity:
✅ Good:
❌ Bad:
Complete Example¶
{
"5": {
"class_type": "EmptyLatentImage",
"_meta": {
"title": "Canvas, $width!, $height!"
}
},
"6": {
"class_type": "CLIPTextEncode",
"_meta": {
"title": "$positive_prompt.text!"
}
},
"10": {
"class_type": "LoadImage",
"_meta": {
"title": "$~init_image"
}
},
"9": {
"class_type": "SaveImage",
"_meta": {
"title": "$output.final"
}
}
}