> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-chore-sync-comfy-api-v2-spec-d5155ac.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ComfyUI 中的 Bria 背景移除

> 学习如何在 ComfyUI 中使用 Bria 合作伙伴节点进行图片和视频背景移除、绿幕抠像和背景替换。

Bria 的 AI 背景处理模型现已通过合作伙伴节点在 ComfyUI 中使用。本文将介绍**图片背景移除**、**视频背景移除**、**透明视频背景**、**视频绿幕**和**视频背景替换**功能。

<Tip>
  使用 API 节点需要保证你已经正常登录，并在受许可的网络环境下使用，请参考[API 节点总览](/zh/tutorials/partner-nodes/overview)部分文档来了解使用 API 节点的具体使用要求。
</Tip>

<Tip>
  <Tabs>
    <Tab title="本地用户">
      请确保你的 ComfyUI 已经更新。

      * [ComfyUI 下载](https://www.comfy.org/download)
      * [ComfyUI 更新教程](/zh/installation/update_comfyui)

      本指南里的工作流可以在[工作流模板](/zh/interface/features/template)中找到。如果找不到，可能是 ComfyUI 没有更新。

      如果加载工作流时有节点缺失，可能原因有：

      1. 你用的不是最新版（每夜版）。
      2. 启动时有些节点导入失败。
    </Tab>

    <Tab title="云端用户">
      * [Cloud](https://cloud.comfy.org) 会在 ComfyUI 稳定版本发布后更新。

      所以，如果你发现本文档中有任何核心节点缺失，可能是因为新核心节点尚未在最新稳定版中发布。请等待下一个稳定版发布。
    </Tab>
  </Tabs>
</Tip>

<h3 id="utility_bria_remove_image_background">
  Bria：移除图片背景
</h3>

上传一张图片，使用 Bria API 自动移除其背景。结果将返回为带透明背景的图片。

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/utility_bria_remove_image_background-1.webp" alt="Bria：移除图片背景工作流预览" />

<CardGroup cols={2}>
  <Card title="在 Comfy Cloud 上运行" icon="cloud" href="https://cloud.comfy.org/?template=utility_bria_remove_image_background&utm_source=docs&utm_medium=referral&utm_campaign=background-removal">
    在 Comfy Cloud 中打开
  </Card>

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/utility_bria_remove_image_background.json">
    下载 JSON 或在模板库中搜索 "Bria: Remove Image Background"
  </Card>
</CardGroup>

**输入材料**

将以下文件上传到对应的 `LoadImage` 节点：

<CardGroup cols={2}>
  <Card title="denim_girl.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/denim_girl.png">
    `LoadImage` 节点 26 · `denim_girl.png`
  </Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
  <img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/denim_girl.png" alt="输入图片" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />

  <img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/utility_bria_remove_image_background.png" alt="Bria：移除图片背景的示例输出" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
</div>

## 视频背景处理

Bria 的视频背景处理节点可以移除、替换或为视频背景应用色度键效果。输入视频时长不得超过 60 秒。

<h3 id="api_bria_remove_video_background">
  Bria：移除视频背景
</h3>

将视频背景替换为你选择的纯色。

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_bria_remove_video_background-1.webp" alt="Bria：移除视频背景工作流预览" />

<CardGroup cols={2}>
  <Card title="在 Comfy Cloud 上运行" icon="cloud" href="https://cloud.comfy.org/?template=api_bria_remove_video_background&utm_source=docs&utm_medium=referral&utm_campaign=background-removal">
    在 Comfy Cloud 中打开
  </Card>

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_bria_remove_video_background.json">
    下载 JSON 或在模板库中搜索 "Bria: Remove Video Background"
  </Card>
</CardGroup>

**输入材料**

将以下文件上传到对应的 `LoadVideo` 节点：

<CardGroup cols={2}>
  <Card title="spear_warrior.mp4" icon="video" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/spear_warrior.mp4">
    `LoadVideo` 节点 4 · `spear_warrior.mp4`
  </Card>
</CardGroup>

<h3 id="api_bria_remove_video_background_transparent">
  Bria：移除视频背景（透明）
</h3>

移除视频背景并输出为透明背景视频。

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_bria_remove_video_background_transparent-1.webp" alt="Bria：移除视频背景（透明）工作流预览" />

<CardGroup cols={2}>
  <Card title="在 Comfy Cloud 上运行" icon="cloud" href="https://cloud.comfy.org/?template=api_bria_remove_video_background_transparent&utm_source=docs&utm_medium=referral&utm_campaign=background-removal">
    在 Comfy Cloud 中打开
  </Card>

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_bria_remove_video_background_transparent.json">
    下载 JSON 或在模板库中搜索 "Bria: Remove Video Background (Transparent)"
  </Card>
</CardGroup>

**输入材料**

将以下文件上传到对应的 `LoadVideo` 节点：

<CardGroup cols={2}>
  <Card title="ad_video_demo.mp4" icon="video" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/ad_video_demo.mp4">
    `LoadVideo` 节点 5 · `ad_video_demo.mp4`
  </Card>
</CardGroup>

<h3 id="api_bria_video_green_screen">
  Bria：视频绿幕
</h3>

为视频应用专业的色度键绿幕或蓝幕效果，提供多种预设选项，包括 broadcast\_green、chroma\_green 和 blue\_screen。

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_bria_video_green_screen-1.webp" alt="Bria：视频绿幕工作流预览" />

<CardGroup cols={2}>
  <Card title="在 Comfy Cloud 上运行" icon="cloud" href="https://cloud.comfy.org/?template=api_bria_video_green_screen&utm_source=docs&utm_medium=referral&utm_campaign=background-removal">
    在 Comfy Cloud 中打开
  </Card>

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_bria_video_green_screen.json">
    下载 JSON 或在模板库中搜索 "Bria: Video Green Screen"
  </Card>
</CardGroup>

**输入材料**

将以下文件上传到对应的 `LoadVideo` 节点：

<CardGroup cols={2}>
  <Card title="investigator.mp4" icon="video" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/investigator.mp4">
    `LoadVideo` 节点 5 · `investigator.mp4`
  </Card>
</CardGroup>

<h3 id="api_bria_video_replace_background">
  Bria：替换视频背景
</h3>

将视频背景替换为自定义图片或其他视频。

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_bria_video_replace_background-1.webp" alt="Bria：替换视频背景工作流预览" />

<CardGroup cols={2}>
  <Card title="在 Comfy Cloud 上运行" icon="cloud" href="https://cloud.comfy.org/?template=api_bria_video_replace_background&utm_source=docs&utm_medium=referral&utm_campaign=background-removal">
    在 Comfy Cloud 中打开
  </Card>

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_bria_video_replace_background.json">
    下载 JSON 或在模板库中搜索 "Bria: Video Replace Background"
  </Card>
</CardGroup>

**输入材料**

将以下文件上传到对应的 `LoadVideo` 和 `LoadImage` 节点：

<CardGroup cols={2}>
  <Card title="stained_window_vintage_woman.mp4" icon="video" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/stained_window_vintage_woman.mp4">
    `LoadVideo` 节点 4 · `stained_window_vintage_woman.mp4`
  </Card>

  <Card title="gothic_hall_light_rays.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/gothic_hall_light_rays.png">
    `LoadImage` 节点 8 · `gothic_hall_light_rays.png`
  </Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
  <img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/gothic_hall_light_rays.png" alt="gothic_hall_light_rays.png" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
</div>
