Views
No views yet
FLUX.1 Kontext [dev] more efficient.1# Install diffusers from the main branch until future stable release
2pip install git+https://github.com/huggingface/diffusers.git1import torch
2from diffusers import FluxKontextPipeline
3from diffusers.utils import load_image
4pipe = FluxKontextPipeline.from_pretrained("AlekseyCalvin/Flux_Kontext_Dev_fp8_scaled_diffusers", torch_dtype=torch.bfloat16)
5pipe.to("cuda")
6input_image = load_image("https://images.squarespace-cdn.com/content/v1/5691c07b69492ec8d7400b4c/1606213149449-YYZKF3NPCITJGMLM3VAG/Boris%2BPoplavsky.jpg")
7image = pipe(
8 image=input_image,
9 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.",
10 guidance_scale=2.5
11).images[0]