Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,130 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
## Checkpoints for SlimFlow
|
| 6 |
+
|
| 7 |
+
```bash
|
| 8 |
+
cd OFTSR
|
| 9 |
+
huggingface-cli download Yuanzhi/OFTSR --local-dir ckpts
|
| 10 |
+
```
|
| 11 |
+
put data at ./val_data
|
| 12 |
+
|
| 13 |
+
########################## FFHQ Generation ##########################
|
| 14 |
+
```bash
|
| 15 |
+
python sample_fm.py --opt configs/ir_fm_ffhq.yml \
|
| 16 |
+
--overrides \
|
| 17 |
+
sample.pre_train_model=ckpts/guided_unet-sigma1.0-no_cond-bs128-loss_l2-lr0.0001-FFHQ-checkpoint_26.pth \
|
| 18 |
+
dataset.val_path='./val_data/ffhq_val_100' \
|
| 19 |
+
sample.num_sample=100 \
|
| 20 |
+
ir.sigma_pertubation=1.0 \
|
| 21 |
+
fm_model.use_cond=false
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
########################## FFHQ Noiseless Restoration ##########################
|
| 25 |
+
#--------------------- multi-step ---------------------
|
| 26 |
+
```bash
|
| 27 |
+
python sample_fm.py --opt configs/ir_fm_ffhq.yml \
|
| 28 |
+
--overrides \
|
| 29 |
+
sample.pre_train_model=ckpts/sr_bicubic-sf4-guided_unet-sigma0.1-bs32-loss_l1-lr0.0001-FFHQ-checkpoint_10.pth \
|
| 30 |
+
dataset.val_path='./val_data/ffhq_val_100' \
|
| 31 |
+
sample.num_sample=100 \
|
| 32 |
+
ir.sigma_y=0. \
|
| 33 |
+
ir.sigma_pertubation=0.1 \
|
| 34 |
+
fm_model.use_cond=true
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
#--------------------- one-step ---------------------
|
| 38 |
+
```bash
|
| 39 |
+
python sample_fm.py --opt configs/dis_fm_ffhq.yml \
|
| 40 |
+
--overrides \
|
| 41 |
+
sample.pre_train_model=ckpts/sr_bicubic-sf4-guided_unet-sigma0.1-bs32-loss_l1-lr1e-05-distil-v_boot-solver_rk2_0.5-dt0.05-w_distil_1.0-w_bound_0.1-w_align_0.01-FFHQ_DIS-checkpoint_2.pth \
|
| 42 |
+
dataset.val_path='./val_data/ffhq_val_100' \
|
| 43 |
+
sample.num_sample=100 \
|
| 44 |
+
ir.sigma_y=0. \
|
| 45 |
+
ir.sigma_pertubation=0.1 \
|
| 46 |
+
fm_model.use_cond=true
|
| 47 |
+
sample.one_step_t=0.99
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
########################## FFHQ Noisy Restoration ##########################
|
| 51 |
+
#--------------------- multi-step ---------------------
|
| 52 |
+
```bash
|
| 53 |
+
python sample_fm.py --opt configs/ir_fm_ffhq.yml \
|
| 54 |
+
--overrides \
|
| 55 |
+
sample.pre_train_model=ckpts/sr_avp-sf4-sigmay_0.05-guided_unet-sigma0.5-bs128-loss_l1-lr0.0001-FFHQ-checkpoint_23.pth \
|
| 56 |
+
dataset.val_path='./val_data/ffhq_val_100' \
|
| 57 |
+
sample.num_sample=100 \
|
| 58 |
+
ir.sigma_y=0.05 \
|
| 59 |
+
ir.sigma_pertubation=0.5 \
|
| 60 |
+
fm_model.use_cond=true
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
#--------------------- one-step ---------------------
|
| 64 |
+
```bash
|
| 65 |
+
python sample_fm.py --opt configs/dis_fm_ffhq.yml \
|
| 66 |
+
--overrides \
|
| 67 |
+
sample.pre_train_model=ckpts/sr_avp-sf4-sigmay_0.05-guided_unet-sigma0.5-bs32-loss_l1-lr2e-05-distil-v_boot-solver_rk2_0.5-dt0.05-w_distil_1.0-w_bound_0.1-w_align_0.01-FFHQ_DIS-checkpoint_24.pth \
|
| 68 |
+
dataset.val_path='./val_data/ffhq_val_100' \
|
| 69 |
+
sample.num_sample=100 \
|
| 70 |
+
ir.sigma_y=0.05 \
|
| 71 |
+
ir.sigma_pertubation=0.5 \
|
| 72 |
+
fm_model.use_cond=true
|
| 73 |
+
sample.one_step_t=0.99
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
########################## DIV2K Noiseless Restoration ##########################
|
| 77 |
+
#--------------------- multi-step ---------------------
|
| 78 |
+
```bash
|
| 79 |
+
python sample_fm.py --opt configs/ir_fm_DIV2K.yml \
|
| 80 |
+
--overrides \
|
| 81 |
+
sample.pre_train_model=ckpts/sr_bicubic-sf4-guided_unet-sigma0.2-bs128-loss_l1-lr1e-05-DIV2K-checkpoint_4.pth \
|
| 82 |
+
dataset.val_path='./val_data/DIV2K_valid_HR' \
|
| 83 |
+
sample.num_sample=100 \
|
| 84 |
+
sample.psnr_batch_size=1 \
|
| 85 |
+
ir.sigma_y=0. \
|
| 86 |
+
ir.sigma_pertubation=0.2 \
|
| 87 |
+
fm_model.use_cond=true
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
#--------------------- one-step ---------------------
|
| 91 |
+
```bash
|
| 92 |
+
python sample_fm.py --opt configs/dis_fm_DIV2K.yml \
|
| 93 |
+
--overrides \
|
| 94 |
+
sample.pre_train_model=ckpts/sr_bicubic-sf4-guided_unet-sigma0.2-bs32-loss_l1-lr1e-05-distil-v_boot-solver_rk2_0.5-dt0.05-w_distil_1.0-w_bound_0.1-w_align_0.01-DIV2K_DIS-checkpoint_5.pth \
|
| 95 |
+
dataset.val_path='./val_data/ffhq_val_100' \
|
| 96 |
+
sample.num_sample=100 \
|
| 97 |
+
sample.psnr_batch_size=1 \
|
| 98 |
+
ir.sigma_y=0. \
|
| 99 |
+
ir.sigma_pertubation=0.2 \
|
| 100 |
+
fm_model.use_cond=true
|
| 101 |
+
sample.one_step_t=0.99
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
########################## ImageNet Noiseless Restoration ##########################
|
| 107 |
+
#--------------------- multi-step ---------------------
|
| 108 |
+
```bash
|
| 109 |
+
python sample_fm.py --opt configs/ir_fm_imagenet.yml \
|
| 110 |
+
--overrides \
|
| 111 |
+
sample.pre_train_model=ckpts/sr_bicubic-sf4-guided_unet-sigma0.2-bs32-loss_l1-lr1e-04-ImageNet-checkpoint_10.pth \
|
| 112 |
+
dataset.val_path='./val_data/imagenet_val_100' \
|
| 113 |
+
sample.num_sample=100 \
|
| 114 |
+
ir.sigma_y=0. \
|
| 115 |
+
ir.sigma_pertubation=0.2 \
|
| 116 |
+
fm_model.use_cond=true
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
#--------------------- one-step ---------------------
|
| 120 |
+
```bash
|
| 121 |
+
python sample_fm.py --opt configs/dis_fm_DIV2K.yml \
|
| 122 |
+
--overrides \
|
| 123 |
+
sample.pre_train_model=ckpts/sr_bicubic-sf4-guided_unet-sigma0.2-bs8-loss_l1-lr1e-04-distil-v_boot-solver_rk2_0.5-dt0.05-w_distil_1.0-w_bound_0.1-w_align_0.01-ImageNet_DIS-checkpoint_10.pth \
|
| 124 |
+
dataset.val_path='./val_data/imagenet_val_100' \
|
| 125 |
+
sample.num_sample=100 \
|
| 126 |
+
ir.sigma_y=0. \
|
| 127 |
+
ir.sigma_pertubation=0.2 \
|
| 128 |
+
fm_model.use_cond=true
|
| 129 |
+
sample.one_step_t=0.99
|
| 130 |
+
```
|