FLUX.1 Kontext Fp8 Scaled Quant Diffusers Conversion

'FLUX.1 Kontext [dev]' is a 12 billion parameter rectified flow transformer capable of editing images based on text instructions. It was developed by Black Forest Labs.
For more info, read BFL's blog and paper (!).

Key Features

  1. Change existing images based on an edit instruction.
  2. Have character, style and object reference without any finetuning.
  3. Robust consistency allows users to refine an image through multiple successive edits with minimal visual drift.
  4. Trained using guidance distillation, making FLUX.1 Kontext [dev] more efficient.
  5. Open weights to drive new scientific research, and empower artists to develop innovative workflows.
  6. Generated outputs can be used for personal, scientific, and commercial purposes, as described in the FLUX.1 [dev] Non-Commercial License.

Using with diffusers 🧨

# Install diffusers from the main branch until future stable release
pip install git+https://github.com/huggingface/diffusers.git

Image colorization:

import torch
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image
pipe = FluxKontextPipeline.from_pretrained("AlekseyCalvin/Flux_Kontext_Dev_fp8_scaled_diffusers", torch_dtype=torch.bfloat16)
pipe.to("cuda")
input_image = load_image("https://images.squarespace-cdn.com/content/v1/5691c07b69492ec8d7400b4c/1606213149449-YYZKF3NPCITJGMLM3VAG/Boris%2BPoplavsky.jpg")
image = pipe(
  image=input_image,
  prompt="Colorize this photograph. Crisp intricate textured detailing. Rich tonality. Crisp details. Chromatic richness and range. Make it indistinguishable from a top quality large-format UHD or 50MP+ or 12k+ professional photo taken using a DSLR camera in 2025, upscale quality and carefully restore any blemished or blurred details. Retain facial features and proportions with great fidelity to the source. Add fine textural detailing only where missing. Render tones consistent with real life. Leave everything else about the photo unchanged.",
  guidance_scale=2.5
).images[0]

Or customize the prompt for other forms of editing.

Downloads last month
9
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AlekseyCalvin/Flux_Kontext_Dev_fp8_scaled_diffusers

Finetuned
(2)
this model

Spaces using AlekseyCalvin/Flux_Kontext_Dev_fp8_scaled_diffusers 2