> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-matt-router-pricing-pika-and-guard.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Comfy CLI 故障排查指南

> 解决 Comfy CLI 常见的安装问题：缺少 git、Python 与虚拟环境要求、无浏览器环境下的 Comfy Cloud 登录，以及 GPU 库安装。

Comfy CLI 的大多数故障都源于缺少前置条件或跳过了某个设置步骤。遇到问题时，请先按下面的顺序检查。

## 前置条件

Comfy CLI 需要系统已安装 [git](https://git-scm.com/downloads)。请先安装 git，这样 `comfy install` 和 `comfy update` 才能克隆 ComfyUI 及其自定义节点。

## 在虚拟环境中安装 ComfyUI

`comfy install` 会把 ComfyUI 安装到当前激活的 Python 环境，该环境需要 Python 3.9 或更高版本。请先创建并激活虚拟环境：

```bash theme={null}
python3 -m venv comfy-env
source comfy-env/bin/activate
comfy install
```

## 单独安装 GPU 库

`comfy install` 不会安装 CUDA 或 ROCm。请在启动前安装与你的硬件匹配的 GPU 库，否则 `comfy launch` 启动的 ComfyUI 无法使用 GPU。

## 无浏览器环境下设置 Comfy Cloud

`comfy setup` 通过浏览器登录，因此在 CI、devcontainer 或无头服务器上无法完成。此时请改用 API Key 并以非交互方式运行：

```bash theme={null}
comfy setup --where cloud --api-key comfyui-... --non-interactive
```

## 获取更多帮助

* [Comfy CLI 入门](/zh/comfy-cli/getting-started) 涵盖安装、路由和生成。
* [Comfy CLI 命令参考](/zh/comfy-cli/reference) 列出所有命令和参数。
* 可在 [comfy-cli 仓库](https://github.com/Comfy-Org/comfy-cli/issues) 中反馈可复现的 CLI 缺陷。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.