Views
No views yet
1from diffusers import FluxPipeline
2import torch
3
4# Load the base model
5pipe = FluxPipeline.from_pretrained(
6 "black-forest-labs/FLUX.1-Kontext-dev",
7 torch_dtype=torch.bfloat16
8)
9
10# Load the LoRA
11pipe.load_lora_weights("fediry/flux-kontext-object-placement-lora")
12
13# Generate images with object placement
14prompt = "place it --ctrl_img path/to/your/control/image.jpg"
15image = pipe(prompt).images[0]