CoolFace
Modelpublic

LAXMAYDAY/krea2-scene-linear-hdr-lora

sourceHugging Facecc-by-nc-4.0updated 3mo agoView on Hugging Face
8likes143downloads
Model Card

Krea 2 — Scene-Linear HDR LoRA (LogC4)

A small LoRA that makes Krea 2 generate true scene-linear HDR — float radiance with values well above 1.0, exportable to .exr for render / VFX / IBL. The model generates in a LogC4-encoded space (values stay in [0,1], fed to the frozen Qwen Image VAE); you recover the HDR by applying inverse-LogC4 after decode.

Trained on RAW with musubi-tuner (networks.lora_krea2, dim/alpha 32, 264 modules).

Files

fileuse
krea2-hdr-logc4-v1.safetensorsLoRA for musubi-tuner / diffusers (native key names)
krea2-hdr-logc4-v1-COMFYUI.safetensorsLoRA for ComfyUI (keys remapped — the musubi one does not load in ComfyUI as-is)

How it works (important)

The LoRA output is a LogC4 code in [0,1], not linear. Pipeline:

prompt → Krea2 + this LoRA → LogC4 code [0,1] → inverse-LogC4 → scene-linear (>>1) → EXR / HDR AVIF
  • —The trigger phrase is at the end of the caption: scene-linear HDR, high dynamic range, physically based lighting.
  • —The frozen VAEDecode [0,1] clamp is harmless — values >1 appear only after inverse-LogC4.
  • —Never save the generated image with an 8-bit/clamping saver; go LogC4→linear→32-bit-float EXR.

Usage

ComfyUI (use the -COMFYUI file): install the comfyui_krea_hdr node pack (LogC4ToLinear + SaveEXRSceneLinear). Graph: UNETLoader(Krea2 RAW) → CLIPLoader(type=krea2) → VAELoader(Qwen Image VAE) → LoraLoader → KSampler(cfg 5.5, euler, simple, 28 steps) → VAEDecode → LogC4ToLinear → SaveEXRSceneLinear. Do NOT add ModelSamplingSD3/shift — Krea2 already applies its shift; adding one double-shifts and washes the image out.

musubi-tuner (use the native file): krea2_generate_image.py ... --lora_weight krea2-hdr-logc4-v1.safetensors, then inverse-LogC4 → EXR.

Verified

Same prompt+seed, base vs LoRA: the base clips highlights flat at the decode ceiling (fake HDR); this LoRA spreads highlights into graduated values (real HDR) — pinned-at-ceiling 6.20% → 0.66%. Generalizes to out-of-distribution prompts (7/8 fire/neon/portrait/cathedral/candle produce real HDR, brightest region on the actual light source).

Limitations

  • —Single-plane LogC4 caps peak radiance ~470× — not literal sun magnitude (10⁵+); true sun needs a multi-plane scheme (gain map / exposure stack) or a parametric sun model.
  • —Quality is epoch-10 on a small dataset (40 HDRIs); HDR-realness and image quality are separate axes.
  • —Dark scenes (low LogC4 codes) decode to near-zero linear and read dim in HDR.
  • —Base is Krea-2-Raw; RAW→Turbo transfer is untested.