CoolFace
Modelpublic

fediry/flux-kontext-object-placement-lora

sourceHugging Faceotherupdated 1y agoView on Hugging Face
4likes35downloads
Model Card

FLUX Kontext Object Placement LoRA

This is a LoRA (Low-Rank Adaptation) model trained on FLUX.1-Kontext for object placement tasks.

Usage

python
from diffusers import FluxPipeline
import torch

# Load the base model
pipe = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.1-Kontext-dev",
    torch_dtype=torch.bfloat16
)

# Load the LoRA
pipe.load_lora_weights("fediry/flux-kontext-object-placement-lora")

# Generate images with object placement
prompt = "place it --ctrl_img path/to/your/control/image.jpg"
image = pipe(prompt).images[0]

Training Details

  • —Base Model: black-forest-labs/FLUX.1-Kontext-dev
  • —Training Steps: 3000
  • —Batch Size: 1
  • —Learning Rate: 1e-4
  • —Architecture: LoRA with rank 128
  • —Trigger Word: "place"

Model Description

This LoRA was trained to help with object placement tasks using the FLUX Kontext architecture. It can be used to place objects in images by providing a control image and using the trigger word "place".