Instructions to use LAXMAYDAY/krea2-scene-linear-hdr-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use LAXMAYDAY/krea2-scene-linear-hdr-lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("krea/Krea-2-Raw", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("LAXMAYDAY/krea2-scene-linear-hdr-lora") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
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).
- Training dataset: π€ datasets/LAXMAYDAY/krea2-scene-linear-hdr-dataset (CC0)
- Tools + ComfyUI nodes + reports: github.com/HK416-TYPED/krea2-hdr-toolkit
Files
| file | use |
|---|---|
krea2-hdr-logc4-v1.safetensors |
LoRA for musubi-tuner / diffusers (native key names) |
krea2-hdr-logc4-v1-COMFYUI.safetensors |
LoRA 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.
- Downloads last month
- 70
Model tree for LAXMAYDAY/krea2-scene-linear-hdr-lora
Base model
krea/Krea-2-Raw