Texel-4.2 (2ร— detail upscaler for textures and photos)

Texel-4.2 is the newest Texel model. It's a 2ร— upscaler that removes compression damage (BC1/DXT block grids, JPEG blocking, noise) and rebuilds fine surface grain instead of smoothing it out. Compared with Texel-4.1, it was trained on 828 more real-world material scans. It's as good on game textures, better on textures it has never seen, and much better on photos.

Download one file: Texel-4.2_2x_fp32.onnx (48 MB). It works with any input size and the output is always exactly 2ร—.

Using it

chaiNNer (no Python)

  1. Download Texel-4.2_2x_fp32.onnx.
  2. In chaiNNer, use Load Model (ONNX) โ†’ Upscale Image.

onnxruntime (Python)

import numpy as np, onnxruntime as ort
from PIL import Image

sess = ort.InferenceSession("Texel-4.2_2x_fp32.onnx",
                            providers=["CUDAExecutionProvider", "CPUExecutionProvider"])
img = np.asarray(Image.open("in.png").convert("RGB"), np.float32) / 255.0
x = img.transpose(2, 0, 1)[None]                 # 1x3xHxW, RGB, 0..1
y = sess.run(None, {"input": x})[0][0]           # 3x2Hx2W
out = (y.transpose(1, 2, 0).clip(0, 1) * 255 + 0.5).astype(np.uint8)
Image.fromarray(out).save("out_2x.png")
  • Input input: float32, [batch, 3, H, W], RGB in 0..1. Output output: [batch, 3, 2H, 2W].
  • RGB only. For textures with transparency, upscale the alpha channel separately (for example with Lanczos).
  • Tiling textures: the ONNX file is not tile-aware. For seamless repeating textures, wrap-pad the input by 16 px on every side, upscale it, then crop 32 px off each edge of the output.
  • Use it on colour (albedo) textures and photos. Don't run it on normal maps, masks or other data maps.

Model

  • Architecture: ResSR, a residual CNN with PixelShuffle upsampling and a nearest-neighbour skip; 128 channels, 80 convolutions, 11.97M parameters. The same as Texel-4 and 4.1.
  • Training, in two stages:
    1. 30k L1 steps from Texel-4, on game textures plus 828 CC0 material scans from Poly Haven, each set getting an equal share. Training inputs carried a random mix of downscaling, JPEG, BC1, noise and banding.
    2. A 10k-step detail fine-tune, the same recipe as 4.1:
      • VGG19 texture statistics (Gram matrices), VGG feature distance and pixel L1.
      • Training crops favour busy texture patches.
      • An FFT penalty stops it from inventing a repeating pixel-grid pattern.

Results

Each image was shrunk 2ร— and upscaled back, then compared with the original. "Perceptual distance" compares VGG19 features: lower means it looks closer to the real image. "Detail" is fine-detail energy relative to the real image, where 1.0 means equally detailed.

Test set Model PSNR Perceptual distance โ†“ Detail Max colour shift
83 Breath of the Wild terrain textures Texel-4.1 33.94 dB 0.538 0.92 0.5/255
Texel-4.2 33.91 dB 0.538 0.90 0.5/255
35 held-out Poly Haven textures (never trained on) Texel-4.1 32.28 dB 0.552 0.83 0.6/255
Texel-4.2 32.23 dB 0.513 0.90 0.6/255
100 DIV2K photos Texel-4.1 30.60 dB 0.783 0.95 3.1/255
Texel-4.2 31.45 dB 0.688 0.96 0.7/255

For reference, on the terrain set Real-ESRGAN x2plus scores 30.00 dB, with a perceptual distance of 0.834 and a colour shift of 8.2/255.

In real use (actual 1024ยฒ textures upscaled to 2048ยฒ, nothing shrunk), Texel-4.2 adds no visible repeating pattern.

Limitations:

  • It's tuned for detail, so PSNR is about 1.5 dB lower than the PSNR-only Texel-4. Some of the grain it adds is plausible rather than the exact original.
  • If you need the closest pixel-for-pixel match, use a PSNR-trained model such as Texel-4.

License

The model weights are released under CC0 1.0 (public domain dedication).

It was trained on textures from The Legend of Zelda: Breath of the Wild and Bonelab, CC0 textures from Poly Haven, and DIV2K photos. None of that training data is included here, and its copyright stays with its owners. This project isn't affiliated with or endorsed by Nintendo, Stress Level Zero or Poly Haven.

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