Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -1 +1,47 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
library_name: diffusers
|
4 |
+
tags:
|
5 |
+
- lora
|
6 |
+
- flux
|
7 |
+
- kontext
|
8 |
+
- object-placement
|
9 |
+
base_model: black-forest-labs/FLUX.1-Kontext-dev
|
10 |
+
---
|
11 |
+
|
12 |
+
# FLUX Kontext Object Placement LoRA
|
13 |
+
|
14 |
+
This is a LoRA (Low-Rank Adaptation) model trained on FLUX.1-Kontext for object placement tasks.
|
15 |
+
|
16 |
+
## Usage
|
17 |
+
|
18 |
+
```python
|
19 |
+
from diffusers import FluxPipeline
|
20 |
+
import torch
|
21 |
+
|
22 |
+
# Load the base model
|
23 |
+
pipe = FluxPipeline.from_pretrained(
|
24 |
+
"black-forest-labs/FLUX.1-Kontext-dev",
|
25 |
+
torch_dtype=torch.bfloat16
|
26 |
+
)
|
27 |
+
|
28 |
+
# Load the LoRA
|
29 |
+
pipe.load_lora_weights("fediry/flux-kontext-object-placement-lora")
|
30 |
+
|
31 |
+
# Generate images with object placement
|
32 |
+
prompt = "place it --ctrl_img path/to/your/control/image.jpg"
|
33 |
+
image = pipe(prompt).images[0]
|
34 |
+
```
|
35 |
+
|
36 |
+
## Training Details
|
37 |
+
|
38 |
+
- **Base Model**: black-forest-labs/FLUX.1-Kontext-dev
|
39 |
+
- **Training Steps**: 3000
|
40 |
+
- **Batch Size**: 1
|
41 |
+
- **Learning Rate**: 1e-4
|
42 |
+
- **Architecture**: LoRA with rank 128
|
43 |
+
- **Trigger Word**: "place"
|
44 |
+
|
45 |
+
## Model Description
|
46 |
+
|
47 |
+
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".
|