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

# RecraftV4TextToImageNode - ComfyUI Built-in Node Documentation

> 使用 Recraft V4 和 V4.1 模型根据文本提示词生成图像。

使用 Recraft V4 和 V4.1 模型根据文本提示词生成图像。它会将提示词和所选设置发送到 Recraft API，并返回生成的一张或多张图像。如果使用了风格参考图像，还会返回创建的风格 ID。

## 输入

### 通用输入

| 参数 | 描述 | 数据类型 | 必需 | 范围 |
| - | - | - | - | - |
| `model` | 用于生成的模型。recraftv4\_styles 模型专为风格一致的生成而构建，并且始终需要 `style_id` 或 `style_references`。`recraftv4_1_flash` 是最快且最便宜的模型，完全不支持风格。 | DYNAMIC\_COMBO | 是 | "recraftv4\_1"<br />"recraftv4\_1\_flash"<br />"recraftv4\_1\_utility"<br />"recraftv4\_1\_pro"<br />"recraftv4\_1\_utility\_pro"<br />"recraftv4"<br />"recraftv4\_pro"<br />"recraftv4\_styles"<br />"recraftv4\_styles\_pro" |
| `prompt` | 用于图像生成的提示词。最多 10,000 个字符。 | STRING | 是 | 1 到 10000 个字符 |
| `negative_prompt` | 此输入会被忽略：Recraft V4 和 V4.1 模型不支持负面提示词。 | STRING | 是 | N/A |
| `n` | 要生成的图像数量（默认值：1）。 | INT | 是 | 1 到 6 |
| `seed` | 用于确定节点是否应重新运行的种子；无论种子如何，实际结果都是不确定的（默认值：0）。 | INT | 是 | 0 到 18446744073709551615 |
| `recraft_controls` | 可选，通过 Recraft Controls 节点对生成过程进行额外控制。 | CUSTOM | 否 | N/A |
| `style_id` | 要应用的 Recraft V4 风格的 UUID，例如来自 Recraft V4 Create Style 节点或上一次运行的 `style_id` 输出。不能与 `style_references` 组合使用（默认值：空）。 | STRING | 否 | 有效的 UUID 字符串 |
| `style_match` | 遵循风格的程度：precise 会详细复现风格，flexible 则匹配整体外观。仅在提供风格时使用（默认值："precise"）。 | COMBO | 否 | "precise"<br />"flexible" |

### recraftv4\_1、recraftv4\_1\_flash、recraftv4\_1\_utility、recraftv4 和 recraftv4\_styles 输入

这些模型共享相同的 `size` 参数。

| 参数 | 描述 | 数据类型 | 必需 | 范围 |
| - | - | - | - | - |
| `size` | 生成图像的大小（默认值："1024x1024"）。 | COMBO | 是 | 多个可用选项（标准 Recraft V4 尺寸；包含 "1024x1024"） |

### recraftv4\_1\_pro、recraftv4\_1\_utility\_pro、recraftv4\_pro 和 recraftv4\_styles\_pro 输入

这些模型共享相同的 `size` 参数。

| 参数 | 描述 | 数据类型 | 必需 | 范围 |
| - | - | - | - | - |
| `size` | 生成图像的大小（默认值："2048x2048"）。 | COMBO | 是 | 多个可用选项（pro Recraft V4 尺寸；包含 "2048x2048"） |

### 参考输入

| 参数 | 描述 | 数据类型 | 必需 | 范围 |
| - | - | - | - | - |
| `style_references` | 用于即时创建风格的参考图像，会在生成费用之外另行计费。创建的风格会作为 `style_id` 返回以便复用。不能与 `style_id` 组合使用。可扩展插槽：连接 1..N 张图像（`style_reference_1`、`style_reference_2`、...）。 | IMAGE | 否 | 0 到 Recraft API 允许的最大参考图像数量；总编码大小不得超过 10 MB |

**注意：** `size` 参数是一个动态输入，其可用选项会根据所选的 `model` 而变化。`recraftv4_styles` 和 `recraftv4_styles_pro` 模型始终需要风格：连接风格参考图像或提供 `style_id`。`style_id` 和 `style_references` 输入互斥——只能提供其中一个。`style_id` 必须是有效的 UUID。仅在提供风格时才会使用 `style_match` 输入。风格参考图像会在生成费用之外另行计费，并且其总编码大小不得超过 10 MB。`seed` 值不保证图像输出可复现。如果使用来自 Infinite Style Library 的风格 ID，请确保它不是 Vector art 风格，因为这可能会返回 SVG 数据而不是图像。

## 输出

| 输出名称 | 描述 | 数据类型 |
| - | - | - |
| `output` | 生成的图像或图像批次。 | IMAGE |
| `style_id` | 本次生成使用或创建的风格 ID。当提供风格参考图像时，创建的风格会在此返回以便复用；未使用风格时为空字符串。 | STRING |

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

***

**Source fingerprint (SHA-256):** `690286e663f27b525e58f81a7f883e490dacd48c1a34ee7b8e9ad4efd9935ff1`


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