Run this model with HF Jobs
Run fediry/flux-kontext-object-placement-lora on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/fediry/flux-kontext-object-placement-lora. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/fediry/flux-kontext-object-placement-lora on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use fediry/flux-kontext-object-placement-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use fediry/flux-kontext-object-placement-lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("fediry/flux-kontext-object-placement-lora") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
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".
- Downloads last month
- 96
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support
Model tree for fediry/flux-kontext-object-placement-lora
Base model
black-forest-labs/FLUX.1-Kontext-dev