Texel-4.1 (2Γ— detail upscaler for game textures)

Texel-4.1 is the detail version of Texel-4. It's a 2Γ— upscaler for game textures that removes compression damage (BC1/DXT block grids, JPEG blocking, noise) and rebuilds fine surface grain instead of smoothing it out. Gravel, rock and dirt come out with real texture rather than a painted look.

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

Which one should I use?

  • Texel-4.1 for textures you look at: the sharpest, most detailed result.
  • Texel-4 if you want the closest pixel-for-pixel match (highest PSNR), or for normal photos.

Using it

chaiNNer (no Python)

  1. Download Texel-4.1_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.1_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 only. Don't run it on normal maps, masks or other data maps.

Model

  • Architecture: the same as Texel-4. ResSR, a residual CNN with PixelShuffle upsampling and a nearest-neighbour skip; 128 channels, 80 convolutions, 11.97M parameters.
  • Training: fine-tuned from Texel-4 for 10k steps with a detail reward:
    • VGG19 texture statistics (Gram matrices), VGG feature distance and pixel L1.
    • Training crops favour busy texture patches.
    • Inputs carry heavy BC1 and JPEG damage, like real game files.
    • An FFT penalty stops the model from inventing a repeating pixel-grid pattern. Every check was run on real, unshrunk textures.

Results

83 terrain textures from Breath of the Wild, shrunk 2Γ— and upscaled back. "Perceptual distance" compares VGG19 features: lower means it looks closer to the real texture. "Detail" is fine-detail energy relative to the real texture, where 1.0 means equally detailed.

Method PSNR Perceptual distance ↓ Detail Colour shift
Lanczos 33.98 dB 0.697 0.30 0.1/255
Texel-4 35.46 dB 0.599 0.52 0.3/255
Texel-4.1 33.94 dB 0.538 0.92 0.5/255
Real-ESRGAN x2plus 30.00 dB 0.834 0.60 8.2/255

On 100 DIV2K photos, Texel-4.1 scores 30.60 dB against 27.17 dB for Real-ESRGAN x2plus, and keeps 0.95 of the real detail against 0.73.

In real use (actual 1024Β² textures upscaled to 2048Β², nothing shrunk), Texel-4.1 adds no visible repeating pattern. Its grid-pattern peak is 23–60, against about 20 for Texel-4 and 244–331 for Real-ESRGAN.

Limitations:

  • PSNR is about 1.5 dB lower than Texel-4. That's the cost of the extra detail: some of the grain it adds is plausible rather than the exact original.
  • On photos, Texel-4 is usually the better choice.

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, plus 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 or Stress Level Zero.

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