Run this model with HF Jobs
Run thedeoxen/refcontrol-flux-kontext-reference-lineart-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/thedeoxen/refcontrol-flux-kontext-reference-lineart-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/thedeoxen/refcontrol-flux-kontext-reference-lineart-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 thedeoxen/refcontrol-flux-kontext-reference-lineart-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use thedeoxen/refcontrol-flux-kontext-reference-lineart-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("thedeoxen/refcontrol-flux-kontext-reference-lineart-lora") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Model description
license: apache-2.0 base_model: - black-forest-labs/FLUX.1-Kontext-dev pipeline_tag: image-to-image
RefControl Flux Kontext β Reference Lineart LoRA
π Short description
A LoRA for Flux Kontext Dev that fuses a reference image (left) with a lineart map (right).
It preserves identity and style from the reference while following the lines and contours from the control.
Trigger word: `refcontrollineart`
π Extended description
This LoRA was primarily trained on human characters and objects, but it works well with stylized art too.
The main goal is to preserve identity β facial features, clothing, or style β from the reference image, while adapting them to the structure given by the lineart map.
βοΈ How to use
- Concatenate two images side by side:
- Left: reference image (person, character, or object).
- Right: lineart map (black & white contour drawing).
- Add the trigger word `refcontrollineart` in your prompt.
- Adjust LoRA weight (recommended 0.7β1.0).
β Example prompt
refcontrolcanny, change ineart to photo with reference from left
π― What it does
- Preserves identity and style of the reference.
- Uses lineart to control outlines, proportions, and composition.
- Works for both realistic and stylized generations.
β‘ Tips
- Best results when the lineart map is clear and clean (minimal shading).
π Use cases
- Converting sketches to full artworks while keeping reference identity.
- Character redraws in different art styles.
- Consistent character design across multiple illustrations.
- Turning lineart drafts into photorealistic or stylized renders.
Download model
Download them in the Files & versions tab.
- Downloads last month
- 141
Model tree for thedeoxen/refcontrol-flux-kontext-reference-lineart-lora
Base model
black-forest-labs/FLUX.1-Kontext-dev




