Image-to-Image
PyTorch
ONNX
TensorRT
English
super-resolution
image-restoration
sisr
real-world-restoration
spandrel
chainner
transformer
attention
Instructions to use Phips/HEART with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TensorRT
How to use Phips/HEART with TensorRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Add HEART v2 training config
Browse files
configs/4x_HEART_pretrain_v2.yml
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 4x_HEART_pd12m_full_200k
|
| 2 |
+
scale: 4
|
| 3 |
+
use_amp: true
|
| 4 |
+
amp_bf16: true
|
| 5 |
+
use_channels_last: true
|
| 6 |
+
fast_matmul: false
|
| 7 |
+
use_compile: true
|
| 8 |
+
compile_mode: reduce-overhead
|
| 9 |
+
num_gpu: auto
|
| 10 |
+
manual_seed: 1024
|
| 11 |
+
datasets:
|
| 12 |
+
train:
|
| 13 |
+
name: PD12M full
|
| 14 |
+
type: pairedimagedataset
|
| 15 |
+
dataroot_gt:
|
| 16 |
+
- /home/phips/Documents/dataset/pd12m/new/pd12m_train_full_gt
|
| 17 |
+
dataroot_lq:
|
| 18 |
+
- /home/phips/Documents/dataset/pd12m/new/pd12m_train_full_lr_x4
|
| 19 |
+
lq_size: 128
|
| 20 |
+
use_hflip: true
|
| 21 |
+
use_rot: true
|
| 22 |
+
num_worker_per_gpu: 8
|
| 23 |
+
batch_size_per_gpu: 2
|
| 24 |
+
accum_iter: 1
|
| 25 |
+
val:
|
| 26 |
+
name: Urban100 x4
|
| 27 |
+
type: pairedimagedataset
|
| 28 |
+
dataroot_gt:
|
| 29 |
+
- /home/phips/Documents/dataset/Urban100/HR
|
| 30 |
+
dataroot_lq:
|
| 31 |
+
- /home/phips/Documents/dataset/Urban100/x4
|
| 32 |
+
filename_tmpl: '{}'
|
| 33 |
+
network_g:
|
| 34 |
+
type: heart
|
| 35 |
+
use_checkpoint: false
|
| 36 |
+
rank: 8
|
| 37 |
+
attention_freq: 2
|
| 38 |
+
path:
|
| 39 |
+
param_key_g: null
|
| 40 |
+
strict_load_g: true
|
| 41 |
+
resume_state: null
|
| 42 |
+
pretrain_network_g: experiments/heart_pretrain/models/heart_4x_pretrain.safetensors
|
| 43 |
+
train:
|
| 44 |
+
ema_decay: 0.999
|
| 45 |
+
ema_power: 0.75
|
| 46 |
+
grad_clip: false
|
| 47 |
+
grad_clip_max_norm: 100
|
| 48 |
+
optim_g:
|
| 49 |
+
type: AdamW
|
| 50 |
+
lr: 0.0001
|
| 51 |
+
weight_decay: 0
|
| 52 |
+
betas:
|
| 53 |
+
- 0.9
|
| 54 |
+
- 0.99
|
| 55 |
+
scheduler:
|
| 56 |
+
type: MultiStepLR
|
| 57 |
+
milestones:
|
| 58 |
+
- 100000
|
| 59 |
+
- 160000
|
| 60 |
+
gamma: 0.5
|
| 61 |
+
total_iter: 200000
|
| 62 |
+
warmup_iter: -1
|
| 63 |
+
losses:
|
| 64 |
+
- type: charbonnierloss
|
| 65 |
+
loss_weight: 1.0
|
| 66 |
+
val:
|
| 67 |
+
val_enabled: true
|
| 68 |
+
val_freq: 5000
|
| 69 |
+
save_img: false
|
| 70 |
+
tile_size: 0
|
| 71 |
+
tile_overlap: 8
|
| 72 |
+
metrics_enabled: true
|
| 73 |
+
metrics:
|
| 74 |
+
psnr:
|
| 75 |
+
type: calculate_psnr
|
| 76 |
+
crop_border: 4
|
| 77 |
+
test_y_channel: true
|
| 78 |
+
ssim:
|
| 79 |
+
type: calculate_ssim
|
| 80 |
+
crop_border: 4
|
| 81 |
+
test_y_channel: true
|
| 82 |
+
topiq:
|
| 83 |
+
type: calculate_topiq
|
| 84 |
+
lpips:
|
| 85 |
+
type: calculate_lpips
|
| 86 |
+
better: lower
|
| 87 |
+
save_best: true
|
| 88 |
+
early_stop: true
|
| 89 |
+
early_stop_metric: psnr
|
| 90 |
+
early_stop_patience: 4
|
| 91 |
+
early_stop_min_delta: 0.0
|
| 92 |
+
logger:
|
| 93 |
+
print_freq: 100
|
| 94 |
+
save_checkpoint_freq: 10000
|
| 95 |
+
save_checkpoint_format: safetensors
|
| 96 |
+
use_tb_logger: true
|