A lightweight and fast transformer network for x2 upscaling.
1. Train:
python train.py --data_dir "dataset folder" --lr 0.0001 --w_perceptual 0.1 --w_fft 0.5 --output_dir "model" \
--lr_size 128 --hr_size 256 --batch_size 8 --num_workers 8 --dim 512 --depth 8 --heads 8 --window 16
To train the neural network, we used high‑quality images with a size of 1024×1024. If you use images of a different size, you will need to modify the SRDataset class in the train.py file.
2. Inference:
python test.py --image images/image_000000359.jpg --weights model.pth --output result.png
Here are a few results of the neural network’s work. The neural network has never seen these images — they are not part of the training dataset.
On the left is an image with a resolution of 256x256 pixels, enlarged from 128x128 image using the LANCZOS method, on the right using this neural network.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support










