You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

SDR β†’ HDR LoRA for FLUX.2-klein-4B

Turn any SDR photo into a scene-referred HDR image (ARRI LogC4 encoding, linear values recoverable up to ~470x). Clipped skies, suns, lamps and speculars are reconstructed instead of staying flat white β€” ready for EXR export, grading, or IBL.

Highlights

  • Prompt-controlled intensity: four control words dial how aggressively highlights are reconstructed, from subtle to sun-level.
  • Faithful, not hallucinated: on held-out data the median per-pixel relative error is ~10%, global exposure is self-calibrated, and low-dynamic scenes stay low β€” the model does not invent highlights that were never there.
  • Two formats included: sdr2hdr-klein4b-v1.safetensors (kohya/musubi naming) and sdr2hdr-klein4b-v1-COMFYUI.safetensors (ComfyUI-native keys).

Quick start (ComfyUI)

  1. Put sdr2hdr-klein4b-v1-COMFYUI.safetensors in models/loras/, with FLUX.2 klein-4B as the base model.
  2. Load it with a standard LoRA loader (strength 1.0) and feed the SDR photo as the reference/edit image.
  3. Prompt: convert to scene-linear HDR, LogC4 encoded, intense highlights (swap the last words per the table below).

Important β€” reference image size: resize (aspect-fit + center-crop) the SDR input to exactly the generation resolution before conditioning. A larger reference makes the model reproduce content at 1:1 scale and the output turns into a zoomed crop.

Intensity control

control word reconstruction target
extreme peak luminance sun-level sources, up to the LogC4 ceiling (~470x)
intense highlights strong practical lights, tens of x
strong highlights pronounced but moderate highlights (~5x)
soft dynamic range gentle expansion for low-contrast scenes (~2-3x)

Fixed prompt template: convert to scene-linear HDR, LogC4 encoded, {control word}

Output format

The generated PNG stores raw ARRI LogC4 code values, not sRGB (it looks flat grey in a normal viewer β€” that is correct). Decode to scene-linear:

V = png / 255
L = (2^(14*(V - c)/b + 6) - 64) / a
a = 2231.8259, b = 0.9071358748778103, c = 0.0928641251221897

Mid-grey maps to 0.18; values above 1.0 are HDR highlights. Write the linear buffer to a 32-bit EXR for VFX / grading / IBL use.

musubi-tuner inference

python src/musubi_tuner/flux_2_generate_image.py \
  --model_version klein-4b \
  --dit flux-2-klein-4b.safetensors --vae ae.safetensors \
  --text_encoder text_encoder/model-00001-of-00002.safetensors \
  --control_image_path input_sdr_fitted.png \
  --prompt "convert to scene-linear HDR, LogC4 encoded, intense highlights" \
  --image_size 768 1360 --infer_steps 28 \
  --lora_weight sdr2hdr-klein4b-v1.safetensors \
  --save_path out --output_type images

Training & evaluation

LoRA (dim 32) trained with musubi-tuner on ~1k human-curated SDR/HDR pairs spanning natural scenes, graded cinematic footage and film-production plates. On held-out samples: median in-band per-pixel relative error ~0.10, exposure gain 0.87–1.14 (no post-alignment needed), and monotonic peak response across all four intensity words. See samples/ for input / output / ground-truth comparisons (shown at βˆ’3EV to reveal highlight structure).

Limitations

  • Slight highlight overshoot above ~100x on extreme content.
  • Trained against synthetic tonemaps; heavily stylized real-world SDR grades may behave as out-of-distribution input.
  • Native resolution ~1MP; not intended for radiometric measurement.

License & access

Gated for non-commercial research. Training data has mixed provenance; verify upstream terms for your use case. Base model: FLUX.2-klein-4B (Black Forest Labs).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for LAXMAYDAY/flux2-klein4b-sdr2hdr-logc4-lora

Adapter
(63)
this model