ComfyUI Workflow Basic Concepts and How to Use
What is a Workflow?
A workflow is the core concept in ComfyUI, simply put, it’s a graphical interface composed of multiple connected nodes that describes the entire AI image generation process. Like building with Lego blocks, we combine nodes with different functions to achieve various AI image generation effects.
Basic Components of a Workflow
A typical workflow usually consists of the following parts:
- Nodes: Each node represents a specific function, such as loading models, generating images, etc.
- Connections: The lines connecting nodes, indicating the flow of data
- Input/Output Ports: The small dots on nodes, purple indicates input, orange indicates output
How to Create a Workflow
-
Adding Nodes:
- Right-click on the canvas to bring up the node menu
- Type keywords in the search box to find needed nodes
- Click to select the needed node, and it will appear on the canvas
-
Connecting Nodes:
- Drag from an output port of one node to an input port of another node
- Ensure the port types match (same colors)
- Incorrect connections will show red indicators
Workflow Import and Export
Exporting Workflows
- Export as JSON File:
- Click the “Save” button in the top right corner
- Choose save location, file will be saved in .json format
- Sharing Workflows:
- Select the nodes you want to share
- Right-click and select “Copy”
- You can directly share the copied text with others
Importing Workflows
-
Import JSON File:
- Directly drag and drop .json file onto the ComfyUI interface
- Or click the “Load” button in the top right to select file
-
Import from Clipboard:
- Copy workflow text shared by others
- Press Ctrl+V (Command+V for Mac users) in ComfyUI interface to paste
Common Workflow Error States
Useful Tips
-
Node Organization:
- Hold space bar to pan the canvas
- Use mouse wheel to zoom canvas
- Select multiple nodes to move them together
-
Quick Operations:
- Hold Alt while dragging nodes to quickly duplicate
- Double-click nodes to quickly modify parameters
- Press Delete key to remove selected nodes
-
Save Common Templates:
- Save frequently used workflows as templates
- Import when needed to avoid rebuilding
Common Problem Solutions
-
Node Connection Errors:
- Check if node types match
- Ensure all necessary input nodes are connected
- Review error message information
-
Workflow Won’t Run:
- Check if all required models are loaded
- Verify parameter settings are correct
- Check console error logs
Tips
- Start learning with simple workflows
- Reference workflows shared by others to learn
- Experiment with different node combinations
- Remember to save your workflows frequently