File size: 1,152 Bytes
866e26e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
---
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
```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".
|