Skip to content
Automation
Command

/viz

Visualize a ComfyUI workflow as a mermaid diagram

From plugin
comfyui-mcp
92611 skills4 agents11 commands1 MCP
> /plugin marketplace add artokun/comfyui-mcp
> /plugin install comfy@comfyui-mcp

Command definition

viz.md
description: Visualize a ComfyUI workflow as a mermaid diagram
argument-hint: Path to workflow JSON file, or paste JSON inline

/comfy-viz — Visualize a Workflow

The user wants to visualize a ComfyUI workflow as a mermaid flowchart diagram.

Instructions

1. **Get the workflow JSON.** The argument may be: $ARGUMENTS

  • A file path to a workflow JSON file; read it with the Read tool
  • Inline JSON pasted directly as the argument
  • Nothing, in which case ask the user to provide a workflow file path or paste the JSON

2. **Validate the input.** The workflow must be in ComfyUI's API format, an object where keys are node IDs and values have `class_type` and `inputs`. If it looks like the web UI format (has `nodes` and `links` arrays), tell the user it needs to be in API format and suggest they export it via "Save (API Format)" in ComfyUI.

3. **Visualize.** Use the `visualize_workflow` tool with:

  • `workflow`: the parsed workflow JSON
  • `show_values`: `true` (to include parameter values in node labels)
  • `direction`: `"LR"` (left-to-right, easiest to read)

4. **Present the diagram.** Show the mermaid output to the user. The mermaid code block will render as a flowchart showing nodes grouped by category with labeled connections.

Example

User: `/comfy-viz ~/workflows/my-workflow.json`

Steps:

  • Read the file at `~/workflows/my-workflow.json`
  • Pass contents to `visualize_workflow`
  • Display the mermaid diagram

Notes

  • If the workflow is very large (50+ nodes), suggest using `direction: "TB"` (top-to-bottom) for better readability
  • The diagram groups nodes into subgraphs by category: loading, conditioning, sampling, image, output
  • Connection edges are labeled with data types (MODEL, CLIP, CONDITIONING, LATENT, IMAGE, VAE, etc.)
Read more
@artokun
Ships withcomfyui-mcp

<img src="docs/images/demo-poster.jpg" width="760" alt="The Agent panel driving ComfyUI end to end. Click to watch the demo"> The Agent panel driving ComfyUI end to end. It reads what is installed locally, wires the graph, frees VRAM, and runs the render.

92642 skills4 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
926
Star history of artokun/comfyui-mcp on GitHub, a chart by star-history.com

Other commands on comfyui-mcp.

More commands from other plugins.

plan

plan

Command

Plan n8n Linear ticket implementation

n8n2w209k
@n8n-io@n8n-ioInstall Command
setup

setup

Command

One-time setup after installing ARIS as a Claude Code plugin — registers the Codex reviewer MCP server from the plugin directory…

aris2w18k
@wanshuiyin@wanshuiyinInstall Command
agent
Auto-invoked

agent

Command

name: sc:agent description: SC Agent — session controller that orchestrates investigation, implementation, and review category:…

@galaxy-dawn@galaxy-dawnInstall Command