> ## 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 Vector 1：ComfyUI 文本转 SVG 与图像转 SVG

> 使用 ComfyUI 中的 Ideogram Vector 1 合作节点，将提示词或位图转换为可编辑的 SVG 文件，支持最多五张参考图像和细节模式。

**Ideogram Vector 1** 返回的是矢量图形而非像素。输出为 SVG 文件，可在 Illustrator、Figma、Inkscape 或浏览器中打开，并在任意尺寸下逐条路径编辑。

ComfyUI 通过两个合作节点提供该功能。**Ideogram Vector Generate SVG** 根据文本提示词绘制图形，可选地由最多五张参考图像引导。**Ideogram Vector Image to SVG** 则将已有的位图描摹为路径。两者都是云端 API 节点：需要拥有积分余额的 Comfy 账户，不下载任何模型文件，并通过工作流末端的保存 SVG 节点写出结果。

两个节点都适用于标志、海报、扁平插画、图案和线稿，Text to SVG 还可以依据提示词渲染文字。

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

> [!TIP]
>
> **本地用户**
>
> 请确保你的 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. 启动时有些节点导入失败。
>
> **云端用户**
>
> * [Cloud](https://cloud.comfy.org) 会在 ComfyUI 稳定版本发布后更新。
>
> 所以，如果你发现本文档中有任何核心节点缺失，可能是因为新核心节点尚未在最新稳定版中发布。请等待下一个稳定版发布。

## 可用工作流

### 文本生成 SVG

描述画面内容，节点就会返回一个可编辑的 SVG。参考图像是可选的，但它们是向结果中带入风格、配色或版式的途径。

![Ideogram Vector 1 根据文本提示词生成的 SVG 海报示例](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_ideogram_vector_1_text_to_svg-1.webp)

> **[在 Comfy Cloud 上运行](https://cloud.comfy.org/?template=api_ideogram_vector_1_text_to_svg\&utm_source=docs\&utm_medium=referral\&utm_campaign=ideogram-vector)**
>
> 在 Comfy Cloud 中打开

> **[下载工作流](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_ideogram_vector_1_text_to_svg.json)**
>
> 下载 JSON，或在模板库中搜索 "Ideogram Vector 1: Text to SVG"

**输入素材**

> **[academic-svg.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/academic-svg.png)**
>
> 加载到 `LoadImage` 节点作为风格参考

**示例提示词**

* `Flat vector badge of a mountain range inside a circle, three colors, heavy outlines, no gradients`
* `Vintage travel poster of a coastal town at golden hour, layered flat shapes with fine hatching, warm cream and terracotta palette, condensed serif lettering 'COSTIERA AMALFITANA' across the bottom`
* `Minimal line art icon of a coffee cup with steam, single weight stroke, transparent background`

最多可连接五张图像作为 `ref_image_1` 到 `ref_image_5`，并在提示词中以 `@Image1`、`@Image2` 等方式引用它们。图像 1 是主要来源，其余为额外参考。

### 图像生成 SVG

将位图描摹为路径。节点会读取图片中的一切内容，包括颗粒、渐变和杂乱的背景，因此大面积纯色、干净的来源图像描摹效果最好。照片也可以处理，但会被转换成成千上万条难以手工编辑的小路径。

![Ideogram Vector 1 从位图描摹得到的 SVG 示例](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/api_ideogram_vector_1_image_to_svg-1.webp)

> **[在 Comfy Cloud 上运行](https://cloud.comfy.org/?template=api_ideogram_vector_1_image_to_svg\&utm_source=docs\&utm_medium=referral\&utm_campaign=ideogram-vector)**
>
> 在 Comfy Cloud 中打开

> **[下载工作流](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_ideogram_vector_1_image_to_svg.json)**
>
> 下载 JSON，或在模板库中搜索 "Ideogram Vector 1: Image to SVG"

**输入素材**

> **[kid\_onknight\_dragon.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/kid_onknight_dragon.png)**
>
> 加载到 `LoadImage` 节点

`mode` 决定保留多少细节。`simple` 描摹出更少、更大的色块，得到更轻、更扁平的 SVG。`default` 保留更精细的细节和更多色块，因此结果更接近来源图像。批处理多张图像时，每张图像会生成一个 SVG。

## 节点控制

| 控件 | 值 | 适用于 | 效果 |
| - | - | - | - |
| `model` | `ideogram-vector-1` | 两个节点 | Ideogram Vector 模型版本 |
| `prompt` | 文本，最多 9500 个字符 | Text to SVG | 绘图描述。支持 `@Image1` 风格的引用 |
| `images` | 最多 5 张图像（`ref_image_1` 至 `ref_image_5`） | Text to SVG | 参考图像。图像 1 是主要来源，其余为额外参考 |
| `aspect_ratio` | `auto`、`1:3`、`1:2`、`9:16`、`10:16`、`2:3`、`3:4`、`4:5`、`1:1`、`5:4`、`4:3`、`3:2`、`16:10`、`16:9`、`2:1`、`3:1` | Text to SVG | 画布形状。`auto` 跟随图像 1；未连接图像时则跟随提示词 |
| `quality` | `low`、`medium`（默认）、`high` | Text to SVG | 细节层级。层级越高，耗时越长，费用越高 |
| `seed` | 整数，默认固定 | Text to SVG | 相同的提示词、图像、设置和种子会生成相同的 SVG。可将其随机化以探索不同变体 |
| `image` | 一张或多张图像 | Image to SVG | 要描摹的位图 |
| `mode` | `default`（默认）、`simple` | Image to SVG | `simple` 保留更少、更大的形状；`default` 保留更精细的细节 |

## 提示技巧

* **描述图形，而非照片。** 形状、配色和构图决定结果：`flat badge, three colors, heavy outlines`。相机和镜头语言属于图像模型，在这里只会增加噪波。
* **用引号包裹文字。** `'COSTIERA AMALFITANA'` 会作为作品上的文本渲染，而未加引号的词通常会被理解为主体描述的一部分。
* **明确指定所需的图层。** 要求 `layered flat shapes with fine hatching` 或 `single weight stroke`，可告诉模型要绘制哪种矢量风格。
* **使用参考来统一风格。** 将 logo 或效果图作为 `ref_image_1`，比用文字描述更能保留配色和线宽。参考输入接收的是图像，若要复用之前的 SVG，请先将其导出为 PNG。
* **描摹时从干净的来源开始。** 纯色、锐利边缘且没有背景杂物，才能得到可编辑的文件。颗粒和渐变会变成路径噪波。
* **使用种子精确复现好结果。** 在相同的提示词、图像、设置和种子下，Text to SVG 会复现相同的 SVG。

## 开始使用

1. 更新 ComfyUI 至最新版本
2. 前往模板库，搜索 `Ideogram Vector`


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