> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-custom-nodes-sdk-v2-frontend.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Luma Image to Image 合作节点 ComfyUI 官方示例

> 本指南介绍如何在 ComfyUI 中使用 Luma Image to Image 合作节点

Luma Image to Image 节点允许你借助 Luma AI 技术，根据文本提示修改现有图像，同时保留原始图像的某些特征和结构。

## Luma Image to Image 擅长什么

* **提示词驱动的图像编辑**：根据文本提示修改现有图像，同时保留原始图像的某些特征和结构
* **更改物体和形状**：此节点在更改物体和形状方面效果很好，但对于颜色更改可能不太理想
* **可调的输入影响力**：`image_weight` 参数控制输入图像对结果的塑造程度，值越低越接近原始图像

## 示例输出

以下是在不同 `image_weight` 值下的结果，展示了输入图像对生成结果的影响程度：

<img src="https://mintcdn.com/dripart-docs-custom-nodes-sdk-v2-frontend/h7WtCFJIDzeC2ttN/images/tutorial/api_nodes/luma/i2i_image_weight.jpg?fit=max&auto=format&n=h7WtCFJIDzeC2ttN&q=85&s=aea841accb60e7be513cb3e445ea0be3" alt="权重对比" width="3150" height="1173" data-path="images/tutorial/api_nodes/luma/i2i_image_weight.jpg" />

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

## Luma Image to Image 合作节点工作流

<Tip>
  此功能在更改物体和形状方面效果很好。不过，对于颜色更改可能不太理想。我们建议使用较低的权重值，大约在 0.0 到 0.1 之间。
</Tip>

### 1. 下载工作流文件

下载以下图像并将其拖入 ComfyUI 以加载工作流（工作流信息包含在图像元数据中）：

![Luma Image to Image 工作流](https://raw.githubusercontent.com/Comfy-Org/example_workflows/main/api_nodes/luma/i2i/luma_i2i.png)

下载此图像用作输入：

![Luma Image to Image 工作流输入图像](https://raw.githubusercontent.com/Comfy-Org/example_workflows/main/api_nodes/luma/i2i/input.png)

### 2. 完成工作流步骤

<img src="https://mintcdn.com/dripart-docs-custom-nodes-sdk-v2-frontend/h7WtCFJIDzeC2ttN/images/tutorial/api_nodes/luma/luma_i2i_step_guide.jpg?fit=max&auto=format&n=h7WtCFJIDzeC2ttN&q=85&s=9f7ecf038145d16549e864b539d8050f" alt="Luma Image to Image 工作流步骤图" width="2577" height="1139" data-path="images/tutorial/api_nodes/luma/luma_i2i_step_guide.jpg" />

按照以下编号步骤操作：

1. 在 `Load Image` 节点上点击 **Upload** 以上传你的输入图像
2. （可选）修改工作流提示词
3. （可选）调整 `image_weight` 以改变输入图像的影响程度（值越小，越接近原始图像）
4. 点击 `Run` 或使用快捷键 `Ctrl(cmd) + Enter` 生成图像
5. API 返回结果后，在 `Save Image` 节点中查看生成的图像。图像将保存到 `ComfyUI/output/` 目录中

### 3. 不同 `image_weight` 值的结果

<img src="https://mintcdn.com/dripart-docs-custom-nodes-sdk-v2-frontend/h7WtCFJIDzeC2ttN/images/tutorial/api_nodes/luma/i2i_image_weight.jpg?fit=max&auto=format&n=h7WtCFJIDzeC2ttN&q=85&s=aea841accb60e7be513cb3e445ea0be3" alt="权重对比" width="3150" height="1173" data-path="images/tutorial/api_nodes/luma/i2i_image_weight.jpg" />
