About FLUX.1 Kontext Dev
FLUX.1 Kontext Black Forest Labs is a breakthrough multimodal image editing model that supports simultaneous text and image input, and intelligently understands the context of an image and makes precise edits. The development version is an open source diffusion with 12 billion parameters. transformer The model has excellent contextual understanding and character consistency maintenance capabilities, ensuring that character features, composition layout and other key elements remain stable after multiple iterations of editing.
It shares the same core functionality as the FLUX.1 Kontext suite: the
- Role consistency (Character Consistency): Preserving unique elements of an image across multiple scenes and environments, such as characters or objects in a reference image.
- Editing: Making targeted changes to specific elements of an image without affecting other parts.
- Style Reference: Generates novel scenes based on textual cues, while preserving the unique style of the reference image.
- Interactive Speed: Very low latency in image generation and editing.
While previously released versions of the API offer the highest fidelity and speed, FLUX.1 Kontext [Dev] runs entirely on the local machine, providing unrivaled flexibility for developers, researchers, and advanced users wishing to experiment.
version information
- FLUX.1 Kontext [pro] - Commercial version, specializing in rapid iterative editing
- FLUX.1 Kontext [max] - Experimental version, with enhanced cue word compliance
- FLUX.1 Kontext [dev] - Open source version (used in this tutorial), 12 billion parameters, mainly used for research
Currently in ComfyUI In this case, you can use all of these versions, of which Pro and Max versionsIt can be called from the API node, and for the Dev open source version please refer to the instructions in this guide.
Workflow description
In this tutorial, we introduce two types of workflows, which are essentially the same.
- One is the use of FLUX.1 Kontext Image Edit Group node workflows for cleaner interface and workflow reuse
- The other is a workflow that does not use group nodes, showing the complete original workflow.
The main advantage of using group nodes is the simplicity of the workflow - you can reuse group nodes for complex workflows and quickly reuse groups of nodes. In addition, in the new version of the front-end, we have added the ability to quickly add group nodes to Flux.1 Kontext Dev.
This feature is currently experimental and may be adjusted in future versions.
If you find that nodes are missing when loading the workflow file below, the following conditions may exist.
- You are not using the latest ComfyUI development (Nightly) version.
- You are using the stable (Release) or desktop version of ComfyUI (which does not include the latest feature updates).
- You are using the latest version of ComfyUI Commit, but some node imports fail at startup.
Please make sure you have successfully updated ComfyUI to the latest development (Nightly) version. See also. How to update ComfyUI Learn how to update ComfyUI in the section.
Model Download
To successfully run the workflows in this guide, you will first need to download the following model files. You can also get the model download link directly from the corresponding workflow, which already contains the model file download information.
diffusion model
If you want to use the original weights, you can obtain and use the original model weights by visiting the Black Forest Labs repository.
VAE
text encoder
Model Save Location
📂 ComfyUI/
├── 📂 models/
│ ├── 📂 diffusion_models/
│ │ └── flux1-dev-kontext_fp8_scaled.safetensors
│ ├── 📂 vae/
│ │ └── ae.safetensor
│ └── 📂 text_encoders/
│ ├── clip_l.safetensors
│ └── t5xxl_fp16.safetensors or t5xxl_fp8_e4m3fn_scaled.safetensors
Flux.1 Kontext Dev Foundation Workflow
This workflow is a normal workflow, but it uses the Load Image(from output)
node to load the image to be edited, making it easier to access edited images for multiple rounds of editing.
1. Workflow and input image downloads
Download the following files and drag them into ComfyUI to load the appropriate workflow.
input image
2. Progressive completion of the workflow
You can complete the workflow run by referring to the figures in the diagram:.
- exist
Load Diffusion Model
In nodes, loadingflux1-dev-kontext_fp8_scaled.safetensors
mould - exist
DualCLIP Load
node, make sure theclip_l.safetensors
cap (a poem)t5xxl_fp16.safetensors
maybet5xxl_fp8_e4m3fn_scaled.safetensors
- exist
Load VAE
node, make sure theae.safetensors
mould - exist
Load Image(from output)
In the node, load the provided input image - exist
CLIP Text Encode
In node, change prompt word, English only - strike (on the keyboard)
Queue
button, or use the shortcut keyCtrl(cmd) + Enter
Running a workflow
Flux.1 Kontext Dev Grouping Workflow
This workflow uses the FLUX.1 Kontext Image Edit Group nodes, making the interface and workflow reuse more concise.
This example also uses two images as input, using the Image Stitch
The node merges the two images into one, and then edits them using Flux.1 Kontext.
1. Workflow and input image downloads
Download the following files and drag them into ComfyUI to load the appropriate workflow.
input image
2. Progressive completion of the workflow
You can complete the workflow run by referring to the figures in the diagram:.
- exist
Load VAE
In nodes, loadingae.safetensors
mould - exist
Load Image
In the node, the first input image provided is loaded - exist
Load Image
In the node, load the second input image provided - Since other models and related nodes are already packaged in the group node, you need to follow the references in the step-by-step diagram to ensure that the appropriate models are loaded correctly and to write the prompts.
- strike (on the keyboard)
Queue
button, or use the shortcut keyCtrl(cmd) + Enter
Running a workflow
Flux Kontext Cueing Tips
1. Basic modifications
- Simple and straightforward.
"将汽车颜色更改为红色"
- Maintaining Style.
"更改为白天, 同时保持绘画的相同风格"
2. Migration of styles
Principles.
- Clarify naming style.
"转换为包豪斯艺术风格"
- Descriptive features.
"转换为具有可见笔触、厚重颜料质感的油画"
- Retained Composition.
"更改为包豪斯风格, 同时保持原始构图"
3. Role coherence
FRAME.
- Specific description.
"有黑色短发的女人"
Not "she." - Retained characteristics.
"同时保持相同的面部特征、发型和表情"
- Step-by-step modification: first change the background, then change the action.
4. Text editing
- Use of quotation marks.
"将 'joy' 替换为 'BFL'"
- Maintain format.
"替换文本, 同时保持相同的字体风格"
Solutions to Common Problems
Excessive role changes
❌ Error. "将人物转换为维京人"
✅ Correct. "将服装更改为维京战士风格, 同时保留面部特征"
Compositional position changes
❌ Error. "把他放在沙滩上"
✅ Correct. "将背景更改为海滩, 同时保持人物在完全相同的位置、比例和姿势"
Inaccurate application of style
❌ Error. "把它变成素描"
✅ Correct. "转换为具有自然石墨线条、交叉排线和可见纸张纹理的铅笔素描"
Core principles
- clear and specific - Use precise descriptions, avoid vague terms
- step by step editor - Break down complex modifications into multiple simple steps
- Explicit reservations - What elements of the declaration should remain unchanged
- Verb Selection - Use of "change", "replace" instead of "convert"
Best Practice Templates
Object Modification. "将 [对象] 更改为 [新状态], 保持 [要保留的内容] 不变"
Style Migration. "转换为 [特定风格], 同时保持 [构图/角色/其他] 不变"
Background Replacement. "将背景更改为 [新背景], 保持主体在完全相同的位置和姿势"
Text Editor. "将 '[原始文本]' 替换为 '[新文本]', 保持相同的字体风格"
Remember. Kontext is good at understanding detailed instructions and maintaining consistency.