Instructions to use oumoumad/LumiPic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use oumoumad/LumiPic 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("Qwen/Qwen-Image-Edit-2511,black-forest-labs/FLUX.2-klein-base-4B,black-forest-labs/FLUX.2-klein-base-9B", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("oumoumad/LumiPic") 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] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
LumiPic β Single-Image SDR to HDR LoRA
Converts standard dynamic range (SDR) images to high dynamic range (HDR) EXR files β float-valued, with range well beyond what an 8-bit SDR output can carry.
Based on LumiVid (paper) β the Lightricks research that introduced log-encoded diffusion for HDR generation. LumiPic is the same technique adapted to single-image diffusion transformers; the technique is base-model agnostic. Two trained LoRA families are published here, across three base models.
2026-05-24 β V10 LogC4 added (alpha). Six new checkpoints (two per model family) trained on ARRI LogC4 instead of LogC3, giving ~3 extra stops of highlight headroom (linear ceiling ~470 vs LogC3's ~55). Testing so far is limited; see the V10 caveats section below.
Examples
Same 20 HDR outputs, viewed at two extreme exposure offsets β highlights still hold structure at EV+6, shadows still hold information at EV-6.
Exposure +6 (highlights pulled down):
Exposure -6 (shadows pushed up):
Choosing a curve: LogC3 vs LogC4
| Curve | Linear ceiling | Stops above 0.18 mid-gray | Decode node |
|---|---|---|---|
| LogC3 (V1 / V5b / V9 / klein_alpha_*) | ~55.2 | β 8.3 | Gear Β· LogC3 Decode + Save EXR |
LogC4 (V10 / *_logc4_*) |
~470 | β 11.3 | Gear Β· LogC4 Decode + Save EXR |
β οΈ Picking the wrong decode curve silently produces wrong absolute linear values. The EXR will look plausibly tonemapped but the absolute luminance will be off. Match the decode node to the LoRA's filename:
_logc4_*β LogC4 node; everything else β LogC3 node.
The LogC4 family adds about 3 extra stops of highlight headroom β important for shots with direct sun, fire, specular reflections, or window-blown highlights that were hitting the LogC3 ceiling. For lower-DR content (interior, overcast, night), the two curves produce very similar outputs and LogC3 is fine.
Weights
Qwen-Image-Edit-2511 (mature)
5+ training iterations, 563 MB per LoRA. Best quality, larger base (~54 GB).
LogC3 (stable):
v5b_step2000.safetensorsβ Qwen default. Most robust overall; best on stylized/AI-generated SDR inputs.v9_step1500.safetensorsβ alternative. LumiVid-aligned augs (joint HDR+SDR EV shifts, luminance blur p=1.0). Slightly better on natural photos.hdrdit_v1_QE2511.safetensorsβ original v1 release.
LogC4 (V10 alpha β 2026-05-24):
v10_logc4_step1500.safetensorsβ recommended V10 candidate by stats (highest mean p99 = 17.96 across 10 golden scenes).v10_logc4_step3000.safetensorsβ final (full training run completion).
FLUX.2-klein-base-4B (alpha)
Single training iteration, 88 MB per LoRA. Apache 2.0 base, 5Γ smaller than Qwen, fastest end-to-end.
LogC3:
klein4b_alpha_step1750.safetensorsβ klein-4B default. Faithful HDR look; well-balanced.klein4b_alpha_step1000.safetensorsβ alternative. Aggressive HDR (higher p99) but tends to blow out bright highlights.
LogC4 (V10 alpha):
klein4b_v10_logc4_step1500.safetensorsβ strongest V10 performer in early ComfyUI testing (better than the Qwen V10 β see caveats).klein4b_v10_logc4_step2000.safetensorsβ final.
FLUX.2-klein-base-9B (alpha)
Single training iteration, 158 MB per LoRA. Larger klein variant β more capacity, more nuanced HDR. Base model is gated on HF (request access at the base model page before first run).
LogC3:
klein9b_alpha_step2000.safetensorsβ klein-9B default. Stable, well-behaved (mean p99 9.1, no scenes saturated in our 20-image benchmark).klein9b_alpha_step1250.safetensorsβ most "good" scenes (13/20 in 5-50 p99 range, 0 saturated). Practically the best by per-scene quality count.klein9b_alpha_step1000.safetensorsβ most aggressive (mean p99 20.6, but 4 scenes saturated). Pre-overfit peak HDR range.klein9b_alpha_step{250,500,750,1500,1750}.safetensorsβ intermediate snapshots, available for experimentation.
The training overfit curve was steep on klein-9B (mean p99: 1000=20.6 β 1250=11.1 β 1500=9.3 β 1750=9.6 β 2000=9.1). Step 2000 is the safest default; step 1250 is the practical sweet spot.
LogC4 (V10 alpha):
klein9b_v10_logc4_step1500.safetensorsβ recommended V10 candidate.klein9b_v10_logc4_step2000.safetensorsβ final.
V10 LogC4 β status & caveats
Testing has been limited. Notable observations so far:
- Numerical evaluation via diffusers (Qwen V10 across 10 golden scenes) shows clear improvements vs V9 LogC3 β mean p99 jumps from 7.76 to 17.96 (2.3Γ), mean peak from 41.6 to 263.3 linear, with no obvious regressions in shadow handling. The V10 Qwen LoRA genuinely uses the extra LogC4 headroom on bright content.
- ComfyUI testing of the same Qwen V10 LoRAs has not yet confirmed that improvement β visual results look weaker than expected vs V9. We haven't fully diagnosed the discrepancy; candidates include diffusers-vs-ComfyUI pipeline differences (LoRA application, sampler, scheduler), VAE precision, or our test methodology.
- Klein V10 LoRAs (4B and 9B) perform well in ComfyUI testing β
klein4b_v10_logc4_step1500.safetensorshas been the strongest LogC4 candidate in early ComfyUI runs. If you're picking one V10 to try first, start there. - The V10 dataset was rebuilt from raw scene-linear EXR sources (no LogC3 reuse) β 1143 pairs from 381 source scenes, joint EV-shifted, paper-aligned augmentations.
- VAE roundtrip pre-flight (LogC3 vs LogC4 on the same VAE) showed LogC4 has slightly better shadow/midtone alignment and similar highlight alignment β so the architecture supports it.
Treat all V10 ckpts as alpha for community testing, not as drop-in replacements for V9 in production. Share any useful feedback for improvement β open an issue on the GitHub repo with examples, observations, or pipeline differences you spot. Especially valuable: anything that helps explain the Qwen diffusers-vs-ComfyUI mismatch.
Usage
Qwen-Image-Edit-2511:
from diffusers import QwenImageEditPipeline
import torch
from PIL import Image
pipe = QwenImageEditPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2511", torch_dtype=torch.bfloat16)
# LogC3 default:
pipe.load_lora_weights("oumoumad/LumiPic", weight_name="v5b_step2000.safetensors")
# LogC4 (V10 alpha):
# pipe.load_lora_weights("oumoumad/LumiPic", weight_name="v10_logc4_step1500.safetensors")
pipe = pipe.to("cuda")
image = Image.open("photo.jpg").convert("RGB")
output = pipe(prompt="Convert this image to HDR", image=image,
num_inference_steps=40, guidance_scale=3.0, output_type="pt")
# Decode LogC3 β linear HDR (see logc3.py in GitHub repo)
# Decode LogC4 β linear HDR (see logc4.py β same interface, different curve constants)
FLUX.2-klein-base-4B / 9B (requires bleeding-edge diffusers: pip install "git+https://github.com/huggingface/diffusers.git"):
from diffusers import Flux2KleinPipeline
import torch
from PIL import Image
# 4B (Apache 2.0, ungated)
pipe = Flux2KleinPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-base-4B", torch_dtype=torch.bfloat16)
# LogC3:
pipe.load_lora_weights("oumoumad/LumiPic", weight_name="klein4b_alpha_step1750.safetensors")
# LogC4 (V10 alpha β recommended starting point for V10 testing):
# pipe.load_lora_weights("oumoumad/LumiPic", weight_name="klein4b_v10_logc4_step1500.safetensors")
# 9B (gated β accept license on HF first)
# pipe = Flux2KleinPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-base-9B", torch_dtype=torch.bfloat16)
# pipe.load_lora_weights("oumoumad/LumiPic", weight_name="klein9b_alpha_step2000.safetensors")
# or LogC4: weight_name="klein9b_v10_logc4_step1500.safetensors"
pipe.enable_model_cpu_offload() # or pipe.to("cuda") if you have 32GB+
image = Image.open("photo.jpg").convert("RGB")
output = pipe(prompt="Convert this image to HDR", image=image,
num_inference_steps=25, guidance_scale=3.0, output_type="pt")
See the GitHub repo for complete inference code with EXR output (inference.py for Qwen, inference_klein.py for klein).
Quick Inference
git clone https://github.com/oumad/LumiPic.git && cd LumiPic
pip install -r requirements.txt
python inference.py --image photo.jpg # Qwen path (production)
python inference_klein.py --image photo.jpg # klein path (alpha)
The base model and LoRA weights download automatically on first run.
ComfyUI
Ready-to-use workflows:
LogC3 (stable):
SDR_To_HDR_QE11.jsonβ Qwen-Image-Edit-2511SDR_To_HDR_klein4b.jsonβ FLUX.2-klein-base-4BSDR_To_HDR_klein9b.jsonβ FLUX.2-klein-base-9B
LogC4 (V10 alpha):
SDR_To_HDR_logc4_klein9b.jsonβ FLUX.2-klein-base-9B + V10 LogC4 LoRA (the strongest V10 configuration in current testing)
The LogC3 workflows use the Gear Β· LogC3 Decode + Save EXR node; the LogC4 workflow uses Gear Β· LogC4 Decode + Save EXR (added in ComfyUI_Gear v0.2.0). Same node API, different curve β never mix them.
Drop the JSON onto your canvas, place the matching LoRA file in ComfyUI/models/loras/{qwen,flux-2}/hdr/, install ComfyUI_Gear β₯ v0.2.0, queue with prompt "Convert this image to HDR".
Training
- Technique: LoRA (rank 32) on the DiT transformer, trained to output ARRI log-encoded HDR (LogC3 for V1βV9, LogC4 for V10)
- Dataset: ~260β1143 diverse HDR pairs (Poly Haven HDRIs, RED/ARRI footage, CG renders, Blender scenes), augmented with exposure shifts, luminance blur, contrast, JPEG, white-balance jitter. V10 rebuilt from raw scene-linear EXR sources only β no log-encoded reuse.
- Hyperparams: rank 32, alpha 32, bf16, AdamW lr 1e-4, flowmatch scheduler
- Steps: 2000β3000 (Qwen sweet spot ~1500; klein-4B sweet spot ~1500β1750; klein-9B sweet spot ~1250β2000 depending on V8 vs V10)
- Trained with Ostris AI-Toolkit. Qwen LoRAs use a fork with float32
.npytargets (npy-float32-targets branch); klein LoRAs use upstream + a 4-line VAE-on-GPU patch toflux2_model.py.
- Downloads last month
- 2,804
Model tree for oumoumad/LumiPic
Base model
Qwen/Qwen-Image-Edit-2511
