Downloads · 30 days
55
19% of all-time downloads
Oysiyl/flux-control-lora-brightness-10k
flux-control-lora-brightness-10k is a text-to-image model from Oysiyl. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as apache-2.0.
A Control LoRA model trained on FLUX.1-dev to control image generation through brightness/grayscale information. This model uses LoRA (Low-Rank Adaptation) for efficient control, providing an ultra-lightweight alterna…
Downloads · 30 days
55
19% of all-time downloads
All-time downloads
287
Public
Repo size
8.7 GB
Likes
0
Public
Click a slice to open those files.
.safetensors718 MB · 96%
From the Hugging Face model README
A Control LoRA model trained on FLUX.1-dev to control image generation through brightness/grayscale information. This model uses LoRA (Low-Rank Adaptation) for efficient control, providing an ultra-lightweight alternative to ControlNet with excellent pattern preservation and minimal overhead.
This Control LoRA enables brightness-based conditioning for FLUX.1 image generation. By providing a grayscale image as input, you can control the brightness distribution and lighting structure while maintaining creative freedom through text prompts.
Trained on 10,000 samples from latentcat/grayscale_image_aesthetic_3M:
| Parameter | Value |
|---|---|
| Base Model | black-forest-labs/FLUX.1-dev |
| Architecture | Control LoRA (~7M trainable parameters) |
| LoRA Rank | 128 |
| Training Resolution | 512×512 |
| Training Steps | 2,500 (1 epoch) |
| Batch Size | 1 per device |
| Gradient Accumulation | 4 (effective batch: 4) |
| Learning Rate | 1e-4 |
| Empty Prompts | 50% (enables better control conditioning) |
| Mixed Precision | BF16 |
| Hardware | NVIDIA H100 80GB |
| Training Time | ~1.5 hours |
| Final Loss | 0.435 |
| Model | Parameters | Size | Training | Resolution |
|---|---|---|---|---|
| This Control LoRA | ~7M | ~25MB | 10k @ 512 | 512×512 |
| ControlNet (SDXL) | ~700M | 4.7GB | 100k @ 512 | 512×512 |
| T2I Adapter (SDXL) | ~77M | 302MB | 100k @ 1024 | 1024×1024 |
pip install diffusers transformers accelerate torch sentencepiece peft
from diffusers import FluxControlPipeline
import torch
from PIL import Image
# Load FLUX.1 Control pipeline
pipe = FluxControlPipeline.from_pretrained(
"black-forest-labs/FLUX.1-dev",
torch_dtype=torch.bfloat16
)
# Load Control LoRA weights
pipe.load_lora_weights("Oysiyl/flux-control-lora-brightness-10k")
pipe.to("cuda")
# Set adapter weight (scale) - controls conditioning strength
pipe.set_adapters(["default_0"], adapter_weights=[0.75])
# Load grayscale/brightness control image
control_image = Image.open("path/to/grayscale_image.png")
control_image = control_image.resize((512, 512))
# Generate image
prompt = "a beautiful garden scene with colorful flowers and butterflies, highly detailed, professional photography, vibrant colors"
image = pipe(
prompt=prompt,
control_image=control_image,
num_inference_steps=28,
guidance_scale=3.5,
height=512,
width=512,
).images[0]
image.save("output.png")
The adapter weight controls how strongly the brightness map influences generation:
# Subtle control (scale 0.25-0.5)
pipe.set_adapters(["default_0"], adapter_weights=[0.25])
# Balanced control (scale 0.7-1.0) - Recommended for artistic QR codes
pipe.set_adapters(["default_0"], adapter_weights=[0.75])
# Strong control (scale 1.0-1.5)
pipe.set_adapters(["default_0"], adapter_weights=[1.25])
import qrcode
from PIL import Image
# Generate QR code
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_H,
box_size=10,
border=4
)
qr.add_data("https://your-url.com")
qr.make(fit=True)
qr_image = qr.make_image(fill_color="black", back_color="white")
qr_image = qr_image.resize((512, 512), Image.LANCZOS).convert("RGB")
# Load pipeline and LoRA
pipe = FluxControlPipeline.from_pretrained(
"black-forest-labs/FLUX.1-dev",
torch_dtype=torch.bfloat16
)
pipe.load_lora_weights("Oysiyl/flux-control-lora-brightness-10k")
pipe.to("cuda")
# Set scale for good QR code readability (0.7-1.0 works best)
pipe.set_adapters(["default_0"], adapter_weights=[0.75])
# Generate artistic QR code
image = pipe(
prompt="a beautiful garden with colorful flowers and butterflies, highly detailed, professional photography",
control_image=qr_image,
num_inference_steps=28,
guidance_scale=3.5,
height=512,
width=512,
).images[0]
image.save("artistic_qr.png")
The model includes intermediate checkpoints from throughout training:
# Early checkpoint (25% - 2,500 samples)
pipe.load_lora_weights("Oysiyl/flux-control-lora-brightness-10k", revision="checkpoint-625")
# Mid checkpoint (50% - 5,000 samples)
pipe.load_lora_weights("Oysiyl/flux-control-lora-brightness-10k", revision="checkpoint-1250")
# Late checkpoint (75% - 7,500 samples)
pipe.load_lora_weights("Oysiyl/flux-control-lora-brightness-10k", revision="checkpoint-1875")
# Final checkpoint (100% - 10,000 samples)
pipe.load_lora_weights("Oysiyl/flux-control-lora-brightness-10k", revision="checkpoint-2500")
# Final model (same as checkpoint-2500, on main branch)
pipe.load_lora_weights("Oysiyl/flux-control-lora-brightness-10k")
The adapter weight controls how strongly the brightness map influences generation:
| Scale | Behavior | Best For |
|---|---|---|
| 0.25-0.5 | Subtle artistic integration with hints of pattern | Natural images, soft lighting hints |
| 0.5-0.7 | Light control - visible structure with strong artistic freedom | Artistic images, creative reinterpretation |
| 0.7-1.0 | 🔥 Balanced control | Artistic QR codes, watermarks (recommended) |
| 1.0-1.25 | Strong control - clear patterns with artistic overlay | Geometric patterns, structured designs |
| 1.25-1.5 | Maximum control - dominant patterns | Strong brightness maps, technical applications |
This image shows how the model improves across checkpoints at scale 0.75 (recommended for QR codes):

From left to right: Original QR input, checkpoint-625 (25%), checkpoint-1250 (50%), checkpoint-1875 (75%), checkpoint-2500 (100%), final model
This grid shows the final model's behavior across all scales (0.25 to 1.5):

Grid showing scales: 0.25, 0.5, 0.7, 0.75, 1.0, 1.25, 1.5 - demonstrating the range from subtle hints to strong pattern preservation
Input QR Code:

| Metric | ControlNet (SDXL) | This Control LoRA | Advantage |
|---|---|---|---|
| Parameters | ~700M | ~7M | 100x smaller |
| Model Size | 4.7GB | 25MB | 188x smaller |
| Load Time | ~5-10 seconds | <1 second | 10x faster loading |
| Storage (w/ checkpoints) | ~18.8GB | ~125MB | 150x less storage |
| Pattern Preservation @ Scale 1.0 | Excellent | Excellent | Comparable quality |
| Flexibility | Fixed architecture | Adjustable weights | More versatile |
| Metric | T2I Adapter (SDXL) | This Control LoRA | Advantage |
|---|---|---|---|
| Parameters | ~77M | ~7M | 11x smaller |
| Model Size | 302MB | 25MB | 12x smaller |
| Base Model | SDXL | FLUX.1-dev | More advanced base |
| Training Samples | 100k | 10k | More efficient |
The model includes checkpoints from throughout training:
All checkpoints show consistent, high-quality performance across scales. The progression analysis reveals:
Early Checkpoint (625 steps, 2.5k samples):
Mid Checkpoints (1250-1875 steps, 5k-7.5k samples):
Final Model (2500 steps, 10k samples):
Unlike larger models trained on 100k samples, this 10k Control LoRA shows no signs of overfitting:
accelerate launch --mixed_precision="bf16" train_control_lora_flux.py \
--pretrained_model_name_or_path="black-forest-labs/FLUX.1-dev" \
--dataset_name="<path_to_10k_dataset>" \
--conditioning_image_column="conditioning_image" \
--image_column="image" \
--caption_column="text" \
--output_dir="./flux-control-lora-brightness-10k" \
--mixed_precision="bf16" \
--resolution=512 \
--learning_rate=1e-4 \
--proportion_empty_prompts=0.5 \
--rank=128 \
--train_batch_size=1 \
--gradient_accumulation_steps=4 \
--num_train_epochs=1 \
--checkpointing_steps=625 \
--validation_steps=625 \
--gradient_checkpointing \
--report_to="wandb"
main: Final model (10,000 samples, recommended)checkpoint-625: Early checkpoint (2,500 samples)checkpoint-1250: Mid checkpoint (5,000 samples)checkpoint-1875: Late checkpoint (7,500 samples)checkpoint-2500: Final checkpoint (same as main)@misc{flux-control-lora-brightness-10k,
author = {Oysiyl},
title = {FLUX.1 Control LoRA - Brightness Control (10k @ 512×512)},
year = {2025},
publisher = {HuggingFace},
journal = {HuggingFace Model Hub},
howpublished = {\url{https://huggingface.co/Oysiyl/flux-control-lora-brightness-10k}}
}
Apache 2.0 License. The base FLUX.1-dev model has separate license terms at black-forest-labs/FLUX.1-dev.