Sign In

Ultimate 48bit Tool (Real Training Enhancment)

Updated: May 21, 2026

toolhdr48bit

Download

1 variant available

Archive Other

3.03 KB

Unverified:

Type

Other

Stats

11

Reviews

Published

May 21, 2026

Base Model

Other

Hash

AutoV2
28F3EBD7B0
SDXL Training Contest Participant
Felldude's Avatar

Felldude

Ultimate 48bit Tool

When training with 48bit images you must use FP32 with no 8bit optimizer as this rule:

  • float16: collapses everything toward a fixed noise floor (~1e-7)

  • float32: preserves the original image quantization structure almost perfectly

  • 48-bit advantage only survives in float32 (and higher), not in float16

This custom model was trained on a dataset exceeding 22 GB, achieving strong evaluation scores that indicate meaningful HDR reconstruction rather than simple gradient smoothing or noise-based approximation.

Images enhanced with this tool require only minimal adjustments to integrate with common training frameworks such as Onetrainer or Kohya SS. Standard tooling such as OpenCV and widely used VAE-based workflows already support higher bit-depth processing, making the model compatible with existing image-to-image and diffusion training setups with little modification.

Standard 8-bit pipelines that normalize inputs by dividing by 255, Using 48bit images you can use normalization by 65,535 during conversion to float32. This preserves significantly more tonal precision, allowing finer gradations between pixel values and improved reconstruction fidelity.

  • 16-bit = 256× more levels per pixel when cast to FP32

  • That is a 25,500% increase in precision (approx.)

NOTE: KEEP PIL out of your python OPEN-CV ONLY NO PILLOW

Perceptual Metrics (60-image test set)

  • LPIPS (Alex) 0.044 Low perceptual distance / high similarity

  • Gradient Energy 0.088 → 0.108 Preserved fine detail, slight sharpening

  • FFT Structure Score 1.07 → 1.23 Improved high-frequency retention

  • Histogram Continuity 11.2 → 11.3 Stable tonal distribution

MAE Distribution (8-bit → 16-bit reconstruction)

  • MAE Range Accuracy Comment Percent (%)

  • ≥1000 Occasionally visible in uniform areas 1.06

  • 600–1000 Almost never visible 10.03

  • 400–600 Fully imperceptible 27.39

  • 200–400 Near perfect 59.95

  • ≤200 Near exact scientific 1.57


I can not repeat this enough DO NOT EVER use pillow with 48bit images, do not even import it.

For Onetrainer change the MGDS in your VENV Source (LoadImage.py)

For Kohya change the latent creation process force use of Open CV (I forget the .py)

ALLWAYS change normalization Logic. You have to divide by 65k

        # If 8-bit, normalize to [0, 1]; if 16-bit, divide by 65535
        if img_tensor.dtype == torch.uint8:
            img_tensor = img_tensor.float() / 255.0
        elif img_tensor.dtype == torch.uint16:
            img_tensor = img_tensor.float() / 65535.0
        else:
            img_tensor = img_tensor.float()