Views
No views yet
FLUX.2-Klein-Object-Remover-Bbox is an adapter LoRA developed for black-forest-labs/FLUX.2-klein-base-9B, designed to precisely remove unwanted objects from images using bounding box guidance. The model intelligently reconstructs the selected region with context-aware filling while preserving surrounding textures, lighting, shadows, and perspective. It delivers clean object removal without visible artifacts, edge distortion, or style mismatch, ensuring natural and seamless edits while retaining the original image quality.
pip install -U diffusers transformers accelerate1import torch
2from diffusers import DiffusionPipeline
3from diffusers.utils import load_image
4
5# Switch to "mps" for Apple devices
6pipe = DiffusionPipeline.from_pretrained(
7 "black-forest-labs/FLUX.2-klein-base-9B",
8 torch_dtype=torch.bfloat16
9).to("cuda")
10
11pipe.load_lora_weights("prithivMLmods/FLUX.2-Klein-Object-Remover-Bbox")
12
13prompt = "Remove the red highlighted object from the scene."
14
15input_image = load_image(
16 "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png"
17)
18
19image = pipe(image=input_image, prompt=prompt).images[0]Remove the red highlighted object from the scene.