# ComfyUI-Copilot

> An assistant inside ComfyUI that builds, debugs and rewrites your generation graphs

- Category: Multimodal Generation / Image Generation
- Language: TypeScript
- Licence: MIT
- Repository: https://github.com/ATH-MaaS/ComfyUI-Copilot
- Canonical page: https://ai-tldr.dev/tools/comfyui-copilot/

## In short

ComfyUI-Copilot is an AIGC assistant that installs into ComfyUI as a custom node, built by Alibaba International Digital Commerce. It sits in the Image Generation category of the Multimodal Generation tools and is open-source, written in TypeScript and licensed MIT. To get started: clone into ComfyUI's custom_nodes directory.

## Overview

ComfyUI-Copilot is an AIGC assistant that installs into ComfyUI as a custom node, built by Alibaba International Digital Commerce. ComfyUI's node graph is powerful but tedious to assemble by hand, and most of the friction is in three places: getting a first working graph, understanding why a graph errors, and finding good parameter values. Copilot targets all three from a chat panel inside the ComfyUI interface itself, so you never leave the canvas you are working on.

Version 2.0 reframed the tool from a helper into what the project calls a workflow development coworker, covering the whole lifecycle — generation, debugging, rewriting and parameter tuning. Ask for a workflow in plain language and it returns several candidates: high-quality graphs from its library plus one generated for your request, importable to the canvas in a click. Click Debug on a canvas and it analyses errors, pinpoints bad parameters and broken connections, suggests repairs, and prompts you to download any model it identifies as missing. Describe what you disliked about a result and it will rewrite the graph — adjusting parameters, adding nodes and reworking the logic. The agent is aware of your local ComfyUI environment, so its suggestions reflect what you actually have installed.

Parameter tuning gets its own tool: set ranges for the parameters you care about and it batch-executes the combinations, then lays the outputs out as a visual comparison so you can pick the best configuration by eye. The project is MIT-licensed and carries an ACL 2025 demo paper. Note one operational detail from the maintainers: the hosted API service behind node-information queries, job recommendations and workflow generation has been suspended, so you now supply your own API key and base URL on the Settings page; the agent capabilities are unaffected.

## What it does

- Generate a first-draft workflow from a text description, returning library graphs plus an AI-generated one, each importable to the canvas in one click
- One-click debug that analyses canvas errors, identifies bad parameters and broken connections, and offers repair suggestions
- Missing-model detection with a prompt to download, plus a keyword-search model downloader
- Workflow rewriting — describe what you want changed and it adjusts parameters, adds nodes and reworks the graph's logic
- Parameter tuning by batch execution over ranges you set, with visual side-by-side comparison of the results
- Environment-aware agent that takes your local ComfyUI installation into account when proposing solutions

## Getting started

Copilot is a ComfyUI custom node. Install it into `custom_nodes`, install its Python dependencies, then activate it from the ComfyUI panel and point it at a model. The maintainers recommend the git install over ComfyUI Manager, which they note is more error-prone.

1. Clone into ComfyUI's custom_nodes directory

   Install it alongside your other ComfyUI extensions.

```bash
cd ComfyUI/custom_nodes
git clone https://github.com/AIDC-AI/ComfyUI-Copilot
```

2. Install its dependencies

   Run pip against the extension's requirements file.

```bash
cd ComfyUI/custom_nodes/ComfyUI-Copilot
pip install -r requirements.txt
```

3. On Windows, use the embedded Python

   Portable ComfyUI builds ship their own interpreter — install into that one rather than a system Python.

```bash
python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-Copilot\requirements.txt
```

4. Activate and configure a model

   Start ComfyUI and click the Copilot activation button on the left of the panel to launch its service. Then open settings and configure the chat model and the workflow-generation model separately — you supply your own API key and base URL (OpenAI-compatible endpoints and LM Studio both work). Keep the extension updated with `git pull` or the Manager's Update button to pick up new features.

## When to use it

- Get a working first-draft ComfyUI graph for an unfamiliar task instead of assembling nodes from scratch
- Diagnose a red, failing canvas without reading the console — including finding which model you are missing
- Iterate on a result you were not happy with by describing the change rather than rewiring nodes by hand
- Find good sampler, step or CFG values by sweeping ranges and comparing the outputs side by side
