# Comfy CLI Source: https://docs.comfy.org/agent-tools/cli Drive Comfy from the terminal: local ComfyUI, partner generate calls, and full workflows on Comfy Cloud. Complements MCP for scripts, CI, and automation. [comfy-cli](https://github.com/Comfy-Org/comfy-cli) is Comfy's command-line tool. Alongside [MCP servers](/agent-tools), it gives agents and developers another way to drive Comfy from outside the UI. Use it for **terminal or script access**: batch jobs, CI pipelines, workflow automation, and pairing with coding agents via bundled CLI skills. **Quick reference for agents.** This page is a shortened overview: enough to get oriented alongside MCP and run common `comfy generate` calls. For the **complete CLI documentation** (local install, `comfy setup`, `comfy run`, templates, workflow editing, node/model discovery, and more), see [Comfy CLI getting started](/comfy-cli/getting-started). **`comfy generate` is in beta.** Flag names, model aliases, and output formats may change. The underlying partner endpoints are stable. File feedback on the [comfy-cli GitHub repo](https://github.com/Comfy-Org/comfy-cli/issues). ## How it fits with MCP | | Comfy MCP (cloud) | Comfy CLI | | - | - | - | | **Interface** | Chat with an MCP client (Claude Code, Claude Desktop, …) | Terminal commands and scripts | | **Best for** | Interactive agent workflows in chat | Automation, batch runs, CI, shell pipelines | | **Auth** | OAuth in MCP clients, or API key (headless) | `comfy cloud login` (OAuth) or API key (CI) | | **Output** | Returned in the chat session | Saved to disk (`--download`) or JSON (`--json`) | For MCP setup, installation, tool lists, and auth methods, see [Comfy MCP](/agent-tools/mcp). ## What the CLI does 1. **Local ComfyUI** — install, launch, update, and manage custom nodes 2. **Partner generation** — `comfy generate` for one-shot image/video/audio/3D partner API calls 3. **Cloud workflows** — `comfy run`, templates, slot editing, and job watching on Comfy Cloud **Two surfaces, one CLI.** Every command auto-detects where to run. If you are signed in to Comfy Cloud, commands route to **cloud**; otherwise they run against your **local** server. Override per call with `--where local|cloud`, the `COMFY_WHERE` env var, or persist it with `comfy set-default --where cloud`. ## Install and set up ```bash pip theme={null} pip install comfy-cli ``` ```bash homebrew theme={null} brew tap Comfy-Org/comfy-cli brew install comfy-org/comfy-cli/comfy-cli ``` To get shell completion hints: ```bash theme={null} comfy --install-completion ``` ```bash theme={null} comfy setup ``` Pass `-y` for non-interactive installs in CI or scripts. See [Comfy CLI getting started](/comfy-cli/getting-started#quick-setup-recommended) for the full `comfy setup` flag table. Sign in to Comfy Cloud: ```bash theme={null} comfy cloud login comfy cloud whoami ``` ## Prerequisites for `comfy generate` * An active Comfy Cloud session via `comfy cloud login` (browser OAuth), **or** a [Comfy API key](/development/api-development/getting-an-api-key) (`--api-key` / `COMFY_API_KEY`) for headless or CI use * [Credits](/interface/credits) on your account * *Optional:* [Browse partner nodes and per-call pricing](/tutorials/partner-nodes/pricing) ## Your first generation ```bash theme={null} comfy generate flux-pro \ --prompt "a cat on the moon, cinematic lighting" \ --width 1024 --height 1024 \ --download cat.png ``` The CLI uploads local files, submits the job, polls for completion, and saves results. ## Available models `comfy generate` covers image and video partner models. Discover what is available in your CLI version: ```bash theme={null} comfy generate list # all models comfy generate list --category text-to-video # filter by category comfy generate list --partner kling # filter by partner comfy generate schema flux-kontext # params for one model ``` Common aliases include: | Category | Examples | | - | - | | **Image** | `flux-pro`, `flux-ultra`, `flux-kontext`, `nano-banana`, `grok`, `grok-edit`, `ideogram-edit`, `dalle`, `recraft`, `stability` | | **Video** | `seedance`, `kling`, `luma`, `runway`, `pika`, `vidu`, `hailuo`, `moonvalley`, `grok-video` | Run `comfy generate list` for the full set in your environment. ## Usage examples ### Text-to-image ```bash theme={null} comfy generate nano-banana \ --prompt "a watercolor of a sleeping fox" \ --download fox.png ``` ### Image edit (reference image) Pass local file paths. The CLI uploads via Comfy's storage endpoint or base64-encodes as needed: ```bash theme={null} comfy generate nano-banana \ --prompt "add a top hat" \ --image ./cat.png \ --download edited.png comfy generate flux-kontext \ --prompt "add a top hat and a monocle" \ --input_image ./photo.jpg \ --download out.png comfy generate ideogram-edit \ --image cat.png --mask mask.png \ --prompt "add sunglasses" \ --rendering_speed TURBO \ --download edited.png ``` To upload once and reuse across calls: ```bash theme={null} comfy generate upload ./photo.jpg # prints a signed URL ``` Uploaded reference assets auto-delete after **24 hours**. They are stored in Comfy-managed GCS with signed URLs. For long-running pipelines, re-upload before each job. See the [reference](/comfy-cli/reference) for details. ### Text-to-video Video jobs are async. The CLI blocks and polls by default: ```bash theme={null} comfy generate seedance \ --prompt "a hummingbird hovering over a flower" \ --resolution 1080p --duration 5 \ --download hummingbird.mp4 comfy generate kling \ --prompt "a paper boat drifting on a river at dusk" \ --duration 5 \ --download boat.mp4 ``` Return immediately with `--async`, then resume later: ```bash theme={null} comfy generate luma --prompt "neon koi swimming through clouds" --aspect_ratio 16:9 --async # prints a job id; resume with: comfy generate resume luma --download out.mp4 ``` ### Scripting with JSON ```bash theme={null} comfy generate dalle --prompt "a watercolor whale" --json | jq '.data[0].url' ``` ## Beyond `comfy generate` Everything above is the agent-focused summary. The full guide walks through each command in depth: * `comfy run`, `comfy jobs`, and `comfy validate` for full workflows * `comfy templates` and `comfy workflow` slot editing * `comfy nodes` / `comfy models` discovery * `--json` envelopes and `comfy --json discover` for agents → [Comfy CLI getting started](/comfy-cli/getting-started) (complete documentation) ## Agent skills Install the bundled Comfy agent skills into Claude Code, Cursor, and any AGENTS.md-aware tool, so your coding agent can drive the CLI directly: ```bash theme={null} comfy skills install comfy skills list # comfy, comfy-fragments, comfy-debug, comfy-relay, comfy-director comfy skills status # what's installed where ``` These are **bundled CLI skills** installed by `comfy skills install`. They are separate from the [Comfy Skills](https://github.com/Comfy-Org/comfy-skills/) repository, which hosts the **comfy-cloud** Claude Code plugin for [Comfy Cloud MCP](/agent-tools/mcp). ## Related resources | Resource | What it's for | | - | - | | [Comfy CLI getting started](/comfy-cli/getting-started) | **Complete** install guide and command walkthrough | | [Comfy CLI reference](/comfy-cli/reference) | Commands, flags, and model aliases | | [Comfy MCP](/agent-tools/mcp) | Connect agents via MCP for chat-driven generation | | [comfy-cli on GitHub](https://github.com/Comfy-Org/comfy-cli) | Source repo, issues, and latest behavior | ## Feedback * **GitHub**: [comfy-cli issues](https://github.com/Comfy-Org/comfy-cli/issues) * **Discord**: [#comfy-mcp-and-cli](https://discord.gg/xWJn6nhE3R) # Comfy Agent Source: https://docs.comfy.org/agent-tools/in-app-agent Use Comfy Agent to understand, build, edit, and run ComfyUI workflows. It is generally available in Comfy Cloud. Local support for Comfy Desktop is coming soon. **Comfy Agent is generally available in Comfy Cloud**. Agent inside Comfy Desktop on local is coming soon. [Join the waitlist](https://links.comfy.org/agentalpha) to get notified. Describe what you want right inside ComfyUI. It plans, builds, and runs workflows. Editing the canvas while you work, it crafts side by side with you. ## What it can do * Find templates, models, and nodes available in your ComfyUI environment. * Build a workflow from a template and customize its prompts and settings. * Change part of the current workflow without rebuilding the rest. * Add, connect, configure, and remove nodes. * Validate a workflow before running it. * Inspect images and read video or audio properties. * Run workflows and return their outputs. * Keep working on the canvas while the Agent responds — you don't have to wait for it to finish, and it works from what you currently have open. * Create a skill in plain language, or ask the Agent to use one of Comfy's public skills instead of only your own. See [Agent skills](/agent-tools/in-app-agent-skills). * Open more than one chat at once. Each chat is its own session with its own history and context. ## Where you can use it | Where you use Comfy Agent | What to expect | | - | - | | **Comfy Cloud** | Generally available. The Agent, workflows, and assets use your Comfy Cloud account. There is no local package to install. | | **Comfy Desktop** | **Coming soon.** [Join the waitlist](https://links.comfy.org/agentalpha) to get notified when Comfy Agent is available for local ComfyUI, including your own models and custom nodes. | Either way, Agent requests use Comfy services over the network. See [Data and privacy](/agent-tools/in-app-agent-data-privacy). Comfy Agent is separate from [Comfy MCP](/agent-tools/mcp) and [Comfy CLI](/agent-tools/cli). MCP connects an external AI client to Comfy. The CLI is for terminal and script workflows. Comfy Agent works in the ComfyUI interface. To make your first image, follow [Get started with Comfy Agent](/agent-tools/in-app-agent-installation#make-your-first-image). ## What it costs Free initial tokens are now available for everyone to try several Comfy Agent chats. After that, Comfy Agent charges from the same Comfy Credits pool you already use for generations. You need a positive balance in Comfy Credits to keep running the Agent, but you don't necessarily need a subscription plan. See the [subscription and top-up plans](https://www.comfy.org/cloud/pricing?utm_source=docs\&utm_campaign=agent) for plan details. ### Pricing per token | Model | Input credits / 1K | 5m Cache Write credits / 1K | 1h Cache Write credits / 1K | Cache Hit credits / 1K | Output credits / 1K | | :- | -: | -: | -: | -: | :- | | Opus 4.8 | 1.055 | 1.319 | 2.110 | 0.106 | 5.275 | ## Coming soon on local Once Comfy Agent reaches Comfy Desktop, it will work with your own GPU, models, and custom nodes, and walk you through setup. It will also go beyond what's on Cloud today: building custom editing tools directly on the canvas for you, such as a one-off masking or compositing tool you didn't have to install. Get notified when Comfy Agent is available for Comfy Desktop. ## Choose which workflow to edit Use the workflow selector in the Agent panel to choose the workflow to edit, then send your message. Switching to another tab while the Agent is responding does not redirect its edits. The Agent cannot create or switch tabs itself. To work elsewhere, open the other workflow, choose it in the Agent panel, and send a new message. The Agent can read another open or saved workflow for comparison without loading it into the current tab. For example: > Compare this workflow with my portrait workflow and use the same sampler settings here. ## Build and edit workflows For a new workflow, open a blank workflow tab and choose it in the Agent panel. The Agent searches for a matching template before building from individual nodes. A template includes a connected graph and an output node. For changes to an existing workflow, name the part you want changed and what should stay the same: * “Change the prompt to a watercolor landscape. Keep the model and sampler settings.” * “Add an upscaling stage after image generation.” * “Switch this workflow to Flux using models installed here.” The Agent builds in real time on the canvas while you keep editing the canvas. ## Validate before running The Agent checks node connections, model names, required values, and output nodes before a run. It separates workflow errors from inputs that only you can provide. If the workflow is valid but still needs an image, video, or other input, attach the file and ask the Agent to continue. ## Work with media The Agent can inspect the visible contents and dimensions of a still image. For video, it can read the duration, dimensions, frame rate, and format. For audio, it can read the duration, format, and audio tracks. Use **Attach a file** in the message box to add an image or file. You can also drag media into the conversation. | Add to the conversation | Ask | Result | | - | - | - | | An image | “Describe the lighting in this image.” | A description you can use to refine your prompt. | | A video | “Trim this to the first five seconds.” | A shortened video file. | | Two video clips | “Join clip A followed by clip B.” | One video containing both clips in that order. | | A video and an audio file | “Add this audio to the video.” | A video with the supplied audio. | Media editing requires the media tools to be available in your installation. In Cloud, edited files are saved to your asset library. The Agent returns a preview or file link in the conversation. ## Run permissions Choose a run permission next to the message box: * **Ask** requests approval before each workflow run. * **Auto** runs workflows without asking for each run. Select **Save changes** to apply your choice. In Ask mode, select **Run** in the approval message to start the workflow, or **Cancel** to decline that run. Ask and Auto control workflow runs. The Agent can edit the selected workflow in either mode. ## What the Agent can use Normally in a chat session, the Agent uses your message, selected workflow, selected nodes, attachments, and workflow errors. It can also read another workflow when you ask it to compare or reuse settings. Besides, the agent also has access to the saved workflows, available models and available nodes in the current workspace, as well as public template workflows and public/private skills, which will all be used when needed. For Cloud and local data flow, chat history, and privacy controls, see [Comfy Agent data and privacy](/agent-tools/in-app-agent-data-privacy). ## Stop or cancel Select **Stop** in the message box to stop the Agent's current response. Workflow execution has separate controls in the [run and queue area](/interface/overview); use those to manage a workflow that has already been submitted. ## Next steps Build, run, and revise an image workflow. Create and use reusable Agent instructions. ## Feedback Comfy Agent is currently in beta. We are actively developing new features and fixing issues. Tell us what works and what doesn't and it is the best way to help us prioritize the right things to build. * Feedback: [https://links.comfy.org/agentfeedback](https://links.comfy.org/agentfeedback) * Discord: join our [server](https://discord.com/invite/comfyorg) and find us in #comfy-agent channel Report bugs or share impressions. # Comfy Agent Data and Privacy Source: https://docs.comfy.org/agent-tools/in-app-agent-data-privacy Understand what Comfy Agent uses to answer a request and how local and Cloud use differ. ## The short version Comfy Agent uses your message, selected workflow, selected nodes, and attachments. When you work with a local ComfyUI installation, chat history is stored on that machine. Your message and the information needed to answer it are sent through Comfy's online service. ## What the Agent uses | Data | How it helps | | - | - | | Your message | Tells the Agent what you want to do. | | Selected workflow and nodes | Show which workflow and nodes you want explained or changed. | | Image attachment | Lets the Agent inspect the image and use it in a workflow. | | Video or audio attachment | Lets the Agent read media properties and extract or convert content. | | Workflow and execution errors | Help the Agent explain and fix a failed workflow. | | Personal skill | Supplies reusable instructions. | The [Privacy Policy](https://www.comfy.org/privacy-policy?utm_source=docs) and [Terms of Service](https://www.comfy.org/terms-of-service?utm_source=docs) govern your use of Comfy. ## Cloud and local data flow | Where you use Comfy Agent | What happens | | - | - | | **Comfy Cloud** | Comfy Cloud stores conversations, workflows, and assets. Your messages are processed by Comfy's online service, and workflows run on Cloud GPUs. | | **Local ComfyUI in Desktop** | The local installation stores chat history, workflows, and files. Your messages and relevant workflow information are processed by Comfy's online service. Local workflow nodes run on your hardware; partner nodes use their online providers. | ## Chat history and sync Conversations with the Cloud Agent are stored with Comfy Cloud. Conversations with the local Agent are stored on the machine running ComfyUI. The two histories do not sync. This depends on whether you are using Cloud or a local installation, not which application window you open it in. ## Skills and guidance Personal skills contain instructions you create for the Agent. They are saved to your account and used when your request matches them or you name them. Built-in Agent guidance and skills for external coding agents are separate from your personal Agent skills. ## Retention and deletion For retention details, see the [Privacy Policy](https://www.comfy.org/privacy-policy?utm_source=docs) and [Data Retention](/support/data-retention). For account or data-deletion requests, contact [support@comfy.org](mailto:support@comfy.org). # Get Started with Comfy Agent Source: https://docs.comfy.org/agent-tools/in-app-agent-installation Open Comfy Agent in Comfy Cloud or Comfy Desktop. ## Choose your setup You need a Comfy account. * **Comfy Cloud:** Comfy Agent is generally available. [Sign in to Cloud](https://cloud.comfy.org) — no local installation and no waitlist needed. * **Comfy Desktop:** Comfy Agent for local ComfyUI is coming soon. [Join the waitlist](https://links.comfy.org/agentalpha) to get notified. ## Make your first image ### Open the Agent Open a blank workflow, then select **Ask Comfy Agent** in the workflow bar. Read and accept the consent notice if prompted. Use **Choose a workflow** in the Agent panel to select the blank workflow. ### Build a workflow Send this message: > Build a text-to-image workflow for a red sneaker on a neutral gray background. Use an available model and include a Save Image node. Check the workflow for errors, but don't run it yet. The Agent builds the workflow on the canvas, fills in the prompt and model settings, and checks the node connections and required inputs. You should see a connected workflow ending in a **Save Image** node. If the Agent reports a missing model or file, supply it or ask for an alternative available in your installation. Ask it to check the workflow again before continuing. ### Generate the image Open **Run permissions** next to the message box, choose **Ask**, and select **Save changes** if you changed the setting. Send “Run this workflow.” When the Agent asks for approval, select **Run**. Select **Cancel** instead if you do not want to start that run. When generation finishes, the Agent returns the output in the conversation. The image also appears in the **Save Image** node. Right-click the image there to save it to your computer. ### Make a change Send “Change the background to white and keep the model and other settings.” The Agent updates the existing workflow. Ask it to run again to compare the result. ## Troubleshooting ### The Agent button is missing Sign in to your Comfy account. In Comfy Desktop, [update the application](/installation/update_comfyui) and restart it. If the button is still missing, check your account's Agent access with [support](/support/contact-support). ### The Agent cannot edit the workflow I expected Choose the intended workflow in the Agent panel, then send your message again. See [Choose which workflow to edit](/agent-tools/in-app-agent#choose-which-workflow-to-edit). ### The Agent asks for an input Select **Attach a file** or drag the requested file into the message box, then ask the Agent to continue. ### I cannot find a local conversation in Cloud Local and Cloud history are separate. See [Data and privacy](/agent-tools/in-app-agent-data-privacy#chat-history-and-sync). ## Next steps Change prompts, models, or processing steps. Remember instructions for future requests. See [Data and privacy](/agent-tools/in-app-agent-data-privacy) to learn where messages, files, and conversations are stored. # Comfy Agent Skills Source: https://docs.comfy.org/agent-tools/in-app-agent-skills Use personal and public skills to give Comfy Agent reusable instructions for your work. ## What is a personal skill? A personal skill is a reusable set of instructions for Comfy Agent. It includes a name, a one-line description of when to use it, and the instructions themselves. Use personal skills to repeat instructions such as “make square images,” “use a white background,” or “check node connections before running.” Personal skills are saved to your account. The Agent loads a skill when its description matches your request or when you ask for it by name. ## Create a skill in chat Tell the Agent what to save, what to call it, and when it should be used: > Save this as a skill called product-shot: When I ask for a product image, use a square 1024 × 1024 canvas, a neutral gray background, and a Save Image node. Validate the workflow before running it. The Agent saves the skill for future messages. A new or updated skill takes effect with your next message. ## Use a skill Ask for a skill by name: > Use my product-shot skill to create a studio photo workflow for a red sneaker. The Agent can also select a skill automatically when your request matches its description. ## Update or delete a skill Use the same skill name to replace its instructions: > Update my product-shot skill to use a white background and a 1536 × 1536 canvas. Delete a skill by name: > Delete my product-shot skill. ## Save an existing skill file Paste the contents of your `SKILL.md` file into chat and ask the Agent to save it as a personal skill. The Agent reads its name and description from the header at the top of the file. The saved skill is available from your next message. ## Use a public skill Public skills are shared skills anyone can use, not just the ones you created. Ask for a public skill by name or describe what you want to do, and the Agent uses it the same way it uses one of your own: > Use the product-shot public skill for a red sneaker on a neutral gray background. ## Built-in guidance and coding-agent skills Comfy Agent includes guidance for building workflows and choosing models. Personal and public skills add instructions for repeated tasks on top of that guidance. [Skills for coding agents](/agent-tools/skills) are installed separately in tools such as Claude Code. Installing one there does not add it to Comfy Agent. Keep API keys, passwords, and access tokens out of skill instructions. For data handling, see [Data and privacy](/agent-tools/in-app-agent-data-privacy#skills-and-guidance). # Agent Tools Source: https://docs.comfy.org/agent-tools/index Use ComfyUI with AI agents through Comfy MCP, Comfy CLI, and Comfy Agent. Connect any AI agent to ComfyUI, on Comfy Cloud or on your own machine. **Start here.** Built-in ComfyUI assistant for building, editing, and running workflows. **Generally available on Cloud.** Local (Comfy Desktop) coming soon. ComfyUI in the terminal. Install and update ComfyUI, manage models and nodes, and generate from scripts, CI, or batch jobs. *** ## Which one should I use? | | Comfy MCP
Cloud Connection | Comfy MCP
Local Connection | Comfy Agent | | - | - | - | - | | **What is it** | Run Comfy Cloud workflows with your own agent. | Drive your own local ComfyUI with your own agent. | Chat with an Agent inside ComfyUI to understand, build, edit, and run a selected workflow. | | **Best for** | Beginners who don't want to set up ComfyUI locally.
People who want to share workflows. | People who have ComfyUI locally.
People who have private custom nodes.
People who need to interact with the local file system. | Building and editing workflows while viewing the canvas. | | **Requires** | Your own agent.
An active Comfy Cloud subscription. | Your own agent.
A local ComfyUI setup. | A Comfy account. No waitlist on Cloud; Comfy Desktop is coming soon. | | **GPU** | Cloud GPUs (no hardware requirements) | Your local GPU | Cloud GPUs today. Local hardware once Comfy Desktop support ships. | | **Models** | Comfy Cloud models.
You can import your own models. | Local models downloaded to your machine. | Cloud models today. Local models once Comfy Desktop support ships. | | **Custom nodes** | The custom nodes supported on Comfy Cloud. | You can install any custom node. | Cloud-supported nodes today. Any local node once Comfy Desktop support ships. | Both MCP columns are the **same product and the same page**. See [Comfy MCP](/agent-tools/mcp) to pick one. You can connect both at once. *** ## What is MCP? The **Model Context Protocol (MCP)** is an open standard that allows AI assistants to interact with external tools and services through a standardized interface. Instead of an AI agent needing to know custom API formats for every service, MCP provides a uniform way to expose tools. When you connect an MCP server to Claude Desktop, Claude Code, Cursor, or Amp, the AI assistant can: * **Generate images** from text descriptions * **Create videos** from text or images * **Generate 3D models** from text or images * **Generate audio and music** using AI models * **Search models and templates** to find the right tools for your task ...all through natural language conversation, without writing API calls manually. # Comfy MCP: Connect AI Agents to ComfyUI Source: https://docs.comfy.org/agent-tools/mcp Connect AI agents to ComfyUI over the Model Context Protocol. Generate images, video, audio, and 3D, and run real workflows on Comfy Cloud or your own machine. ## Overview **Comfy MCP** connects AI agents to ComfyUI over the [Model Context Protocol](https://modelcontextprotocol.io). Once connected, you can generate images, video, audio and 3D, search models, nodes and templates, and run real ComfyUI workflows from a chat with your agent. It comes with two connections: a **Comfy Cloud** connection and a **local ComfyUI** connection, with the local one fully open source. **Stuck on anything below? The best way is to hand this page to your agent and ask for help.** ### Which connection do I want? **For new users, we recommend starting with the cloud connection** — it is the simplest setup. If you use claude.ai, ChatGPT, or the Claude Desktop chat app, the cloud connection is also the more compatible choice. **If you already run ComfyUI locally or in your own deployed environment, or you work mostly in a coding agent** like Claude Code, Cursor, or Codex, start with the **local** connection. **For Mac users, if you plan to run open-source models, we recommend the cloud connection.** Today's open-weight models — the local versions of MiniMax H3, LTX-2.3, and similar — are large, and will not run at a workable speed on the Apple GPU. Running both at once is normal, and most clients host two MCP servers happily. They sign in to the same Comfy account, but **separately** — one sign-in does not cover the other. ## Comfy Cloud MCP Connection The hosted connection, linking your agent to your **Comfy Cloud** account. Nothing to install, and workflows run on Comfy Cloud GPUs. To learn more about Comfy Cloud, see [Comfy Cloud](/get_started/cloud). ### Set up the cloud connection You need a [Comfy Cloud](https://cloud.comfy.org) account before connecting. [Sign up](https://cloud.comfy.org) if you do not have one yet; new users get **5 free runs** to try it out. OAuth sign-in during setup uses your Comfy account. Comfy Cloud MCP runs at: ``` https://cloud.comfy.org/mcp ``` Pick your client: Claude Desktop adds Comfy Cloud as a **custom connector** through its UI, then runs the OAuth sign-in. Install the **comfy-cloud** plugin. It adds the MCP connection and slash commands in one step. The plugin is published through the [Comfy Skills](https://github.com/Comfy-Org/comfy-skills/) repository, which hosts Claude Code plugins and community agent skills for Comfy. Register the Comfy Skills marketplace (one-time): ``` /plugin marketplace add Comfy-Org/comfy-skills ``` ``` /plugin install comfy-cloud@comfy-skills ``` Run `/mcp`, select **comfy-cloud** → **Authenticate**. Your browser opens to sign in, and tokens refresh automatically. The plugin adds these slash commands: | Command | What it does | | - | - | | `/comfy-cloud:generate-image` | Generate, edit, or modify an image | | `/comfy-cloud:generate-video` | Generate, edit, or extend a video | | `/comfy-cloud:generate-audio` | Generate audio, music, or sound effects | | `/comfy-cloud:generate-3d` | Generate a 3D model from text or an image | | `/comfy-cloud:remove-background` | Remove the background from an image | | `/comfy-cloud:upscale-image` | Upscale an image to higher resolution | | `/comfy-cloud:search-templates` | Find pre-built workflow templates on [comfy.org](https://comfy.org) | | `/comfy-cloud:search-models` | Search for available models | | `/comfy-cloud:search-nodes` | Search for nodes and get wiring suggestions | | `/comfy-cloud:help` | See what you can do with ComfyUI Cloud | Add the server directly: ```bash theme={null} claude mcp add --transport http comfy-cloud https://cloud.comfy.org/mcp ``` Then run `/mcp`, select **comfy-cloud** → **Authenticate**. Add `-s user` to make it available in all your projects. This path still exposes the same workflows as MCP prompts: `/mcp__comfy-cloud__generate-image`, `/mcp__comfy-cloud__search-models`, and so on (the `/mcp____` prefix uses the name you passed to `claude mcp add`). The plugin above is recommended because it wraps these as the friendlier `/comfy-cloud:*` commands. Cursor connects to remote MCP servers over HTTP. Cursor does **not** support MCP OAuth today. Add Comfy Cloud with a Comfy Cloud API key in your MCP config. Click the **Settings** gear in the top-right corner (labeled **1**). Cursor — open Settings 1. In the sidebar, click **Tools & MCPs** (labeled **2**). 2. Click **+ New MCP Server** (labeled **3**) → **Add a Custom MCP Server**. Cursor — Tools & MCPs Edit `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project). Set the server URL and pass your Comfy Cloud API key in the `X-API-Key` header. Create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) (starts with `comfyui-`): ```json theme={null} { "mcpServers": { "comfy-cloud": { "url": "https://cloud.comfy.org/mcp", "headers": { "X-API-Key": "${env:COMFY_API_KEY}" } } } } ``` Set `COMFY_API_KEY` in your shell or system environment. Prefer `${env:COMFY_API_KEY}` over hardcoding the key in a file you might commit to Git. Cursor — mcp.json with API key Ask in plain language ("generate an image of a cat astronaut", "find a Wan 2.2 video template"). Cursor invokes the MCP tools on your behalf. [Codex](https://developers.openai.com/codex/cli) connects to Comfy Cloud over Streamable HTTP. Add the server in Settings, then sign in with OAuth. Install the **Comfy Cloud** skill from [ClawHub](https://clawhub.ai/comfy-org/skills/comfy). It connects OpenClaw to the hosted MCP server (`cloud.comfy.org/mcp`). Cloud only: it does not drive a local ComfyUI install. ```bash theme={null} openclaw skills install @comfy-org/comfy ``` Skill page: [clawhub.ai/comfy-org/skills/comfy](https://clawhub.ai/comfy-org/skills/comfy). Register the MCP server and sign in with your Comfy account: ```bash theme={null} openclaw mcp set comfy '{"url":"https://cloud.comfy.org/mcp","transport":"streamable-http","auth":"oauth"}' openclaw mcp login comfy openclaw gateway restart ``` `openclaw mcp login` prints an authorization URL. Open it, sign in, and finish the flow as the CLI directs (it may ask you to rerun with a `--code` value). Verify with `openclaw mcp status --verbose`. When `auth: "oauth"` is set, OpenClaw ignores static `headers` on that server entry. Do not combine OAuth with a hardcoded API key header. Ask in plain language ("generate an image of a cat astronaut", "find a Wan 2.2 video template"). OpenClaw invokes the MCP tools on your behalf. Create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) (starts with `comfyui-`), export it, then register the server: ```bash theme={null} export COMFY_API_KEY="comfyui-..." openclaw mcp set comfy '{"url":"https://cloud.comfy.org/mcp","transport":"streamable-http","headers":{"Authorization":"Bearer ${COMFY_API_KEY}"}}' openclaw gateway restart ``` Prefer `Authorization: Bearer` over a custom `X-API-Key` header for OpenClaw. Some OpenClaw builds drop custom headers on streamable-http transports; Bearer survives proxies more reliably. Put `COMFY_API_KEY` in your shell profile or OpenClaw env. Do not commit the key. Any MCP client that supports **remote HTTP** transport can connect to Comfy Cloud. The server URL is always `https://cloud.comfy.org/mcp`. Add a remote MCP entry pointing at `https://cloud.comfy.org/mcp`. Most clients use a JSON config with a `url` field: ```json theme={null} { "mcpServers": { "comfy-cloud": { "url": "https://cloud.comfy.org/mcp" } } } ``` **Windsurf** uses `serverUrl` instead of `url`. **Amp** uses the same `mcpServers` shape in **Settings → MCP Servers** or `~/.config/amp/settings.json`. If your client supports MCP OAuth, sign in through the browser when prompted. Otherwise, add an API key header (see below). Restart your client. You should see Comfy Cloud tools (`search_templates`, `submit_workflow`, `get_output`, and others) registered under the **comfy-cloud** server. **Headless / CI (API key):** when OAuth is not available, create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) and pass it as the `X-API-Key` header: ```json theme={null} { "mcpServers": { "comfy-cloud": { "url": "https://cloud.comfy.org/mcp", "headers": { "X-API-Key": "comfyui-…" } } } } ``` For Claude Code from the terminal: ```bash theme={null} claude mcp add --transport http comfy-cloud https://cloud.comfy.org/mcp -H "X-API-Key: comfyui-…" ``` Prefer `${env:COMFY_API_KEY}` or your client's secret interpolation instead of hardcoding keys in config files you commit to Git. ### What your agent can do You do not call MCP tools yourself. Your agent picks the right tool based on what you ask for. Slash commands and prompts (below) are shortcuts that steer the agent toward common tasks, but plain language works too ("generate an image of a cat astronaut", "upscale this photo", "find a Wan 2.2 video template"). Typical flow: 1. **Discover** what is available (`search_templates`, `search_models`, `search_nodes`, or `cql` for graph-style questions). 2. **Run** a generation: `run_template` for a matching pre-built template, `submit_workflow` for a custom workflow (with `upload_file` when an input image is needed), or `partner_generate` for partner models like Flux, Grok, Gemini, OpenAI, Ideogram, and Seedance. 3. **Wait and retrieve** outputs (`wait_for_job`, then `get_output` returns a download command your agent runs in your shell). The server prefers matching [pre-built templates](https://comfy.org/workflows) before building a workflow from scratch, which tends to produce better results faster. ### Cloud MCP tools These are the tools your agent has access to once connected. Names match what appears in MCP client logs and debugging output. **Discovery** | Tool | Description | | - | - | | `search_templates` | Search pre-built workflow templates from [comfy.org](https://comfy.org/workflows) by text, tag, media type, or model | | `get_template` | Fetch a template's full workflow JSON for inspection or hand-editing | | `get_template_schema` | See which of a template's parameters can be overridden at run time | | `search_models` | Search the model catalog by text, type, base model, or source | | `search_nodes` | Search available nodes by text, category, or input/output types. Also surfaces **subgraph blueprints** (pre-wired node groups like Text to Image or Remove Background) | | `get_node` | Get the complete input spec for specific nodes, including full option lists | | `cql` | Run a [CQL](https://github.com/Comfy-Org/cql) graph query for structural questions (for example, which nodes produce images, or paths between node types). Use `search_nodes` when you need full input specs for a specific node | | `get_prompting_guide` | Prompt style and recommended settings (steps, cfg, sampler, resolution) per model family | **Generation** | Tool | Description | | - | - | | `run_template` | Run a pre-built template by name, with optional parameter overrides — the preferred path when a template matches | | `submit_workflow` | Submit a ComfyUI API-format workflow for execution on Comfy Cloud | | `partner_generate` | Generate with partner-API models (Flux/BFL, Grok, Gemini, OpenAI, Ideogram, Seedream/Seedance, and more) | | `upload_file` | Upload an input image or file for use in workflows (for example, with LoadImage) | | `apply_slots` | Apply parameter overrides to a workflow's interior values and return the modified workflow | **Jobs and batches** | Tool | Description | | - | - | | `get_job_status` | Poll execution status of a submitted workflow | | `wait_for_job` | Wait until a job finishes instead of polling repeatedly | | `get_output` | Retrieve output images, videos, or audio from a completed workflow | | `use_previous_output` | Chain workflows by reusing output from one run as input to another | | `cancel_job` | Cancel a pending or running job | | `get_queue` | Check how many jobs are running and pending | | `submit_batch`, `get_batch_status`, `get_batch_output`, `wait_for_batch` | Submit many generations in one call and collect them together later — the batch ID stays valid across sessions | **Saved workflows** | Tool | Description | | - | - | | `list_saved_workflows` | Browse your saved workflows from Comfy Cloud | | `get_saved_workflow` | Inspect a saved workflow's nodes, inputs, and customizable settings | | `save_workflow` | Save a workflow to your Comfy Cloud account | | `update_workflow` | Update an existing workflow in place as a new version (earlier versions stay recoverable) | | `run_saved_workflow` | Run a saved workflow by filename — the server converts it from editor format to executable format automatically | **Sharing workflows** | Tool | Description | | - | - | | `share_workflow` | Publish a saved workflow and return a `?share=` URL anyone can open | | `import_shared_workflow` | Resolve a share URL or bare share ID into workflow JSON, optionally saving it to your account | **Hub URL share IDs:** the trailing hyphen-delimited hex token in a `comfy.org/workflows/-` hub URL is the share ID. For example, `comfy.org/workflows/topaz-starlight-upscale-1c77e82713b7` has share ID `1c77e82713b7`. Pass that token to `import_shared_workflow` as `share_id`. The `share_url` parameter only accepts `?share=` query URLs like `https://cloud.comfy.org/?share=...`, not hub page URLs. **Apps and links** | Tool | Description | | - | - | | `create_app` | Turn a saved workflow into an App Mode app — a simplified "run this workflow" view with chosen inputs and outputs | | `get_app_mode_url` | Get the stable link that opens a workflow as a runnable app | | `get_workflow_canvas_url` | Get a link that opens a workflow directly on the Comfy Cloud canvas, ready to view, edit, or run | **Account and session** | Tool | Description | | - | - | | `get_billing_status` | Check your credit balance, subscription tier, and billing link | | `get_server_info` | Confirm which server the agent reached: environment, host, version, and auth state | | `submit_feedback` | Get the feedback survey link | | `report_session_summary` | Share an anonymized session summary with the Comfy team — **only with your explicit consent**; the agent must ask first, and no prompts, file paths, or personal information are included | **Prompts (Claude Desktop)** Claude Desktop does not support Claude Code slash commands. Instead, open the **prompt picker** for the same workflows: | Prompt | Description | | - | - | | `generate-image` | Generate an image from a text description | | `generate-video` | Generate a video from text or an image | | `generate-audio` | Generate audio, music, or sound effects | | `generate-3d` | Generate a 3D model from text or an image | | `upscale-image` | Upscale an image to higher resolution | | `remove-background` | Remove the background from an image | | `search-templates` | Find pre-built workflow templates | | `search-models` | Search for models (checkpoints, LoRAs, VAEs) | | `search-nodes` | Search nodes and get wiring suggestions | | `help` | See what you can do with ComfyUI Cloud | You can also skip prompts and ask in plain language. The MCP tools work the same way. ### Credits and spending Discovery is free: `search_templates`, `search_models`, and `search_nodes` work with just a [Comfy account](https://cloud.comfy.org). Running generations requires an active Comfy Cloud subscription. A credit or top-up balance alone does not grant access: you need an active subscription to run generations, even if you have unused credits. ### Uploads and downloads The MCP server runs in the cloud and the MCP itself doesn't write files to your machine. When a generation completes, your agent calls `get_output`, which returns: 1. A **temporary signed download URL** (valid for a short window). 2. A ready-to-run **shell command** (`curl` on macOS and Linux, `curl.exe` on Windows). Your agent should run that command in your shell. The command includes the destination path and filename. Run the returned command **verbatim**. Do not re-encode or edit the signed URL. The signature lives in the query string and breaks if the URL is modified. If your MCP client cannot run shell commands (some GUI-only setups), copy the command and run it yourself in a terminal. Asset upload and download depend on the client's file access. If Claude Desktop or another agent client has trouble handling asset uploads or downloads, it may be related to the agent's access to your local file directories. For Claude users we recommend **Claude Code** (desktop app or terminal), which has more capabilities. Similarly, for other agent families, the coding agent is usually better than the web chat version. ### Known limitations Comfy Cloud MCP is an early release. These limitations are known and being worked on: **Workflows** * **Assets generated via `submit_workflow` may not embed workflow metadata.** They might not reopen the originating workflow when opened in ComfyUI. * **Workflow building depends on agent accuracy.** Complex multi-node workflows may need a retry or refinement. **File handling** * **Outputs require a shell download step.** See [Uploads and downloads](#uploads-and-downloads). * **Upload size limits** may apply depending on your MCP client. Some clients impose their own limits on file uploads. **Authentication** * **OAuth or API key.** Claude Code and Claude Desktop use a one-time browser OAuth flow. **Cursor** requires a Comfy Cloud API key in your MCP config (no OAuth). Other headless clients can pass a Comfy Cloud API key via the `X-API-Key` header instead. A device-code OAuth flow for clients that cannot open a browser is planned. ## Local Comfy MCP Connection The open-source connection: your client launches the server on your machine and it drives the ComfyUI installed there. [**comfy-mcp**](https://github.com/Comfy-Org/comfy-mcp) is Comfy's **first-party local MCP server** — the official way to drive a **local** ComfyUI install from AI agents (Claude Code, Claude Desktop, Cursor, and other MCP clients). Unlike the cloud and partner servers, it talks to the ComfyUI running on **your own machine** — so it can run your workflows and inspect the nodes, custom nodes, and models your install actually has. **The fastest setup: hand it to your agent.** Paste `https://docs.comfy.org/agent-tools/mcp#installation` into your AI client and ask it to set up the local connection for you. ### Requirements * **Python 3.10+** * **[comfy-cli](https://github.com/Comfy-Org/comfy-cli)** on your `PATH` (`pip install "comfy-cli>=1.14.0"`) — the engine every tool wraps * **A ComfyUI workspace** — create one with `comfy install` if you don't have one (an existing checkout works via `comfy set-default `) * **A running ComfyUI for execution tools.** Start it with `comfy launch`, or call `launch_comfyui`. The server does not launch ComfyUI implicitly. *** ### Installation From [PyPI](https://pypi.org/project/comfy-mcp/): ```bash theme={null} pip install comfy-mcp ``` This puts a `comfy-mcp` console script on your `PATH` — that command is the MCP server (it speaks MCP over stdio). Point your AI client at it below. (Hacking on the server itself? `pip install -e .` from a checkout of the [repository](https://github.com/Comfy-Org/comfy-mcp) instead.) **`COMFY_BIN` (optional).** MCP clients launch the server with their own environment, which often does **not** include your shell's `PATH`. If `comfy` lives in a virtualenv or a non-standard location, set `COMFY_BIN` to its absolute path (for example `/path/to/venv/bin/comfy`). Every client example below shows where it goes; drop it if `comfy` is already on the environment your client launches the server with. *** ### Manual configuration All clients speak the same MCP stdio contract: run the `comfy-mcp` command as a server. Pick your client: Edit `claude_desktop_config.json` (Settings → Developer → Edit Config; on macOS it lives at `~/Library/Application Support/Claude/claude_desktop_config.json`), add the server, then restart Claude Desktop: ```json theme={null} { "mcpServers": { "comfy-mcp": { "command": "comfy-mcp", "env": { "COMFY_BIN": "/path/to/venv/bin/comfy" } } } } ``` One command registers the server: ```bash theme={null} claude mcp add comfy-mcp -e COMFY_BIN=/path/to/venv/bin/comfy -- comfy-mcp ``` Or check it into a project with a `.mcp.json` at the repo root: ```json theme={null} { "mcpServers": { "comfy-mcp": { "command": "comfy-mcp", "env": { "COMFY_BIN": "/path/to/venv/bin/comfy" } } } } ``` Add the server to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per project): ```json theme={null} { "mcpServers": { "comfy-mcp": { "command": "comfy-mcp", "env": { "COMFY_BIN": "/path/to/venv/bin/comfy" } } } } ``` *** ### Quickstart Zero to a generated image: ```bash theme={null} pip install "comfy-cli>=1.14.0" # the engine comfy install # create a ComfyUI workspace (skip if you have one) pip install comfy-mcp # this MCP server → the `comfy-mcp` command ``` ```bash theme={null} comfy launch ``` Use the snippet for your client above, then restart / reload it so the tools appear. For example: > "Confirm my local ComfyUI is running, then run the workflow at `~/workflows/txt2img.json` and show me the image." Under the hood the agent calls `server_info` to confirm ComfyUI is up, `run_workflow` to execute the workflow JSON, and `fetch_outputs` to collect the result. *** ### Tools Each tool maps onto a `comfy-cli` command, run with `--where local`. Highlights: | Tool | Purpose | | - | - | | `server_info()` | Is a local ComfyUI running, where, and which workspace. **Call first.** | | `run_workflow(workflow_path, wait=True)` | Run a workflow JSON; `wait=False` submits async and returns a `prompt_id`. | | `job_status` / `wait_for_job` / `watch_job` | Poll, wait on, or stream a submitted job. | | `fetch_outputs(prompt_id, out_dir)` | Copy a finished job's outputs into `out_dir`. | | `launch_comfyui` / `stop_comfyui` | Start or stop the local ComfyUI. | | `search_templates` / `fetch_template` | Find a built-in template and write its runnable workflow JSON. | | `search_nodes` / `get_node` / `list_nodes` | Inspect the node classes in your **live local** install (custom nodes included). | | `search_models` | List the model files on disk. | | `validate_workflow` | Pre-flight a workflow against the live `object_info` before a slow run. | Node introspection and model search read your **live install** — custom nodes included — which is the local differentiator from the cloud connection. See the [repository](https://github.com/Comfy-Org/comfy-mcp) for the full tool list and reference. *** ## Related resources | Resource | What it's for | | - | - | | [Comfy Skills](https://github.com/Comfy-Org/comfy-skills/) | Claude Code plugin marketplace and community skill library. The **comfy-cloud** plugin used above is distributed here; browse or contribute additional skills for Comfy workflows. | | [Comfy Cloud on ClawHub](https://clawhub.ai/comfy-org/skills/comfy) | OpenClaw skill (`openclaw skills install @comfy-org/comfy`) for the hosted Comfy Cloud MCP server. | | [Comfy CLI](/agent-tools/cli) | Command-line tool for local ComfyUI install/launch and for calling hosted partner nodes from scripts or CI (`comfy generate`, in beta). Complements MCP when you need terminal or automation workflows. | | [Share a workflow on Comfy Cloud](/cloud/share-workflow) | Share workflows from the Comfy Cloud UI (the MCP `share_workflow` tool does this from an agent session). | ## Related: Comfy Agent Want the agent experience **inside** ComfyUI, not an external MCP client? Built-in ComfyUI assistant for building, editing, and running workflows. **Generally available on Cloud.** Local (Comfy Desktop) coming soon. ## Feedback Try Comfy MCP and tell us what works and what doesn't: * **[Feedback survey](https://links.comfy.org/cloudmcpbeta)**: report bugs, request features, or share general impressions. * **Discord**: [#comfy-mcp-and-cli](https://discord.gg/xWJn6nhE3R) on the Comfy Discord for questions and discussion. ## FAQ ### Getting started Any MCP-compatible client. The **cloud connection** needs remote HTTP support. **Claude Code**, **Claude Desktop**, **Cursor**, **Codex** and **OpenClaw** have first-class setup above; **Windsurf**, **Amp** and others use the same URL with OAuth or an API key. The **local connection** needs a client that can launch a local stdio server as a subprocess. That rules out browser-based clients. [claude.ai](https://claude.ai) and ChatGPT accept remote connectors only. The cloud connection runs at `https://cloud.comfy.org/mcp`. The local connection has no URL. Your client launches the `comfy-mcp` command directly and talks to it over stdio. Yes. That is the [Local Comfy MCP Connection](#local-comfy-mcp-connection). It drives the ComfyUI installed on your own machine, so your agent sees the models, LoRAs and custom nodes you actually have, and runs on your GPU. Yes, and we recommend it if you run ComfyUI locally. Most clients host two MCP servers happily, and your agent keeps them straight. Each connection runs its own workflows and returns its own results. The two sign-ins are **separate**, though. Signing in on one does not sign you in on the other, even though it is the same Comfy account. Ask your agent. It reads your hardware before starting anything heavy. On a **Mac**, use the cloud connection for generating: today's open-weight models are too large to run at a workable speed on the Apple GPU. On a **PC with a dedicated graphics card**, 24 GB or more of VRAM handles most things including video; 8–24 GB is fine for images but video will be slow or will not fit; under 8 GB, use cloud. Yes. The cloud connection is generally available, and the local connection is available for local ComfyUI installations. See [Feedback](#feedback) to report issues or share suggestions. ### Cost and access Discovery is free on both connections: searching templates, models and nodes needs only a Comfy account. On the **cloud connection**, running generations requires an active Comfy Cloud subscription; new users get 5 free runs. On the **local connection**, runs are free because they happen on your hardware, with one exception: partner models execute on partner infrastructure and spend credits. Not for interactive clients that support OAuth, including Claude Code, Claude Desktop, Codex and OpenClaw. **Cursor** requires a Comfy Cloud API key in your MCP config; there is no MCP OAuth there yet. Headless and CI setups with no browser need one too. See the **Cursor** and **Other clients** tabs under [Set up the cloud connection](#set-up-the-cloud-connection). ### Using it You do not call MCP tools yourself — your agent picks them based on what you ask for. Typically it **discovers** what is available (`search_templates`, `search_models`, `search_nodes`), **runs** a generation, then **waits and retrieves** the output. See [What your agent can do](#what-your-agent-can-do). On the **cloud connection**, the server never writes to your machine: `get_output` returns a temporary signed URL and a ready-to-run download command for your agent to execute in your shell. See [Uploads and downloads](#uploads-and-downloads). On the **local connection**, ComfyUI writes into your workspace's `output/` directory, and `fetch_outputs(prompt_id, out_dir)` copies a finished job's files anywhere you name. Nothing to undo — add the second connection alongside the first. Going **local → cloud** (you need Cloud GPUs or partner models): ask your agent to sign you in, then add `https://cloud.comfy.org/mcp` to your client. Going **cloud → local** (you want your own models and custom nodes): install ComfyUI and the local server, then point your client at it. Your agent can do most of this for you. Just ask your agent. With both connections added, say where you want a job to run — "run this one on Comfy Cloud", "do this locally" — and it uses the right connection. There is no mode to toggle and nothing to reconfigure between runs. If a workflow turns out to be too heavy for your machine, your agent can tell you and offer to run it on Comfy Cloud instead. And if only one connection is set up, ask it to add the other — see [Set up the cloud connection](#set-up-the-cloud-connection) or the [Local Comfy MCP Connection](#local-comfy-mcp-connection). On the **cloud connection**, nothing to do — it is hosted, so you are always on the current version. On the **local connection**, ask your agent to handle it. Afterwards, **restart your client** or start a new session: MCP servers load when a session starts, so a running one keeps serving the old version until you do. ### Troubleshooting No. Slash commands ship in the Claude Code plugin. Claude Desktop connects to the same MCP server — the tools work if you ask in plain language or use the prompt picker — but it does not support Claude Code plugins or slash commands. There is no `/comfy` or `/cloud` command. Commands appear under one of two prefixes depending on how you connected: * **Plugin (recommended):** `/comfy-cloud:generate-image`, `/comfy-cloud:generate-video`, … — type `/comfy-cloud:` to see them all. * **Direct connection (no plugin):** `/mcp__comfy-cloud__generate-image`, … — type `/mcp__` to see them. Either way you can just ask in plain language ("generate an image of …"). The MCP tools are model-invoked and do not require a slash command. In Claude Code, run `/mcp`, select **comfy-cloud**, and choose **Authenticate**. In Claude Desktop, reopen the connector from **Customize → Connectors** and trigger sign-in. # Skills Source: https://docs.comfy.org/agent-tools/skills Agent skills and plugins for Comfy, published through the Comfy Skills repository. [**Comfy Skills**](https://github.com/Comfy-Org/comfy-skills) is the home of skills and plugins for coding agents. Skills are packaged knowledge an agent loads on demand: model guidance, workflow patterns, and ready-made commands. The repository hosts: * **Claude Code plugins**: for example **comfy-cloud**, which adds the Comfy Cloud MCP connection and the `/comfy-cloud:*` slash commands in one install. * **Agent skills**: focused instructions for specific tasks, such as current model recommendations and workflow-building know-how, kept up to date as models change. * **Community contributions**: skills and plugins from the Comfy community. To use it in Claude Code: ``` /plugin marketplace add Comfy-Org/comfy-skills /plugin install comfy-cloud@comfy-skills ``` For the plugin's slash commands and setup details, see [Comfy MCP](/agent-tools/mcp). # Custom Nodes Source: https://docs.comfy.org/basic-concepts/custom-nodes Custom nodes in ComfyUI: how they differ from Comfy Core nodes, plus installing, updating, enabling dependencies, disabling, and uninstalling them. ## About Custom Nodes After installing ComfyUI, you'll discover that it includes many built-in nodes. These native nodes are called **Comfy Core** nodes, which are officially maintained by ComfyUI. Additionally, there are numerous [**custom nodes**](https://registry.comfy.org) created by various authors from the ComfyUI community. These custom nodes bring extensive functionality to ComfyUI, greatly expanding its capabilities and feature boundaries. In this guide, we'll cover various operations related to custom nodes, including installation, updates, disabling, uninstalling, and dependency installation. Anyone can develop their own custom extensions for ComfyUI and share them with others. You can find many community custom nodes [here](https://registry.comfy.org). If you want to develop your own custom nodes, visit the section below to get started: Learn how to start developing a custom node ## Custom Node Management In this section we will cover: * Installing custom nodes * Installing node dependencies * Custom node version control * Uninstalling custom nodes * Temporarily disabling custom nodes * Handling custom node dependency conflicts ### 1. Installing Custom Nodes Currently, ComfyUI supports installing custom nodes through multiple methods, including: * [Install via ComfyUI Manager (Recommended)](#install-via-comfyui-manager) * Install via Git * Manual installation We recommend installing custom nodes through **ComfyUI Manager**, which is a highly significant tool in the ComfyUI custom node ecosystem. It makes custom node management (such as searching, installing, updating, disabling, and uninstalling) simple - you just need to search for the node you want to install in ComfyUI Manager and click install. However, since all custom nodes are currently stored on GitHub, for regions that cannot access GitHub normally, we have written detailed instructions for different custom node installation methods in this guide. Additionally, since we recommend using **ComfyUI Manager** for plugin management, we recommend using this tool for plugin management. You can find its source code [here](https://github.com/Comfy-Org/ComfyUI-Manager). Therefore, in this documentation, we will use installing ComfyUI Manager as a custom node installation example, and supplement how to use it for node management in the relevant introduction sections. Since ComfyUI Manager has very rich functionality, we will use a separate document to introduce the ComfyUI Manager installation chapter. Please visit the link below to learn how to use ComfyUI Manager to install custom nodes. Learn how to use ComfyUI Manager to install custom nodes First, you need to ensure that Git is installed on your system. You can check if Git is installed by entering the following command in your system terminal: ```bash theme={null} git --version ``` If Git is installed, you will see output similar to the following: Windows Terminal If not yet installed, please visit [git-scm.com](https://git-scm.com/) to download the corresponding installation package. Linux users please refer to [git-scm.com/downloads/linux](https://git-scm.com/downloads/linux) for installation instructions. For Comfy Desktop version, you can use the Desktop terminal as shown below to complete the installation. Comfy Desktop Terminal After completing the Git installation, we need the repository address of the custom node. Here we use the ComfyUI-Manager repository address as an example: ```bash theme={null} https://github.com/Comfy-Org/ComfyUI-Manager ``` For regions that cannot access GitHub smoothly, you can try using other code hosting service websites to fork the corresponding repository, then use that repository address to complete the node installation, such as gitee, etc. First, we need to navigate to the ComfyUI custom nodes directory. Using ComfyUI portable version as an example, if the folder location is `D:\ComfyUI_windows_portable`, then you should be able to find the custom nodes folder at `D:\ComfyUI_windows_portable\ComfyUI\custom_nodes`. First, we need to use the `cd` command to enter the corresponding directory: ```bash theme={null} cd D:\ComfyUI_windows_portable\ComfyUI\custom_nodes ``` Then we use the `git clone` command to complete the node installation: ```bash theme={null} git clone https://github.com/Comfy-Org/ComfyUI-Manager ``` If everything goes smoothly, you will see output similar to the following: Install Custom Nodes via Git This means you have successfully cloned the custom node code. Next, we need to install the corresponding dependencies. Please refer to the instructions in the [Installing Node Dependencies](#2-installing-node-dependencies) section for dependency installation. Manual installation is not the recommended installation method, but it serves as a backup option when you cannot install smoothly using git. Plugins installed this way will lose the corresponding git version history information and will not be convenient for subsequent version management. For manual installation, we need to first download the corresponding node code and then extract it to the appropriate directory. Download Node Code Visit the corresponding custom node repository page: 1. Click the `Code` button 2. Then click the `Download ZIP` button to download the ZIP package 3. Extract the ZIP package Copy the extracted code from the above steps to the ComfyUI custom nodes directory. Using ComfyUI portable version as an example, if the folder location is `D:\ComfyUI_windows_portable`, then you should be able to find the custom nodes folder at `D:\ComfyUI_windows_portable\ComfyUI\custom_nodes`. Copy the extracted code from the above steps to the corresponding directory. Please refer to the instructions in the [Installing Node Dependencies](#2-installing-node-dependencies) section for dependency installation. ### 2. Installing Node Dependencies Custom nodes all require the installation of related dependencies. For example, for ComfyUI-Manager, you can visit the [requirements.txt](https://github.com/Comfy-Org/ComfyUI-Manager/blob/main/requirements.txt) file to view the dependency package requirements. In the previous steps, we only cloned the custom node code locally and did not install the corresponding dependencies, so next we need to install the corresponding dependencies. Actually, if you use ComfyUI-Manager to install plugins, ComfyUI Manager will automatically help you complete the dependency installation. You just need to restart ComfyUI after installing the plugin. This is why we strongly recommend using ComfyUI Manager to install custom nodes. But perhaps you may not be able to use ComfyUI Manager to install custom nodes smoothly in some situations, so we provide this more detailed dependency installation guide. In the [Dependencies](/basic-concepts/dependencies) chapter, we introduced the relevant content about dependencies in ComfyUI. ComfyUI is a **Python**-based project, and we built an independent **Python** runtime environment for running ComfyUI. All related dependencies need to be installed in this independent **Python** runtime environment. If you run `pip install -r requirements.txt` directly in the system-level terminal, the corresponding dependencies may be installed in the system-level **Python** environment, which will cause the dependencies to still be missing in ComfyUI's environment, preventing the corresponding custom nodes from running normally. So next we need to use ComfyUI's independent Python runtime environment to complete the dependency installation. Depending on different ComfyUI versions, we will use different methods to install the corresponding dependencies: For ComfyUI Portable version, it uses an embedded Python located in the `\ComfyUI_windows_portable\python_embeded` directory. We need to use this Python to complete the dependency installation. First, start the terminal in the portable version directory, or use the `cd` command to navigate to the `\ComfyUI_windows_portable\` directory after starting the terminal. Start Terminal Ensure that the terminal directory is `\ComfyUI_windows_portable\`, as shown below for `D:\ComfyUI_windows_portable\` Terminal Then use `python_embeded\python.exe` to complete the dependency installation: ```bash theme={null} python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-Manager\requirements.txt ``` Of course, you can replace ComfyUI-Manager with the name of the custom node you actually installed, but make sure that a `requirements.txt` file exists in the corresponding node directory. Since Comfy Desktop already has ComfyUI-Manager and its dependencies installed during the installation process, and this guide uses ComfyUI Manager as an example for custom node installation, you don't actually need to perform ComfyUI Manager dependency installation in the desktop version. If there are no unexpected issues, we recommend using ComfyUI Manager to install custom nodes, so you don't need to manually install dependencies. Comfy Desktop Terminal Then use the following command to install the dependencies for the corresponding plugin: ```bash theme={null} pip install -r .\custom_nodes\\requirements.txt ``` As shown below, this is the dependency installation for ComfyUI-Hunyuan3Dwrapper: Comfy Desktop Dependency Installation For users with custom Python environments, we recommend using `pip install -r requirements.txt` to complete the dependency installation. ### Custom Node Version Control Custom node version control is actually based on Git version control. You can manage node versions through Git, but ComfyUI Manager has already integrated this version management functionality very well. Many thanks to [@Dr.Lt.Data](https://github.com/ltdrdata) for bringing us such a convenient tool. In this section, we will still explain these two different plugin version management methods for you, but if you use ZIP packages for manual installation, the corresponding git version history information will be lost, making it impossible to perform version management. Since we are iterating on ComfyUI Manager, the actual latest interface and steps may change significantly Perform the corresponding operations as shown to enter the ComfyUI Manager interface You can use the corresponding filters to filter out installed node packages and then perform the corresponding node management Switch to the corresponding version. Manager will help you complete the corresponding dependency updates and installation. Usually, you need to restart ComfyUI after switching versions for the changes to take effect. Find the directory folder where your corresponding node is located, such as `ComfyUI/custom_nodes/ComfyUI-Manager` Use the `cd` command to enter the corresponding folder: ```bash theme={null} cd /ComfyUI/custom_nodes/ComfyUI-Manager ``` You can use the following command to view all available tags and releases: ```bash theme={null} git tag ``` This will list all version tags, and you can choose the version you want to switch to. Use the following command to switch to a specified tag or release: ```bash theme={null} git checkout ``` Replace `` with the specific version tag you want to switch to. If you want to switch to a specific commit version, you can use the following command: ```bash theme={null} git checkout ``` Replace `` with the specific commit hash you want to switch to. Since the dependencies of the corresponding custom node package may change after version switching, you need to reinstall the dependencies for the corresponding node. Please refer to the instructions in the [Installing Node Dependencies](#2-installing-node-dependencies) section to enter the corresponding environment for installation. ### Uninstalling Custom Nodes To be updated ### Temporarily Disabling Custom Nodes To be updated ### Custom Node Dependency Conflicts To be updated ## ComfyUI Manager ComfyUI Manager Interface This tool is currently included by default in the [Desktop version](/installation/desktop/windows), while in the [Portable version](/installation/comfyui_portable_windows), you need to refer to the installation instructions in the [Install Manager](#1-installing-custom-nodes) section of this document. As ComfyUI continues to develop, ComfyUI Manager plays an increasingly important role in ComfyUI. Currently, ComfyUI-Manager has officially joined the Comfy Org organization, officially becoming part of ComfyUI's core dependencies, and continues to be maintained by the original author [Dr.Lt.Data](https://github.com/ltdrdata). You can read [this blog post](https://blog.comfy.org/p/comfyui-manager-joins-comfy-org) for more information. In future iterations, we will greatly optimize the use of ComfyUI Manager, so the interface shown in this documentation may differ from the latest version of ComfyUI Manager. ### Installing the Manager If you are running the ComfyUI server application, you need to install the manager. If ComfyUI is running, please close it before continuing. The first step is to install Git, which is a command-line application for software version control. Git will download the ComfyUI manager from [github.com](https://github.com). Download and install Git from [git-scm.com](https://git-scm.com/). After installing Git, navigate to the ComfyUI server program directory and enter the folder labeled **custom\_nodes**. Open a command window or terminal. Make sure the command line shows the current directory path as **custom\_nodes**. Run the following command to clone the ComfyUI-Manager repository: ```bash theme={null} git clone https://github.com/Comfy-Org/ComfyUI-Manager.git ``` This will download the manager. Technically, this is called *cloning a Git repository*. ### Detecting Missing Nodes After installing the manager, you can detect missing nodes in the manager. ComfyUI Manager Interface ## Developing a Custom Node If you have some development capabilities, please start with the documentation below to learn how to begin developing a custom node. Learn how to start developing a custom node # Dependencies Source: https://docs.comfy.org/basic-concepts/dependencies Learn what ComfyUI workflows depend on to run: media assets, custom nodes, Python packages, and models. ## A workflow file depends on other files We often obtain various workflow files from the community, but frequently find that the workflow cannot run directly after loading. This is because a workflow file depends on other files besides the workflow itself, such as media asset inputs, models, custom nodes, related Python dependencies, etc. ComfyUI workflows can only run normally when all relevant dependencies are satisfied. ComfyUI workflow dependencies mainly fall into the following categories: * Assets (media files including audio, video, images, and other inputs) * Custom nodes * Python dependencies * Models (such as Stable Diffusion models, etc.) ## Assets An AI model is an example of an ***asset***. In media production, an asset is some media file that supplies input data. For example, a video editing program operates on movie files stored on disk. The editing program's project file holds links to these movie file assets, allowing non-destructive editing that doesn't alter the original movie files. ComfyUI works the same way. A workflow can only run if all of the required assets are found and loaded. Generative AI models, images, movies, and sounds are some examples of assets that a workflow might depend upon. These are therefore known as ***dependent assets*** or ***asset dependencies***. ## Custom Nodes Custom nodes are an important component of ComfyUI that extend its functionality. They are created by the community and can be installed to add new capabilities to your workflows. ## Python Dependencies ComfyUI is a Python-based project. We build a standalone Python environment to run ComfyUI, and all related dependencies are installed in this isolated Python environment. ### ComfyUI Dependencies You can view ComfyUI's current dependencies in the [requirements.txt](https://github.com/Comfy-Org/ComfyUI/blob/master/requirements.txt) file: ```text theme={null} comfyui-frontend-package==1.49.6 comfyui-workflow-templates==0.11.48 comfyui-embedded-docs==0.5.10 torch torchsde torchvision torchaudio numpy>=1.25.0 einops transformers>=4.50.3 tokenizers>=0.13.3 sentencepiece safetensors>=0.4.2 aiohttp>=3.11.8 yarl>=1.18.0 pyyaml Pillow scipy tqdm psutil alembic SQLAlchemy>=2.0.0 filelock av>=17.0.0 comfy-kitchen==0.2.31 comfy-aimdo==0.4.15 requests simpleeval>=1.0.0 blake3 #non essential dependencies: kornia>=0.7.1 spandrel pydantic~=2.0 pydantic-settings~=2.0 PyOpenGL>=3.1.8 comfy-angle ``` As ComfyUI evolves, we may adjust dependencies accordingly, such as adding new dependencies or removing ones that are no longer needed. So if you use Git to update ComfyUI, you need to run the following command in the corresponding environment after pulling the latest updates: ```bash theme={null} pip install -r requirements.txt ``` This ensures that ComfyUI's dependencies are up to date for proper operation. You can also modify specific package dependency versions to upgrade or downgrade certain dependencies. Additionally, ComfyUI's frontend [ComfyUI\_frontend](https://github.com/Comfy-Org/ComfyUI_frontend) is currently maintained as a separate project. We update the `comfyui-frontend-package` dependency version after the corresponding version stabilizes. If you need to switch to a different frontend version, you can check the version information [here](https://pypi.org/project/comfyui-frontend-package/#history). ### Custom Node Dependencies Thanks to the efforts of many authors in the ComfyUI community, we can extend ComfyUI's functionality by using different custom nodes, enabling impressive creativity. Typically, each custom node has its own dependencies and a separate `requirements.txt` file. If you use [ComfyUI Manager](https://github.com/Comfy-Org/ComfyUI-Manager) to install custom nodes, ComfyUI Manager will usually automatically install the corresponding dependencies. There are also cases where you need to install dependencies manually. Currently, all custom nodes are installed in the `ComfyUI/custom_nodes` directory. You need to navigate to the corresponding plugin directory in your ComfyUI Python environment and run `pip install -r requirements.txt` to install the dependencies. If you're using the [Windows Portable version](/installation/comfyui_portable_windows), you can use the following command in the `ComfyUI_windows_portable` directory: ``` python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\\requirements.txt ``` to install the dependencies for the corresponding node. ### Dependency Conflicts Dependency conflicts are a common issue when using ComfyUI. You might find that after installing or updating a custom node, previously installed custom nodes can no longer be found in ComfyUI's node library, or error pop-ups appear. One possible reason is dependency conflicts. There can be many reasons for dependency conflicts, such as: 1. Custom node version locking Some plugins may fix the exact version of a dependency library (e.g., `open_clip_torch==2.26.1`), while other plugins may require a higher version (e.g., `open_clip_torch>=2.29.0`), making it impossible to satisfy both version requirements simultaneously. **Solution**: You can try changing the fixed version dependency to a range constraint, such as `open_clip_torch>=2.26.1`, and then reinstall the dependencies to resolve these issues. 2. Environment pollution During the installation of custom node dependencies, it may overwrite versions of libraries already installed by other plugins. For example, multiple plugins may depend on `PyTorch` but require different CUDA versions, and the later installed plugin will break the existing environment. **Solutions**: * You can try manually installing specific versions of dependencies in the Python virtual environment to resolve such issues. * Or create different Python virtual environments for different plugins to resolve these issues. * Try installing plugins one by one, restarting ComfyUI after each installation to observe if dependency conflicts occur. 3. Custom node dependency versions incompatible with ComfyUI dependency versions These types of dependency conflicts may be more difficult to resolve, and you may need to upgrade/downgrade ComfyUI or change the dependency versions of custom nodes to resolve these issues. **Solution**: These types of dependency conflicts may be more difficult to resolve, and you may need to upgrade/downgrade ComfyUI or change the dependency versions of custom nodes to resolve these issues. ## Models Models are a significant asset dependency for ComfyUI. Various custom nodes and workflows are built around specific models, such as the Stable Diffusion series, Flux series, Ltxv, and others. These models are an essential foundation for creation with ComfyUI, so we need to ensure that the models we use are properly available. Typically, our models are saved in the corresponding directory under `ComfyUI/models/`. Of course, you can also create an [extra\_model\_paths.yaml](https://github.com/Comfy-Org/ComfyUI/blob/master/extra_model_paths.yaml.example) by modifying the template to make additional model paths recognized by ComfyUI. This allows multiple ComfyUI instances to share the same model library, reducing disk usage. ## Software An advanced application like ComfyUI also has ***software dependencies***. These are libraries of programming code and data that are required for the application to run. Custom nodes are examples of software dependencies. On an even more fundamental level, the Python programming environment is the ultimate dependency for ComfyUI. The correct version of Python is required to run a particular version of ComfyUI. Updates to Python, ComfyUI, and custom nodes can all be handled from the **ComfyUI Manager** window. ComfyUI Custom Nodes Manager # ComfyUI Links: How Node Connections Work Source: https://docs.comfy.org/basic-concepts/links Learn how links connect nodes in ComfyUI, how to change link render styles, and how the Reroute node keeps complex workflows readable. ## Links connect nodes In ComfyUI, the lines or curves drawn between nodes are called ***links*** (also referred to as ***connections*** or wires). They carry data from one node's output to another node's input, defining the flow of your workflow. Links can be displayed in several visual styles: curves, right angles, straight lines, or hidden entirely. Link styles To change the link style, go to **Setup Menu** → **Display (Lite Graph)** → **Graph** → **Link Render Mode**. Render mode setting You can also temporarily hide all links from the **Canvas Menu**. Canvas Menu Showing links is especially useful when learning, sharing, or debugging a workflow. They make the data flow visible at a glance. For finished workflows that aren't meant to be edited, hiding links can reduce visual clutter. ### Reroute node When a workflow becomes complex, link wires can overlap or pass behind nodes, making it hard to read. The **Reroute** node lets you manually redirect a wire through any point in the 2D graph space, keeping the layout clean and legible. ComfyUI Reroute node ComfyUI also has a built-in native reroute feature in the graph canvas. We recommend using this for new workflows. ComfyUI Native Reroute ## Color-coding Every data type in ComfyUI has a distinct color. Node input and output ports, as well as the link wires connecting them, all share this color scheme. **You can only connect ports of the same color**. This ensures type safety across your workflow. ComfyUI Node Data Types | Data type | Color | | - | - | | Diffusion model | Lavender | | CLIP model | Yellow | | VAE model | Rose | | Conditioning | Orange | | Latent Image | Pink | | Pixel image | Blue | | Mask | Green | | Number (integer or float) | Gray | | Mesh | Bright green | # Models Source: https://docs.comfy.org/basic-concepts/models How model files fit into ComfyUI workflows: where they go, how to load them, and common fixes. ## Models in plain terms In ComfyUI, **models** are the weight files that actually run your workflow. They include **checkpoints**, **VAEs**, **LoRAs**, **ControlNets**, and upscalers. The app install is small. These files are **not** included by default. You usually **download them from the web**, place them under `ComfyUI/models/` (or follow a template’s prompts), then choose the file in the right **loader node** (on the canvas, these often appear as nodes whose names start with **Load**). ### Supported models in ComfyUI * **Built-in / first-party coverage is intentionally limited** but grows over time as ComfyUI and the open-source ecosystem evolve. When a model gains first-class support, you will **usually see a new entry in the [workflow template library](/interface/features/template)** that shows the expected graph and model pairing. * **Not every checkpoint or weights file works out of the box.** For **natively supported models and their common companion weights**, keep ComfyUI **[up to date](/installation/update_comfyui)** and confirm the matching workflow exists in the **[template library](/interface/features/template)** before assuming your files are in the wrong place. * **Many other models are enabled through community custom nodes.** Paths, loader nodes, and graph layout can differ from this page’s generic `ComfyUI/models/` guidance. **Always follow each project’s README or docs.** ComfyUI is highly extensible, so implementations vary by author. For installation and troubleshooting, see [How to install custom nodes](/installation/install_custom_node). ## Use models in ComfyUI 1. **Get the files into the right place.** Download from community sites such as [Hugging Face](https://huggingface.co), [Civitai](https://civitai.green), or a project’s page on [GitHub](https://github.com), then put them under `ComfyUI/models/` in the subfolder for that type (for example `checkpoints`, `loras`, `vae`). 2. **Add the matching loader node.** Pick the loader for that model type (checkpoint, LoRA, VAE, etc.). In the node list, titles often begin with **Load**. 3. **Pick the file** in that loader node’s dropdown. 4. **Wire the loader node** into the rest of the graph. If you copied files in by hand while ComfyUI was open, **restart** the app (or refresh as needed) so lists update. ### Expect large downloads A single generative model is often **many gigabytes**. Budget disk space and time when downloading or syncing. ## Beyond the main checkpoint The main diffusion checkpoint does a lot, but many workflows add **smaller helper models**, for example: * **LoRA**: lightweight add-ons tuned for a style, character, or concept * **ControlNet**: extra guidance from edges, depth, pose, etc. * **Inpainting**: fill or replace regions inside an existing image auxiliary models ## Uninstalling models There is no “uninstall” button in the UI yet. To remove a model, **delete its file** (or files) from the folder under `ComfyUI/models/` where you put it. ## Adding Extra Model Paths If you want to manage your model files outside of `ComfyUI/models`, you may have the following reasons: * You have multiple ComfyUI instances and want them to share model files to save disk space * You have different types of GUI programs (such as WebUI) and want them to use the same model files * Model files cannot be recognized or found We provide a way to add extra model search paths via the `extra_model_paths.yaml` configuration file ### Open Config File For the ComfyUI version such as [portable](/installation/comfyui_portable_windows) and [manual](/installation/manual_install), you can find an example file named `extra_model_paths.yaml.example` in the root directory of ComfyUI: ``` ComfyUI/extra_model_paths.yaml.example ``` Copy and rename it to `extra_model_paths.yaml` for use. Keep it in ComfyUI's root directory at `ComfyUI/extra_model_paths.yaml`. You can also find the config example file [here](https://github.com/Comfy-Org/ComfyUI/blob/master/extra_model_paths.yaml.example) If you are using the [Comfy Desktop](/installation/desktop/windows) application, click the capsule menu at the top of the desktop app, then open the **Storage** tab and add your model directories there. The capsule only exists in the desktop app, not when ComfyUI runs in a browser. Comfy Desktop capsule menu: Storage tab showing model directory settings Or open it directly at: ``` C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml ``` ``` ~/Library/Application Support/ComfyUI/extra_models_config.yaml ``` You should keep the file in the same directory, should not move these files to other places. If the file does not exist, you can create it yourself with any text editor. ### Example Structure Suppose you want to add the following model paths to ComfyUI: ``` 📁 YOUR_PATH/ ├── 📁models/ | ├── 📁 loras/ | │ └── xxxxx.safetensors | ├── 📁 checkpoints/ | │ └── xxxxx.safetensors | ├── 📁 vae/ | │ └── xxxxx.safetensors | └── 📁 controlnet/ | └── xxxxx.safetensors ``` Then you can configure the `extra_model_paths.yaml` file like below to let ComfyUI recognize the model paths on your device: ``` my_custom_config: base_path: YOUR_PATH loras: models/loras/ checkpoints: models/checkpoints/ vae: models/vae/ controlnet: models/controlnet/ ``` or ``` my_custom_config: base_path: YOUR_PATH/models/ loras: loras checkpoints: checkpoints vae: vae controlnet: controlnet ``` For the desktop version, please add the configuration to the existing configuration path without overwriting the path configuration generated during installation. Please back up the corresponding file before modification, so that you can restore it when you make a mistake. Or you can refer to the default [extra\_model\_paths.yaml.example](https://github.com/Comfy-Org/ComfyUI/blob/master/extra_model_paths.yaml.example) for more configuration options. After saving, you need to **restart ComfyUI** for the changes to take effect. Below is the original config example: ```yaml theme={null} #Rename this to extra_model_paths.yaml and ComfyUI will load it #config for a1111 ui #all you have to do is change the base_path to where yours is installed a111: base_path: path/to/stable-diffusion-webui/ checkpoints: models/Stable-diffusion configs: models/Stable-diffusion vae: models/VAE loras: | models/Lora models/LyCORIS upscale_models: | models/ESRGAN models/RealESRGAN models/SwinIR embeddings: embeddings hypernetworks: models/hypernetworks controlnet: models/ControlNet #config for comfyui #your base path should be either an existing comfy install or a central folder where you store all of your models, loras, etc. #comfyui: # base_path: path/to/comfyui/ # # You can use is_default to mark that these folders should be listed first, and used as the default dirs for eg downloads # #is_default: true # checkpoints: models/checkpoints/ # clip: models/clip/ # clip_vision: models/clip_vision/ # configs: models/configs/ # controlnet: models/controlnet/ # diffusion_models: | # models/diffusion_models # models/unet # embeddings: models/embeddings/ # loras: models/loras/ # upscale_models: models/upscale_models/ # vae: models/vae/ #other_ui: # base_path: path/to/ui # checkpoints: models/checkpoints # gligen: models/gligen # custom_nodes: path/custom_nodes ``` For example, if your WebUI is located at `D:\stable-diffusion-webui\`, you can modify the corresponding configuration to ```yaml theme={null} a111: base_path: D:\stable-diffusion-webui\ checkpoints: models/Stable-diffusion configs: models/Stable-diffusion vae: models/VAE loras: | models/Lora models/LyCORIS upscale_models: | models/ESRGAN models/RealESRGAN models/SwinIR embeddings: embeddings hypernetworks: models/hypernetworks controlnet: models/ControlNet ``` ### Add Extra Custom Nodes Path Besides adding external models, you can also add custom nodes paths that are not in the default path of ComfyUI Please note that this will not change the default installation path of custom nodes, but will add an extra path search when starting ComfyUI. You still need to complete the installation of custom node dependencies in the corresponding environment to ensure the integrity of the running environment. Below is a simple configuration example (MacOS), please modify it according to your actual situation and add it to the corresponding configuration file, save it and restart ComfyUI for the changes to take effect: ```yaml theme={null} my_custom_nodes: custom_nodes: /Users/your_username/Documents/extra_custom_nodes ``` ## Common issues ComfyUI does not natively support GGUF format models. To use GGUF models, you need to install community custom nodes such as [ComfyUI-GGUF](https://github.com/city96/ComfyUI-GGUF). If you've installed a model but can't find it in ComfyUI, try these steps: * Verify the model is in the correct location: * Default path: `ComfyUI/models/` (e.g. `checkpoints`, `loras`, `vae`) * For **Comfy Desktop**: Click the capsule menu at the top of the desktop app, then open the **Storage** tab to check your model directories. The capsule only exists in the desktop app, not when ComfyUI runs in a browser. Comfy Desktop capsule menu: Storage tab showing model directory settings * Press the `r` key to refresh node definitions so ComfyUI can detect the model * Restart ComfyUI * Ensure the correct model is selected in the loader node ## Want a bit more background? Here, a **model** is a data file that encodes what a network learned. It contains enough information to turn inputs (like text and noise) into outputs (like an image). Common examples in image workflows are **diffusion** checkpoints, text/image encoders such as **CLIP**, and **upscalers** like RealESRGAN. Large **base** models from labs and open-source projects are general-purpose. The community often **fine-tunes** or merges them into new checkpoints and LoRAs that look better for a given style, run a bit lighter, or add new behavior. This is similar to picking a favorite checkpoint on Civitai or Hugging Face. # Nodes Source: https://docs.comfy.org/basic-concepts/nodes Nodes are ComfyUI's fundamental building blocks: independent Comfy Core or custom modules you connect with links to assemble complex workflows. In ComfyUI, nodes are the fundamental building blocks for executing tasks. Each node is an independently built module, whether it's a **Comfy Core** node or a **Custom Node**, with its own unique functionality. Nodes connect to each other through links, allowing us to build complex functionality like assembling LEGO blocks. The combinations of different nodes create the unlimited possibilities of ComfyUI. Comfy Core K-Sampler Node For example, in the K-Sampler node, you can see it has multiple inputs and outputs, and also includes multiple parameter settings. These parameters determine the logic of node execution. Behind each node is well-written Python logic, allowing you to achieve corresponding functionality without having to write code yourself. ComfyUI is under active development, so some details here may be outdated. If you spot something that's changed, feel free to [help us update the docs](https://github.com/Comfy-Org/docs). ## Nodes perform operations In computer science, a ***node*** is a container for information, usually including programmed instructions to perform some task. Nodes almost never exist in isolation, they're almost always connected to other nodes in a networked graph. In ComfyUI, nodes take the visual form of boxes that are connected to each other. ComfyUI nodes are usually ***function operators***. This means that they operate on some data to perform a function. A function is a process that accepts input data, performs some operation on it, and produces output data. In other words, nodes do some work, contributing to the completion of a task such as generating an image. So ComfyUI nodes almost always have at least one input or output, and usually have multiple inputs and outputs. ## Different Node States Node States In ComfyUI, nodes have multiple states. Here are some common node states: 1. **Normal State**: The default state 2. **Running State**: The running state, typically displayed when a node is executing after you start running the workflow 3. **Error State**: Node error, typically displayed after running the workflow if there's a problem with the node's input, indicated by red marking of the erroneous input node. You need to fix the problematic input to ensure the workflow runs correctly 4. **Missing State**: This state usually appears after importing workflows, with two possibilities: * Comfy Core native node missing: This usually happens because ComfyUI has been updated, but you're using an older version of ComfyUI. You need to update ComfyUI to resolve this issue * Custom node missing: The workflow uses custom nodes developed by third-party authors, but your local ComfyUI version doesn't have these custom nodes installed. You can use [ComfyUI Manager](/manager/overview) to find and install them, or follow [How to install custom nodes](/installation/install_custom_node) for other methods ## Connections Between Nodes In ComfyUI, nodes are connected through [links](/basic-concepts/links), allowing data of the same type to flow between different processing units to achieve the final result. ComfyUI Node Links Each node receives some input, processes it through its module, and converts it to corresponding output. Connections between different nodes must conform to the data type requirements. In ComfyUI, we use different colors to distinguish node data types. Below are some basic data types: ComfyUI Node Data Types | Data type | Color | | - | - | | diffusion model | lavender | | CLIP model | yellow | | VAE model | rose | | conditioning | orange | | latent image | pink | | pixel image | blue | | mask | green | | number (integer or float) | light green | | mesh | bright green | As ComfyUI evolves, we may expand to more data types to meet the needs of more scenarios. ### Connecting and Disconnecting Nodes ComfyUI Node Connecting **Connecting**: Drag from the output point of one node to the input of the same color on another node to connect them **Disconnecting**: Click on the input endpoint and drag the mouse left button to disconnect, or cancel the connection through the midpoint menu of the link ## Node Appearance Node Appearance We provide various style settings for you to customize the appearance of nodes: * Modify styles * Double-click the node title to modify the node name * Resize the node by dragging any corner