cetini18 commited on
Commit
2760bb5
·
verified ·
1 Parent(s): 5075c8f

Add JiT-SR EMA checkpoints (lrfeat_nofdl and lrskip_nofdl, constant-LR epoch 38)

Browse files
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: image-to-image
4
+ library_name: pytorch
5
+ tags:
6
+ - super-resolution
7
+ - image-restoration
8
+ - one-step
9
+ - jit
10
+ - pixel-space
11
+ ---
12
+
13
+ # JiT-SR: one-step pixel-space 4x super-resolution
14
+
15
+ Checkpoints of [JiT-SR](https://github.com/nitec427/jit-sr), a JiT-B/16 (Just image Transformer) adapted to **one-step 4x real-world super-resolution that works directly on pixels** (512 x 512 output, no VAE, no diffusion sampling loop). The input is the bicubic-upsampled low-resolution image and the output is the high-resolution image.
16
+
17
+ The files hold the **EMA weights** (`model_ema1`), which every reported result uses. The discriminator and optimiser are not included.
18
+
19
+ | Folder | Variant | Epoch | Params | GMACs (512 x 512) |
20
+ |---|---|---:|---:|---:|
21
+ | `lrfeat_nofdl_c70_ep38` | resize_res decoder + LR skip + LR feature pyramid, no FDL (best fidelity) | 38 (constant-LR continuation) | 136.0 M | 134.9 |
22
+ | `lrskip_nofdl_c70_ep38` | resize_res decoder + LR skip, no FDL | 38 (constant-LR continuation) | 135.5 M | 127.5 |
23
+
24
+ Each folder has `model.safetensors` (fp32, about 0.55 GB) and `config.json` (the model flags and metadata).
25
+
26
+ ## Results (4x, 512 x 512 output, one step)
27
+
28
+ RealSR (100 images) and DRealSR (93 images). *Raw* is the model output; *AdaIN* applies a per-channel mean and standard-deviation match to the upsampled LR input (as in StableSR) and uses no ground truth. Lower is better for LPIPS, DISTS, FID; higher for the rest.
29
+
30
+ | Model | Set | Output | PSNR | SSIM | LPIPS | DISTS | FID | MUSIQ |
31
+ |---|---|---|---:|---:|---:|---:|---:|---:|
32
+ | `lrfeat_nofdl_c70_ep38` | RealSR | raw | 25.72 | 0.737 | 0.263 | 0.206 | 112.1 | 66.6 |
33
+ | | RealSR | AdaIN | 26.62 | 0.745 | 0.261 | 0.203 | 112.3 | 66.4 |
34
+ | | DRealSR | raw | 28.20 | 0.766 | 0.296 | 0.211 | 138.7 | 61.8 |
35
+ | | DRealSR | AdaIN | 29.45 | 0.781 | 0.288 | 0.207 | 137.9 | 61.5 |
36
+ | `lrskip_nofdl_c70_ep38` | RealSR | raw | 25.48 | 0.730 | 0.265 | 0.207 | 117.8 | 66.1 |
37
+ | | RealSR | AdaIN | 26.47 | 0.739 | 0.261 | 0.204 | 118.0 | 66.0 |
38
+ | | DRealSR | raw | 27.93 | 0.764 | 0.294 | 0.212 | 139.5 | 61.8 |
39
+ | | DRealSR | AdaIN | 29.30 | 0.780 | 0.285 | 0.207 | 137.0 | 61.5 |
40
+
41
+ More metrics (CLIPIQA, CLIPIQA+, MANIQA, TOPIQ, NIQE, A-FINE), the DIV2K results and the comparison with other one-step methods are in the [GitHub repository](https://github.com/nitec427/jit-sr) (`docs/c70_eval.md`, `docs/postprocessing.md`, `docs/pocketsr_comparison.md`). The two evaluation sets are small, so differences below about 0.1 dB PSNR or 0.002 LPIPS are within noise.
42
+
43
+ ## Usage
44
+
45
+ The model code is in the GitHub repository; this repo only holds weights.
46
+
47
+ ```bash
48
+ git clone https://github.com/nitec427/jit-sr && cd jit-sr
49
+ pip install huggingface_hub safetensors
50
+ python scripts/load_hf_checkpoint.py --repo cetini18/jit-sr --subfolder lrfeat_nofdl_c70_ep38 --out lrfeat_nofdl_c70_ep38.pth
51
+ ```
52
+
53
+ The script writes a checkpoint in the format `main_jit.py` reads (`--full_ckpt_path`) and prints the model flags from `config.json`. Run the evaluation with those flags and `--use_ema_eval` (see `eval_ckpt.sh` for the data and metric options). Input images are 128 x 128 crops upsampled to 512 x 512 with bicubic interpolation.
54
+
55
+ ## Training and limitations
56
+
57
+ - Fine-tuned from the 512-px ImageNet JiT-B/16 checkpoint with pixel MSE, LPIPS, DISTS and a U-Net GAN (weight 0.05), then continued at a constant learning rate; the exact recipes are in `docs/runs/` in the GitHub repository.
58
+ - Trained on synthetic degradations only; no real-world paired data was used. Real-world generalisation is therefore limited by how well the degradation pipeline matches real images.
59
+ - The raw output has more local contrast than the ground truth; post-processing such as AdaIN raises PSNR and LPIPS but lowers no-reference scores (see `docs/postprocessing.md`).
60
+ - Evaluated at 512 x 512 only.
61
+
62
+ ## License and credits
63
+
64
+ MIT. Built on the PyTorch re-implementation of JiT by Tianhong Li, based on *Back to Basics: Let Denoising Generative Models Denoise* (Li and He, arXiv:2511.13720).
lrfeat_nofdl_c70_ep38/config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "JiT-B/16 pixel-space one-step 4x super-resolution (regression)",
3
+ "source_run": "r_resres_lrfeat_nofdl",
4
+ "epoch": 38,
5
+ "weights": "EMA (model_ema1); load with --use_ema_eval",
6
+ "img_size": 512,
7
+ "scale": 4,
8
+ "num_sampling_steps": 1,
9
+ "flags": "--model JiT-B/16 --cascaded_io --decoder_type resize_res --decoder_lr_skip --decoder_lr_feat --use_regression --use_ema_eval --img_size 512 --noise_scale 1.0 --cfg 2.9 --interval_min 0.1 --interval_max 1.0 --sampling_method heun --num_sampling_steps 1 --in_context_mode class",
10
+ "params_M": 136.0,
11
+ "gmacs_at_512": 134.9,
12
+ "tensors": 272,
13
+ "numel": 136265807,
14
+ "ema_tensors_replaced": 272
15
+ }
lrfeat_nofdl_c70_ep38/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f332576442c90971ea5a02325e6333c4f0be106bbd37a981064b71d4683f53a4
3
+ size 545091724
lrskip_nofdl_c70_ep38/config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "JiT-B/16 pixel-space one-step 4x super-resolution (regression)",
3
+ "source_run": "r_resres_lrskip_nofdl",
4
+ "epoch": 38,
5
+ "weights": "EMA (model_ema1); load with --use_ema_eval",
6
+ "img_size": 512,
7
+ "scale": 4,
8
+ "num_sampling_steps": 1,
9
+ "flags": "--model JiT-B/16 --cascaded_io --decoder_type resize_res --decoder_lr_skip --use_regression --use_ema_eval --img_size 512 --noise_scale 1.0 --cfg 2.9 --interval_min 0.1 --interval_max 1.0 --sampling_method heun --num_sampling_steps 1 --in_context_mode class",
10
+ "params_M": 135.5,
11
+ "gmacs_at_512": 127.5,
12
+ "tensors": 248,
13
+ "numel": 135796439,
14
+ "ema_tensors_replaced": 248
15
+ }
lrskip_nofdl_c70_ep38/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53d05aa8198d4fee3387e2c600632a010276dd09795aaf3b867148791d718f53
3
+ size 543211340