> ## 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.

# RecraftReplaceBackgroundNode - ComfyUI Built-in Node Documentation

> 根据提供的提示词替换图像背景。

根据提供的提示词替换图像背景。此节点使用 Recraft API 根据您的文本描述为图像生成新背景，让您能够完全替换背景，同时保持主体完整。输入批次中的每个图像会分别处理，结果会合并为单个输出批次。

## 输入

| 参数 | 描述 | 数据类型 | 必填 | 范围 |
| - | - | - | - | - |
| `图像` | 要处理的输入图像 | IMAGE | 是 | - |
| `提示词` | 用于图像生成的提示词（默认：空） | STRING | 是 | - |
| `数量` | 要生成的图像数量（默认：1） | INT | 是 | 1-6 |
| `种子` | 用于确定节点是否重新运行的种子；无论种子如何，实际结果都是非确定性的（默认：0） | INT | 是 | 0-18446744073709551615 |
| `recraft 风格` | 用于生成背景的可选风格选择。如果未提供，则默认为 "realistic\_image" 风格 | STYLEV3 | 否 | - |
| `反向提示词` | 对图像中不想要元素的可选文本描述（默认：空） | STRING | 否 | - |

**备注：**

* `seed` 参数控制节点何时重新执行，但由于外部 API 的性质，并不保证结果确定。
* 当 `recraft_style` 未连接或留空时，节点会回退到 `realistic_image` 风格。
* 当 `negative_prompt` 留空时，它不会随请求发送。

## 输出

| 输出名称 | 描述 | 数据类型 |
| - | - | - |
| `IMAGE` | 替换背景后生成的图像。对于每个输入图像，生成结果的数量由 `n` 决定。 | IMAGE |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/RecraftReplaceBackgroundNode/zh.md)

***

**Source fingerprint (SHA-256):** `45a2607ae73cc67caa98d33bf536feda83a2021d960dec7cca76cbe0b9fc47ef`


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