本文将介绍如何在 ComfyUI 中使用 Flux.1 Kontext Pro Image API 节点来完成图像编辑功能
Image Stitch
节点,将允许你将多张图像拼接成一张图像,并使用 Flux.1 Kontext 进行编辑。
metadata
中已经包含工作流信息,请下载并拖入 ComfyUI 中加载对应工作流。
Load image
节点中请分别上传提供的图片Flux.1 Kontext Pro Image
修改必要的参数:
prompt
输入你想要编辑的图像的提示词aspect_ratio
设置原图的高宽比,比例必须在 1:4 到 4:1 之间prompt_upsampling
设置是否使用提示词上采样,如果开启,会自动修改提示词以获得更丰富的结果,但结果是不可重复的Run
按钮,或者使用快捷键 Ctrl(cmd) + Enter(回车)
来执行图像的编辑。Save Image
节点中查看编辑后的图像,对应的图像也会被保存至 ComfyUI/output/
目录下。metadata
中已经包含工作流信息,请下载并拖入 ComfyUI 中加载对应工作流。
Load Image
节点中加载需要编辑的图像Flux.1 Kontext Pro Image
修改必要的参数Run
按钮,或者使用快捷键 Ctrl(cmd) + Enter(回车)
来执行图像的编辑。Save Image
节点中查看编辑后的图像,对应的图像也会被保存至 ComfyUI/output/
目录下。metadata
中已经包含工作流信息,请下载并拖入 ComfyUI 中加载对应工作流。
Load Image
节点中加载需要编辑的图像Flux.1 Kontext Max Image
修改必要的参数Run
按钮,或者使用快捷键 Ctrl(cmd) + Enter(回车)
来执行图像的编辑。Save Image
节点中查看编辑后的图像,对应的图像也会被保存至 ComfyUI/output/
目录下。"Change the car color to red"
"Change to daytime while maintaining the same style of the painting"
"Transform to Bauhaus art style"
"Transform to oil painting with visible brushstrokes, thick paint texture"
"Change to Bauhaus style while maintaining the original composition"
"The woman with short black hair"
而非"she"
"while maintaining the same facial features, hairstyle, and expression"
"Replace 'joy' with 'BFL'"
"Replace text while maintaining the same font style"
"Transform the person into a Viking"
✅ 正确:"Change the clothes to be a viking warrior while preserving facial features"
"Put him on a beach"
✅ 正确:"Change the background to a beach while keeping the person in the exact same position, scale, and pose"
"Make it a sketch"
✅ 正确:"Convert to pencil sketch with natural graphite lines, cross-hatching, and visible paper texture"
"Change [object] to [new state], keep [content to preserve] unchanged"
风格转换:
"Transform to [specific style], while maintaining [composition/character/other] unchanged"
背景替换:
"Change the background to [new background], keep the subject in the exact same position and pose"
文本编辑:
"Replace '[original text]' with '[new text]', maintain the same font style"
记住: 越具体越好,Kontext 擅长理解详细指令并保持一致性。