最近Flux发布了Kontext dev免费开源版,这个工具非常强大,可以轻松实现一句话P图功能。

其中,就可以实现去除水印。

以马拉松赛事照片为例,大多数赛事会提供免费的带水印的照片,如果想要原版,则需要支付一笔费用,通常不算多,我会尽可能的多买几张。

有了Kontext Dev之后,这种生意可能就大受影响了。

可以看到,P图效果近乎完美(极小瑕疵很难分辨),原图中不存在的树枝都P的像模像样。

1、模型下载

该功能用到Flux常用模型,包括Clip、VAE。

然后需要一个单独的Kontext dev模型。

模型和工作流下载(工作流一个是基础版,一个是带DeepSeek中文翻译版):

https://pan.quark.cn/s/2fe6306a2718

网盘只提供了UNET模型下载,其他常见模型就不提供了。

2、工作流基本介绍

如果英文水平足够,使用基础版即可,如果水平略差,可以用我的DeepSeek中文版。

增加了一个DeepSeek的API节点,可以把中文翻译成英文再送给Flux Kontext dev。

(1)DeepSeek申请API

申请地址(需付费,如果只是翻译用,充10块就够用好几年了):

https://platform.deepseek.com/api_keys

充值后,点击创建API Key,可以获得sk-开头的一组代码,复制下来(建议额外保存一份,因为创建后就不可见了,容易忘)。

(2)打开DeepSeek的节点配置文件

ComfyUI\custom_nodes\Comfyui-Deepseek

找到config.json文件,用记事本打开,

把复制的API贴到引号内即可。

(3)模型加载

本文提供下载的是FP8版,适合24G以下的较小显存(实测12G可跑)。

UNET使用flux1-dev-kontext_fp8_scaled.safetensors

CLIP1使用clip_l.safetensors

CLIP2使用t5xxl_fp8_e4m3fn_scaled.safetensors

VAE使用Flux的标准VAE ae.sft

(4)加载图片

该工作流支持多图片输入模式,默认仅显示一张,其余的可以都接入image2节点。

3、常见功能演示

(1)画面改漫画

提示词:

推荐使用DeepSeek翻译节点:

请翻译成英文:把图片变成日本漫画风格,黑白,单色,黑色色块涂色,细腻的排线,三浦健太郎漫画风格

(2)画面转成吉卜力风格

(3)画面增加其他要素

(4)两张图片要素融合

(5)去除水印

(6)更换发型

4、官方Flux Kontext 提示词技巧

使用英文

(1)基础修改

– 简单直接:`”Change the car color to red”`

– 保持风格:`”Change to daytime while maintaining the same style of the painting”`

(2)风格转换

**原则:**

– 明确命名风格:`”Transform to Bauhaus art style”`

– 描述特征:`”Transform to oil painting with visible brushstrokes, thick paint texture”`

– 保留构图:`”Change to Bauhaus style while maintaining the original composition”`

(3)角色一致性

**框架:**

– 具体描述:`”The woman with short black hair”`而非`”她”`

– 保留特征:`”while maintaining the same facial features, hairstyle, and expression”`

– 分步修改:先改背景,再改动作

(4)文本编辑

– 使用引号:`”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”`

## 核心原则

(1) **具体明确** – 使用精确描述,避免模糊词汇

(2)**分步编辑** – 复杂修改分为多个简单步骤

(3)**明确保留** – 说明哪些要保持不变

(4)**动词选择** – 用”更改”、”替换”而非”转换”

## 最佳实践模板

**对象修改:**

`”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 擅长理解详细指令并保持一致性。

最后重复:

模型和工作流下载(工作流一个是基础版,一个是带DeepSeek中文翻译版):

https://pan.quark.cn/s/2fe6306a2718

网盘只提供了UNET模型下载,其他常见模型就不提供了。