Instructions to use pandacooming/FLUX-3-Image-Klein-TrueRelight-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use pandacooming/FLUX-3-Image-Klein-TrueRelight-LoRA with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/flux-3-image-klein-base", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("pandacooming/FLUX-3-Image-Klein-TrueRelight-LoRA") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/flux-3-image-klein-base", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("pandacooming/FLUX-3-Image-Klein-TrueRelight-LoRA")
prompt = "Turn this cat into a dog"
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
image = pipe(image=input_image, prompt=prompt).images[0]- TrueRelight β Physical & Directional Relighting LoRA for FLUX.3 Image Klein
- Visual Comparisons (16-step Distilled FLUX.3 Image Klein, Seed 42)
- 1. Reversed Directional Sunset Rim Light (Preserving Ocean & Sky)
- 2. Golden Hour Directional Sunlight
- 3. Light Direction Reversal: Tangerine Key (Right) + Cool Teal Fill (Left)
- 4. Harsh Wall Shadow Removal β Overcast Daylight (v1 Trade-off Note)
- 5. Dual-Tone Neon Nightlife Relighting (Environmental Ambiance)
- Usage with
diffusers(Recommended: 16-step Distilled Klein) - ComfyUI Notes
- Training Details
- Limitations
- License
- Visual Comparisons (16-step Distilled FLUX.3 Image Klein, Seed 42)
TrueRelight β Physical & Directional Relighting LoRA for FLUX.3 Image Klein
TrueRelight is an instruction-based image relighting LoRA trained on black-forest-labs/flux-3-image-klein-base and optimized for fast 16-step inference on black-forest-labs/flux-3-image-klein.
Unlike plain prompt-only edits that often tint the whole image like a flat color filter or struggle to reverse light directions, TrueRelight reconstructs physically plausible directional key lights, rim highlights, cast shadows, and soft fill while locking subject identity, framing, and scene details in place.
- Interactive Showcase Space: pandacooming/FLUX-3-Image-Klein-TrueRelight
- Curated Training Dataset: pandacooming/FLUX-3-Image-Klein-TrueRelight-Dataset
- 16-Step Colab Notebook:
FLUX_3_Klein_TrueRelight_Demo.ipynb
Visual Comparisons (16-step Distilled FLUX.3 Image Klein, Seed 42)
All examples below are unseen blind-test inputs evaluated at 1024px using the exact same prompt and seed (No LoRA vs TrueRelight LoRA v1 @ strength 1.0).
1. Reversed Directional Sunset Rim Light (Preserving Ocean & Sky)
Prompt:
Relight <ref_image_0>: relight with strong warm amber sunlight shining from the right side onto her face and hair, keeping the exact ocean and sky background unchanged. Keep the subject, framing, composition, and all details unchanged.
2. Golden Hour Directional Sunlight
Prompt:
Relight <ref_image_0>: change the lighting to strong golden sunset sunlight shining from the right side, casting warm amber highlights and soft shadows to the left. Keep the subject, framing, composition, and all details unchanged.
3. Light Direction Reversal: Tangerine Key (Right) + Cool Teal Fill (Left)
Prompt:
Relight <ref_image_0>: relight with warm tangerine sunlight from the right and cool teal shadow fill from the left, keeping the exact stone wall background unchanged. Keep the subject, framing, composition, and all details unchanged.
4. Harsh Wall Shadow Removal β Overcast Daylight (v1 Trade-off Note)
Prompt:
Relight <ref_image_0>: change the lighting to soft, diffused overcast daylight, removing the harsh diagonal shadow on the face and wall while keeping the exact stone wall background unchanged. Keep the subject, framing, composition, and all details unchanged.Honest note: Relative to the original input, both base Klein and TrueRelight clear the harsh diagonal shadow on the stone wall (with TrueRelight preserving sharper brick seams), while sharp cast shadows across the cheek/neck remain partially visible in v1.
5. Dual-Tone Neon Nightlife Relighting (Environmental Ambiance)
Prompt:
Relight <ref_image_0>: add bright blue neon street lighting from the back and vibrant tangerine-pink glow from the left side, creating a moody nightlife ambiance. Keep the subject, framing, composition, and all details unchanged.
Usage with diffusers (Recommended: 16-step Distilled Klein)
Important: Pop
prompt_upsamplerbefore running inference so the LoRA receives your raw<ref_image_0>instruction directly without double-rewriting.
import torch
from diffusers import ModularPipeline
from diffusers.utils import load_image
# 1. Initialize distilled FLUX.3 Image Klein without prompt_upsampler
blocks = ModularPipeline.from_pretrained("black-forest-labs/flux-3-image-klein").blocks
blocks.sub_blocks.pop("prompt_upsampler", None)
pipe = blocks.init_pipeline("black-forest-labs/flux-3-image-klein")
pipe.load_components(dtype={"vae": torch.float32, "default": torch.bfloat16})
pipe.to("cuda")
# 2. Load TrueRelight LoRA (step-1000 default weights)
pipe.load_lora_weights("pandacooming/FLUX-3-Image-Klein-TrueRelight-LoRA", adapter_name="truelight")
pipe.set_adapters(["truelight"], adapter_weights=[1.0])
# 3. Run 16-step relighting
input_image = load_image("your_photo.jpg").convert("RGB")
prompt = (
"Relight <ref_image_0>: relight with warm tangerine sunlight from the right "
"and cool teal shadow fill from the left, keeping the exact background unchanged. "
"Keep the subject, framing, composition, and all details unchanged."
)
result = pipe(
prompt=prompt,
image=input_image,
num_inference_steps=16,
generator=torch.Generator("cuda").manual_seed(42),
output="images",
)[0]
result.save("relit.png")
Weight Variants
pytorch_lora_weights.safetensors(default, step 1000): Best overall balance of strong directional relighting, natural skin/material shading, and background fidelity.checkpoints/step_1500/pytorch_lora_weights.safetensors(step 1500): Slightly stronger lighting contrast for dramatic mood shifts (may darken deep shadows slightly more).
Recommended Prompting & Strength Guide
- Native Reference Token: Always address your input image with
<ref_image_0>and start withRelight <ref_image_0>: .... - Keep Original Background: Explicitly include
keeping the exact <background description> unchangedand avoid scene-replacing nouns like"studio"or"street"unless you want the background transformed into a studio or street. - LoRA Strength:
0.75 β 1.0works best on the 16-step distilled model (0.75for ultra-conservative background preservation,1.0for full directional light reversal).
ComfyUI Notes
This adapter uses standard diffusers / ai-toolkit-compatible FLUX.3 attention & feed-forward LoRA keys (to_q, to_k, to_v, to_out.0, ff.linear_in, ff.linear_out).
- Load onto
black-forest-labs/flux-3-image-klein-comfy(BF16 or INT8) using a standard LoRA Loader node (strength 0.8 β 1.0). - Connect your input image as the reference latent, skip/bypass the prompt upsampler, and sample with 16 steps, CFG 1.0,
euler/simple.
Training Details
- Base Model:
black-forest-labs/flux-3-image-klein-base(undistilled BF16) - Trainer:
diffuserstrain_dreambooth_lora_flux3_klein_img2img.py - Dataset:
pandacooming/FLUX-3-Image-Klein-TrueRelight-Datasetβ 280 pixel-aligned pairs combining filtered indoor/outdoor directional lighting angles fromLJY1229/flux-relightand aspect-ratio-aligned creative relighting pairs fromkontext-community/relighting. - Hyperparameters:
rank=32,lora_alpha=32, BF16,1024aspect-ratio bucketing,caption_dropout=0.05, AdamW 8-bit, constant LR1e-4, batch size1, trained to 1500 steps on an 80GB A100 (selected step 1000 as default).
Limitations
- Very sharp, high-contrast cast shadows across faces/necks are only partially softened in v1 (though harsh background wall shadows are cleared cleanly).
- Prompts containing strong scene nouns (e.g.,
"studio","night street","film noir") may also adapt the background to match that environment unless you explicitly anchor the background. - Ultra-subtle localized face-only brightness tweaks without directional cues produce smaller deltas than explicit directional or color-key lighting prompts.
License
This LoRA is a derivative adapter trained on black-forest-labs/flux-3-image-klein-base and is subject to the FLUX Kommunity License v.1.0 (see LICENSE.md and NOTICE.md).
- Downloads last month
- 206
Model tree for pandacooming/FLUX-3-Image-Klein-TrueRelight-LoRA
Base model
black-forest-labs/flux-3-image-klein-base




