fediry's picture
Upload README.md with huggingface_hub
866e26e verified
metadata
license: other
library_name: diffusers
tags:
  - lora
  - flux
  - kontext
  - object-placement
base_model: black-forest-labs/FLUX.1-Kontext-dev

FLUX Kontext Object Placement LoRA

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

Usage

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".