Texel-4 (2ร upscaler for game textures)
Texel-4 is a 2ร image upscaler built for game textures: 1024ยฒ textures to 2048ยฒ, or 1080p to 4K. It was trained to undo the damage textures usually carry, including BC1/DXT block grids, JPEG blocking, noise and banding, while doubling the resolution.
Download one file: Texel-4_2x_fp32.onnx (48 MB). It works with any input size and the output is always exactly 2ร.
Using it
chaiNNer (no Python)
- Download
Texel-4_2x_fp32.onnx. - 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_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. Outputoutput:[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: ResSR, a residual CNN (zero-initialised residual blocks, PixelShuffle upsampling, nearest-neighbour skip). 128 channels, 80 convolutions, 11.97M parameters.
- Training: L1 loss only (no GAN), 100k steps, batch 16, 96 px patches, cosine learning rate. It was grown in depth from the earlier Texel 3.5 model.
- Degradations used in training: downscaling plus a randomised mix of JPEG, BC1, noise and banding.
Results (held-out game textures, PSNR)
| Input | Texel 3.5 | Texel-4 |
|---|---|---|
| Clean | 40.08 dB | 40.13 dB |
| Mixed damage | 37.65 dB | 37.77 dB |
| JPEG/BC1 artifacts | 34.52 dB | 34.74 dB |
On textures compressed with a real codec (JPEG, WebP, AVIF, H.264, BC1), Texel-4 beats the clean-trained Texel 3.2 by 0.24 to 2.66 dB and wins on 98โ100% of textures. On real BC1 game textures it removes the 4ร4 block grid rather than sharpening it.
Limitations: it's a PSNR-trained model, so it reconstructs rather than inventing detail. Very busy textures such as gravel can look slightly painted.
Training data and license
Texel-4 was trained on textures from The Legend of Zelda: Breath of the Wild and Bonelab. Those textures belong to their copyright holders, and none of them are included here. This model is shared for non-commercial, personal and modding use only. It isn't affiliated with or endorsed by Nintendo or Stress Level Zero.