Skip to content

Flux Kontext

Video Lecture

Section Video Links
Flux Kontext Flux Kontext Flux Kontext

Description

We will experiment with Flux Kontext.

FLUX.1 Kontext is an advanced image-editing model which allows you to edit or generate images using both text and image inputs, while preserving character/object consistency.

Download Models

πŸ“‚ ComfyUI/
β”œβ”€β”€ πŸ“‚ models/
β”‚   β”œβ”€β”€ πŸ“‚ clip/
β”‚   β”‚   β”œβ”€β”€ clip_l.safetensors
β”‚   β”‚   └── t5xxl_fp16.safetensors | t5xxl_fp8_e4m3fn.safetensors | t5xxl_fp8_e4m3fn_scaled.safetensors
β”‚   β”œβ”€β”€ πŸ“‚ unet/
β”‚   β”‚   └── flux1-kontext-dev-Q8_0.gguf
β”‚   └── πŸ“‚ vae/
β”‚       └── ae.safetensors

To be able to use GGUF quantized models, we will need to install a custom node.

Using the manager, install ComfyUI-GGUF by author City96.

GGUF acts as a container format that supports various blockwise quantization methods (e.g., 2-bit to 8-bit). Quantization significantly reduces the model's file size and memory (VRAM/RAM) requirements with minimal quality loss, allowing larger models to run on devices with limited resources.

Initial Image Workflow

WGET Commands

If you are using Runpod, or a similar hosted GPU service, then you can access your running pod/instance using a terminal.

#
#
#
#
#
#
# CD into ./ComfyUI/models/clip/ folder
wget https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors
# Choose one of the following t5xxl models suitable for your VRAM
wget https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors
wget https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors
wget https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn_scaled.safetensors
#
#
# CD into ./ComfyUI/models/unet/ folder
wget https://huggingface.co/QuantStack/FLUX.1-Kontext-dev-GGUF/resolve/main/flux1-kontext-dev-Q8_0.gguf
#
#
# CD into ./ComfyUI/models/vae/ folder
wget https://huggingface.co/flux-safetensors/flux-safetensors/resolve/main/ae.safetensors

Wait for files to download fully before running your workflows.