跳转到主要内容
本指南详细介绍了如何将您自己的AI模型或GPU基础设施集成到Livepeer AI推理网络中。BYOC允许您使用自定义模型(例如ControlNet、Whisper、SegFormer)运行推理任务,将节点部署到云、边缘或本地环境中,并以经济激励方式提供Livepeer推理工作负载。
For full BYOC architecture, Gateway/Orchestrator roles, container lifecycle, and Protocol vs AI BYOC concepts, see the BYOC full guide.

要求

  • 具有GPU(CUDA 11+)的Linux或Docker支持的机器
  • 可访问互联网的IP或NAT穿透
  • Git、Python 3.9+;可选ComfyUI分支用于模块化任务
  • Livepeer网关凭据或用于工作器注册的API密钥

步骤 1 — 克隆和设置

git clone https://github.com/livepeer/comfystream
cd comfystream
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
安装您所需的推理模型(s):
python scripts/download.py --model whisper-large
python scripts/download.py --model sdxl

步骤 2 — 配置节点

编辑您的 config.yaml
publicKey: "0xYourEthereumAddress"
gatewayURL: "wss://gateway.livepeer.org"
models:
  - whisper-large
  - sdxl
heartbeat: true
可选:以 Docker 运行;添加插件适配器(例如 segment-anything, blip2)。

步骤 3 — 启动网关节点

python run.py --adapter grpc --gpu --model whisper-large
您应该会看到与 Livepeer 网关的心跳日志、任务声明和模型执行,以及结果上传或网络钩子。

步骤 4 — 注册(可选)

在链上注册您的节点 (Arbitrum),以便网关可以发现并为您分配工作:
livepeer-cli gateway register \
  --addr=1.2.3.4:5040 \
  --models=whisper-large,sdxl \
  --bond=100LPT \
  --region=NA1
合约和 ABI 引用在区块链合约文档的“关于/资源”部分。

管道示例

Whisper + 字幕叠加:
pipeline:
  - task: whisper-transcribe
  - task: overlay
    type: caption
模糊人脸 + YOLO:
pipeline:
  - task: object-detection
    model: yolov8
  - task: segment-blur
    target: faces

故障排除

IssueFix

开发人员笔记

  • BYOC 工作人员使用与 Livepeer 网络其余部分相同的网关协议。请参阅“关于”下的网络技术架构。
  • 您可以从多个地理区域提供服务。
  • 贡献奖励可能以 LPT 或积分形式提供;请查看论坛和开发者机会。

另请参见

资源

Last modified on March 1, 2026