FLUX.1 Kontext is a breakthrough multimodal image editing model from Black Forest Labs that supports simultaneous text and image input, intelligently understanding image context and performing precise editing. Its development version is an open-source diffusion transformer model with 12 billion parameters, featuring excellent context understanding and character consistency maintenance, ensuring that key elements such as character features and composition layout remain stable even after multiple iterative edits.It shares the same core capabilities as the FLUX.1 Kontext suite:
Character Consistency: Preserves unique elements in images across multiple scenes and environments, such as reference characters or objects in the image.
Editing: Makes targeted modifications to specific elements in the image without affecting other parts.
Style Reference: Generates novel scenes while preserving the unique style of the reference image according to text prompts.
Interactive Speed: Minimal latency in image generation and editing.
While the previously released API version offers the highest fidelity and speed, FLUX.1 Kontext [Dev] runs entirely on local machines, providing unparalleled flexibility for developers, researchers, and advanced users who wish to experiment.
FLUX.1 Kontext [max] - Experimental version with stronger prompt adherence
FLUX.1 Kontext [dev] - Open source version (used in this tutorial), 12B parameters, mainly for research
Currently in ComfyUI, you can use all these versions, where Pro and Max versions can be called through API nodes, while the Dev open source version please refer to the instructions in this guide.
In this tutorial, we cover two types of workflows, which are essentially the same:
A workflow using the FLUX.1 Kontext Image Edit group node, making the interface and workflow reuse simpler
Another workflow without using group nodes, showing the complete original workflow.
The main advantage of using group nodes is workflow conciseness - you can reuse group nodes to implement complex workflows and quickly reuse node groups. Additionally, in the new version of the frontend, we’ve added a quick group node addition feature for Flux.1 Kontext Dev:
This feature is currently experimental and may be adjusted in future versions.
Workflows in this guide can be found in the Workflow Templates.
If you can’t find them in the template, your ComfyUI may be outdated.(Desktop version’s update will delay sometime)If nodes are missing when loading a workflow, possible reasons:
Not using the latest ComfyUI version(Nightly version)
Using Stable or Desktop version (Latest changes may not be included)
To run the workflows in this guide successfully, you first need to download the following model files. You can also directly get the model download links from the corresponding workflows, which already contain the model file download information.Diffusion Model
This workflow is a normal workflow, but it uses the Load Image(from output) node to load the image to be edited, making it more convenient for you to access the edited image for multiple rounds of editing.
Object Modification:"Change [object] to [new state], keep [content to preserve] unchanged"Style Transfer:"Transform to [specific style], while maintaining [composition/character/other] unchanged"Background Replacement:"Change the background to [new background], keep the subject in the exact same position and pose"Text Editing:"Replace '[original text]' with '[new text]', maintain the same font style"
Remember: The more specific, the better. Kontext excels at understanding detailed instructions and maintaining consistency.