Downloads · 30 days
61
14% of all-time downloads
Oysiyl/controlnet-brightness-sdxl-100k
controlnet-brightness-sdxl-100k is a image-to-image model from Oysiyl. Use it when you need one image transformed into another. It is set up for diffusers. The card lists the license as apache-2.0.
This is a ControlNet model trained on Stable Diffusion XL to control image generation through brightness/grayscale information. It enables precise control over lighting, tonal values, and overall brightness structure…
Downloads · 30 days
61
14% of all-time downloads
All-time downloads
441
Public
Parameters
1.3B
15 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15 GB · 100%
From the Hugging Face model README
This is a ControlNet model trained on Stable Diffusion XL to control image generation through brightness/grayscale information. It enables precise control over lighting, tonal values, and overall brightness structure in generated images.
This ControlNet allows you to condition SDXL image generation using grayscale/brightness maps. By providing a grayscale image as input, you can control the brightness distribution and lighting structure of the generated image while maintaining creative freedom through text prompts.
Key features:
Intended uses:
The model was trained on 100,000 samples from the latentcat/grayscale_image_aesthetic_3M dataset, which consists of:
stabilityai/stable-diffusion-xl-base-1.0Training was performed using the diffusers ControlNet training script with the following key parameters:
accelerate launch --mixed_precision="fp16" train_controlnet_sdxl.py \
--pretrained_model_name_or_path="stabilityai/stable-diffusion-xl-base-1.0" \
--dataset_name="<local_dataset_path>" \
--conditioning_image_column="conditioning_image" \
--image_column="image" \
--caption_column="text" \
--mixed_precision="fp16" \
--resolution=512 \
--learning_rate=1e-5 \
--train_batch_size=32 \
--gradient_accumulation_steps=4 \
--num_train_epochs=1 \
--checkpointing_steps=390 \
--enable_xformers_memory_efficient_attention \
--use_8bit_adam
pip install diffusers transformers accelerate torch
from diffusers import StableDiffusionXLControlNetPipeline, ControlNetModel
import torch
from PIL import Image
# Load ControlNet
controlnet = ControlNetModel.from_pretrained(
"Oysiyl/controlnet-brightness-sdxl-100k",
torch_dtype=torch.float16
)
# Load SDXL pipeline
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
controlnet=controlnet,
torch_dtype=torch.float16
)
pipe.enable_xformers_memory_efficient_attention()
pipe.to("cuda")
# Load your grayscale/brightness control image
control_image = Image.open("path/to/grayscale_image.png")
# Generate image
prompt = "a beautiful landscape, highly detailed, vibrant colors"
negative_prompt = "blurry, low quality, distorted"
image = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
image=control_image,
num_inference_steps=30,
controlnet_conditioning_scale=0.8, # Adjust between 0.0-2.0
guidance_scale=7.5,
).images[0]
image.save("output.png")
The controlnet_conditioning_scale parameter controls how strongly the brightness map influences the generation:
⚠️ Important: This model (trained for 1 epoch) has limited capability in preserving sharp geometric patterns:
For geometric patterns and QR codes, consider using:
Training Duration: This model was trained for only 1 epoch. The original SD 1.5 brightness ControlNet was trained for 2 epochs, which may explain the difference in geometric pattern preservation.
Dataset Focus: Trained exclusively on natural aesthetic images, which may limit performance on synthetic/geometric content.
The model inherits biases from:
This repository includes multiple checkpoints from the training run:
🔄 Version 2 (Planned): Training for 2 epochs to match the original SD 1.5 brightness ControlNet methodology, which should improve:
If you use this model, please cite:
@misc{controlnet-brightness-sdxl-100k,
author = {Oysiyl},
title = {SDXL ControlNet - Brightness Control},
year = {2025},
publisher = {HuggingFace},
journal = {HuggingFace Model Hub},
howpublished = {\url{https://huggingface.co/Oysiyl/controlnet-brightness-sdxl-100k}}
}
This model is released under the Apache 2.0 License. See the LICENSE file for details.
The base SDXL model has its own license terms which you should review at stabilityai/stable-diffusion-xl-base-1.0.