> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Ideogram 4.6：ComfyUI 原生 4K 文生图与编辑

> 在 ComfyUI 中运行 Ideogram 4.6，实现原生 4K 文生图、图像编辑与精确编辑，未改动的像素保持不变。

**Ideogram 4.6** 是 Ideogram 的图像生成与编辑模型，原生支持 4K 输出。它单次即可渲染至 4096x4096，因此海报、包装和产品图无需再单独放大。精确编辑会保留你未要求修改的像素的颜色与细节。

它作为模型选项运行在三个 ComfyUI 合作节点中：**Ideogram Text to Image**、**Ideogram Edit** 和 **Ideogram Precise Edit**。在任意一个节点中将 `model` 设为 `ideogram-4.6`；在同一列表中选择 `ideogram-4.5` 即可使用较早的模型，该模型有[独立页面](https://docs.comfy.org/zh/tutorials/partner-nodes/ideogram/ideogram-4-5.md)。

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

> [!TIP]
>
> > [tab] 本地用户
> >
> > 请确保你的 ComfyUI 已经更新。
> >
> > * [ComfyUI 下载](https://www.comfy.org/download)
> > * [ComfyUI 更新教程](https://docs.comfy.org/zh/installation/update_comfyui.md)
> >
> > 本指南里的工作流可以在[工作流模板](https://docs.comfy.org/zh/interface/features/template.md)中找到。如果找不到，可能是 ComfyUI 没有更新。
> >
> > 如果加载工作流时有节点缺失，可能原因有：
> >
> > 1. 你用的不是最新版（每夜版）。
> > 2. 启动时有些节点导入失败。
>
> > [tab] 云端用户
> >
> > * [Cloud](https://cloud.comfy.org) 会在 ComfyUI 稳定版本发布后更新。
> >
> > 所以，如果你发现本文档中有任何核心节点缺失，可能是因为新核心节点尚未在最新稳定版中发布。请等待下一个稳定版发布。

## 文生图

在 1K、2K 或 4K 画布上根据文本提示词生成图像。

![Ideogram 4.6 文本到图像工作流预览](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_ideogram_v4_6_t2i-1.webp)

> [card] [下载工作流](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_ideogram_v4_6_t2i.json)
>
> 下载 JSON，或在模板库中搜索 “Ideogram 4.6: Text to Image”

![Ideogram 4.6 文本到图像示例输出](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_ideogram_v4_6_t2i.png)

**Ideogram Text to Image** 节点接收以下输入：

| 输入 | 值 | 效果 |
| - | - | - |
| `prompt` | 最多 10000 个字符 | 图像描述。也可以使用结构化的 JSON 说明文字，例如之前某次运行得到的 `final_prompt` |
| `size` | `auto`、1K、2K 或 4K 预设，或 `custom` | `auto` 会选择适合提示词的画布。预设覆盖 1K、2K 和 4K 画布，从竖版 `1:3` 和 `9:23` 到横版 `3:1` 和 `23:9`，例如 `(2K) 2048x2048 (1:1)` 和 `(4K) 5120x2880 (16:9)` |
| `width`、`height` | 256 到 8192，步长 32 | 仅在 `size` 为 `custom` 时使用。两个维度必须保持在 16777216 像素（4096x4096）以内，且宽高比在 6:1 以内 |
| `quality` | `very_low`、`low`、`medium`（默认）、`high` | 更高的档位费用更高、耗时更长。`very_low` 限制为 4194304 像素（2048x2048） |
| `background` | `auto`（默认）、`opaque`、`transparent` | `transparent` 返回带 alpha 通道的图像，`opaque` 强制使用纯色背景，`auto` 跟随提示词 |
| `magic_prompt` | `auto`（默认）、`on`、`off` | 在生成之前将提示词改写为详细的结构化说明文字。`off` 会尽可能保留你的原始措辞 |
| `seed` | 整数 | 文生图无法仅凭种子复现，因为每次运行都会改写提示词 |

该节点还会输出 `final_prompt`，即生成图像时所用的结构化说明文字。要复现一张图像，请将该说明文字回填，并将 `magic_prompt` 设为 `off`，同时使用相同的种子。

## 图像编辑

用一条指令编辑或组合最多五张图像。`image_1` 是被编辑的图像，图像 2 到 5 提供设计、材质或颜色参考。在提示词中用 `@Image1`、`@Image2` 等来引用它们。

![Ideogram 4.6 图像编辑工作流预览](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_ideogram_v4_6_image_edit-1.webp)

> [card] [下载工作流](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_ideogram_v4_6_image_edit.json)
>
> 下载 JSON，或在模板库中搜索 "Ideogram 4.6: Image Edit"

**输入素材**

> [card] [retro\_crt\_room.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/retro_crt_room.png)
>
> 加载到 Ideogram Edit 节点的 `image_1` 槽位

该模板使用 **Build JSON Prompt** 节点来构建指令，因此你可以标记图像中的某个区域并为其添加说明。如果编辑器没有出现，请开启 [Nodes 2.0](https://docs.comfy.org/zh/interface/nodes-2.md)。

使用 `ideogram-4.6` 的 **Ideogram Edit** 节点新增了以下输入：

| 输入 | 取值 | 效果 |
| - | - | - |
| `size` | `auto`（默认）、`source`、预设值或 `custom` | `auto` 根据图像和提示词选取约 2K 的画布。`source` 保持 `image_1` 的尺寸。宽高比不同的预设值会重新构图场景。`custom` 使用下方的 `width` 和 `height` |
| `width`、`height` | 256 到 8192，步长 32 | 仅当 `size` 为 `custom` 时使用。两个维度必须保持在 16777216 像素（4096x4096）以内，且宽高比在 6:1 以内 |
| `quality` | `very_low`、`low`、`medium`（默认）、`high` | 档位越高，费用越高、耗时越长 |
| `background` | `auto`（默认）、`opaque`、`transparent` | `transparent` 返回带透明度通道的图像 |
| `seed` | 整数 | 相同的图像、提示词、设置和种子会得到相同的结果 |

超过 16.7 MP 或每边超过 8192 像素的输入在上传前会被缩小，且每张图像的宽高比必须介于 1:6 与 6:1 之间。

编辑会重新渲染整张图像，因此它可能连同编辑内容一起改变构图和未改动的区域。如果画面其余部分必须保持完全不变，请使用 Precise Edit。

## 精确编辑

仅更改提示词要求的内容。未触及的像素保持完全一致，输出尺寸与 `image_1` 保持一致；未指定区域且来源超过 16.7 MP 或单边超过 8192 像素时，来源会先被缩小。除正在编辑的图像外，最多接受四张参考图像；使用遮罩时最多接受三张。

![Ideogram 4.6 精准编辑工作流预览](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_ideogram_v4_6_precise_image_edit-1.webp)

> [card] [下载工作流](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_ideogram_v4_6_precise_image_edit.json)
>
> 下载 JSON，或在模板库中搜索“Ideogram 4.6 Precise Edit”

**输入素材**

> [card] [carbon\_fibre\_controller.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/carbon_fibre_controller.png)
>
> 加载到 Ideogram Precise Edit 节点的 `image_1` 槽位中

精准编辑与 Edit 共用参考槽位、`@Image1` 寻址、`quality` 和 `seed` 控件。它没有尺寸控件：指定区域时，输出保持 `image_1` 的尺寸；未指定区域时，若来源图像超过 16.7 MP 或单边超过 8192 像素，则会先被缩小。

### 只编辑单个区域

设置 `context_window` 即可按原生分辨率编辑一个区域：

| `context_window` | 额外输入 | 被编辑的区域 |
| - | - | - |
| `none` | none | 整张图像，超过 16.7 MP 时会缩小 |
| `auto`（默认） | `mask` | 遮罩标记的区域；未连接遮罩时为整张图像 |
| `custom` | `context_window_bboxes` | 包围所有已连接框的一个外接矩形（包含分隔框之间的空间，且该空间也可能被编辑），例如来自 **创建边界框** 节点 |

区域单边最大可达 8192 像素，面积约 16.7 MP，宽高比最高为 6:1。指定区域时，`image_1` 本身可以在任意宽高比下达到 8192x8192 像素，区域外的像素会原样复制。

它适用于产品换色、材质替换，以及必须保持照片其余部分光照、背景和构图不变的修饰。

## 开始使用

1. 将 ComfyUI 更新到最新版本。
2. 打开 **工作流** > **浏览模板**，搜索 "Ideogram 4.6"，或下载上方的工作流并将其拖到画布上。
3. 如果你是从 Ideogram 4.5 工作流开始的，请在节点中将 `model` 设置为 `ideogram-4.6`。


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