Registry
发布节点
设置注册表账户 按照以下步骤设置注册表账户并发布您的第一个节点。 观看教程 创建发布者 发布者是一个可以向注册表 registry 发布自定义节点的身份。每个自定义节点都需要在 pyproject.toml 文件 中包含发布者标识符。 访问 Comfy Registry https://registry.comfy.org ,创建一个发布者账户。您的发布者
设置注册表账户
按照以下步骤设置注册表账户并发布您的第一个节点。
观看教程
创建发布者
发布者是一个可以向注册表(registry)发布自定义节点的身份。每个自定义节点都需要在 pyproject.toml [文件]() 中包含发布者标识符。
访问 Comfy Registry,创建一个发布者账户。您的发布者 ID 是全球唯一的,并且之后不能更改,因为它用于您的自定义节点的 URL 中。
您的发布者 ID 可以在个人资料页面上 @ 符号后面找到。
创建注册表发布 API Key
访问这里并点击你想要为其创建 API 密钥的发布者。此密钥将用于通过 CLI 或 GitHub Actions 将自定义节点发布到注册表(为 ComfyUI-Manager 提供支持)。

为 API 密钥命名并将其安全保存。如果密钥丢失了它,请重新创建一个新的密钥。

添加元数据
comfy node init这个命令将会生成下面这样的元数据:
# pyproject.toml
[project]
name = "" # Unique identifier for your node. Immutable after creation.
description = ""
version = "1.0.0" # Custom Node version. Must be semantically versioned.
license = { file = "LICENSE.txt" }
dependencies = [] # Filled in from requirements.txt
[project.urls]
Repository = "https://github.com/..."
[tool.comfy]
PublisherId = "" # TODO (fill in Publisher ID from Comfy Registry Website).
DisplayName = "" # Display name for the Custom Node. Can be changed later.
Icon = "https://example.com/icon.png" # SVG, PNG, JPG or GIF (MAX. 800x400px)将此文件添加到您的仓库中。查看规范以获取有关 pyproject.toml 文件的更多信息。
使用 .comfyignore 排除文件
默认情况下,comfy node publish 会打包所有被 git 跟踪的文件。如果要将仅供开发使用的文件(测试、设计资源、大型样本等)排除在发布的归档之外,请在仓库根目录添加 .comfyignore 文件。其语法与 .gitignore 一致:
# 仅供开发使用的资源
docs/
tests/
*.psd
.vscode/发布到注册表(registry)
选项 1: Comfy CLI
运行下面的命令手动将您的节点发布到注册表。
comfy node publish会被提示要求输入 API 密钥。
API Key for publisher '<publisher id>': ****************************************************
...Version 1.0.0 Published.
See it here: https://registry.comfy.org/publisherId/your-node选项 2: Github Actions
通过 Github Actions 自动发布您的节点。
设置一个 Github Secret
前往 Settings -> Secrets and Variables -> Actions -> Under Secrets Tab and Repository secrets -> New Repository Secret.
创建一个名为 REGISTRY_ACCESS_TOKEN 的 secret 并存储您的 API 密钥作为值。
创建一个 Github Action
复制下面的代码并粘贴到 /.github/workflows/publish_action.yml
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "pyproject.toml"
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@main
with:
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }} ## Add your own personal access token to your Github Repository secrets and reference it here.测试 Github Action
推送到您的 pyproject.toml 的版本号。您应该在注册表中看到您的更新节点。
官方原文
本页来自 Comfy-Org 官方中文文档的固定版本,并转换为 xueai 静态页面。内容以官方持续更新的页面为准。