Add files using upload-large-folder tool
Browse files
Viso_Master_Models/gfpgan-1024.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee8dd6415e388b3a410689d5d9395a2bf50b5973b588421ebfa57bc266f19e24
|
| 3 |
+
size 365875079
|
Viso_Master_Models/ref-ldm_embedding/configs/ldm.yaml
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 5.0e-05
|
| 3 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 4 |
+
params:
|
| 5 |
+
monitor: val/ddim_latent_l1_loss_ema
|
| 6 |
+
val_loss_run_ddim_steps: 200
|
| 7 |
+
linear_start: 0.0015
|
| 8 |
+
linear_end: 0.0155
|
| 9 |
+
log_every_t: 100
|
| 10 |
+
timesteps: 1000
|
| 11 |
+
loss_type: l2
|
| 12 |
+
image_size: 64
|
| 13 |
+
channels: 8
|
| 14 |
+
first_stage_key: gt_image
|
| 15 |
+
first_stage_config:
|
| 16 |
+
target: ldm.models.autoencoder.VQModelInterface
|
| 17 |
+
params:
|
| 18 |
+
ckpt_path: ./ckpts/vqgan.ckpt
|
| 19 |
+
embed_dim: 8
|
| 20 |
+
n_embed: 8192
|
| 21 |
+
monitor: val/rec_loss
|
| 22 |
+
ddconfig:
|
| 23 |
+
double_z: false
|
| 24 |
+
z_channels: 8
|
| 25 |
+
resolution: 512
|
| 26 |
+
in_channels: 3
|
| 27 |
+
out_ch: 3
|
| 28 |
+
ch: 128
|
| 29 |
+
ch_mult:
|
| 30 |
+
- 1
|
| 31 |
+
- 1
|
| 32 |
+
- 2
|
| 33 |
+
- 4
|
| 34 |
+
num_res_blocks: 2
|
| 35 |
+
attn_resolutions: []
|
| 36 |
+
dropout: 0.0
|
| 37 |
+
lossconfig:
|
| 38 |
+
target: torch.nn.Identity
|
| 39 |
+
cond_stage_config:
|
| 40 |
+
- cond_stage_key: lq_image
|
| 41 |
+
conditioning_key: concat
|
| 42 |
+
uncond_prob: 0.1
|
| 43 |
+
cond_model_config: __is_first_stage__
|
| 44 |
+
unet_config:
|
| 45 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 46 |
+
params:
|
| 47 |
+
image_size: 64
|
| 48 |
+
in_channels: 16
|
| 49 |
+
out_channels: 8
|
| 50 |
+
model_channels: 160
|
| 51 |
+
channel_mult:
|
| 52 |
+
- 1
|
| 53 |
+
- 2
|
| 54 |
+
- 2
|
| 55 |
+
- 4
|
| 56 |
+
attention_resolutions:
|
| 57 |
+
- 2
|
| 58 |
+
- 4
|
| 59 |
+
- 8
|
| 60 |
+
num_res_blocks: 2
|
| 61 |
+
num_head_channels: 32
|
| 62 |
+
use_spatial_transformer: false
|
| 63 |
+
perceptual_loss_scale: 0.0
|
| 64 |
+
perceptual_loss_weight_by_t: true
|
| 65 |
+
perceptual_loss_config:
|
| 66 |
+
target: ldm.modules.losses.identity_loss.IdentityLoss
|
| 67 |
+
params:
|
| 68 |
+
model_path: ./pretrained/insightface_webface_r50.onnx
|
| 69 |
+
center_crop: true
|
| 70 |
+
resize_hw:
|
| 71 |
+
- 112
|
| 72 |
+
- 112
|
| 73 |
+
data:
|
| 74 |
+
target: main.DataModuleFromConfig
|
| 75 |
+
params:
|
| 76 |
+
batch_size: 5
|
| 77 |
+
num_workers: 10
|
| 78 |
+
wrap: false
|
| 79 |
+
train:
|
| 80 |
+
target: ldm.data.ir.ImageRestorationDataset
|
| 81 |
+
params:
|
| 82 |
+
use_given_lq: false
|
| 83 |
+
use_given_ref: false
|
| 84 |
+
file_list: ./data/ffhq/file_list/train.csv
|
| 85 |
+
gt_dir: ./data/ffhq/images512x512
|
| 86 |
+
image_size:
|
| 87 |
+
- 512
|
| 88 |
+
- 512
|
| 89 |
+
degrad_opt:
|
| 90 |
+
blur_kernel_list:
|
| 91 |
+
- iso
|
| 92 |
+
- aniso
|
| 93 |
+
blur_kernel_prob:
|
| 94 |
+
- 0.5
|
| 95 |
+
- 0.5
|
| 96 |
+
blur_kernel_size: 41
|
| 97 |
+
blur_sigma:
|
| 98 |
+
- 0
|
| 99 |
+
- 16
|
| 100 |
+
downsample_range:
|
| 101 |
+
- 1
|
| 102 |
+
- 32
|
| 103 |
+
noise_range:
|
| 104 |
+
- 0
|
| 105 |
+
- 20
|
| 106 |
+
jpeg_range:
|
| 107 |
+
- 30
|
| 108 |
+
- 100
|
| 109 |
+
lr_flip_aug: true
|
Viso_Master_Models/ref-ldm_embedding/configs/refldm.yaml
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 5.0e-05
|
| 3 |
+
lr_schedule:
|
| 4 |
+
type: linear_warmup
|
| 5 |
+
warmup_steps: 10000
|
| 6 |
+
target: ldm.models.diffusion.ddpm.LatentDiffusion
|
| 7 |
+
params:
|
| 8 |
+
ckpt_path: ./ckpts/ldm.ckpt
|
| 9 |
+
ignore_keys:
|
| 10 |
+
- model_ema
|
| 11 |
+
monitor: val/ddim_latent_l1_loss_ema
|
| 12 |
+
val_loss_run_ddim_steps: 200
|
| 13 |
+
linear_start: 0.0015
|
| 14 |
+
linear_end: 0.0155
|
| 15 |
+
log_every_t: 100
|
| 16 |
+
timesteps: 1000
|
| 17 |
+
loss_type: l2
|
| 18 |
+
image_size: 64
|
| 19 |
+
channels: 8
|
| 20 |
+
first_stage_key: gt_image
|
| 21 |
+
first_stage_config:
|
| 22 |
+
target: ldm.models.autoencoder.VQModelInterface
|
| 23 |
+
params:
|
| 24 |
+
ckpt_path: ./ckpts/vqgan.ckpt
|
| 25 |
+
embed_dim: 8
|
| 26 |
+
n_embed: 8192
|
| 27 |
+
monitor: val/rec_loss
|
| 28 |
+
ddconfig:
|
| 29 |
+
double_z: false
|
| 30 |
+
z_channels: 8
|
| 31 |
+
resolution: 512
|
| 32 |
+
in_channels: 3
|
| 33 |
+
out_ch: 3
|
| 34 |
+
ch: 128
|
| 35 |
+
ch_mult:
|
| 36 |
+
- 1
|
| 37 |
+
- 1
|
| 38 |
+
- 2
|
| 39 |
+
- 4
|
| 40 |
+
num_res_blocks: 2
|
| 41 |
+
attn_resolutions: []
|
| 42 |
+
dropout: 0.0
|
| 43 |
+
lossconfig:
|
| 44 |
+
target: torch.nn.Identity
|
| 45 |
+
cond_stage_config:
|
| 46 |
+
- cond_stage_key: lq_image
|
| 47 |
+
conditioning_key: concat
|
| 48 |
+
uncond_prob: 0.1
|
| 49 |
+
cond_model_config: __is_first_stage__
|
| 50 |
+
- cond_stage_key: ref_image
|
| 51 |
+
conditioning_key: cache_kv
|
| 52 |
+
uncond_prob: 0.1
|
| 53 |
+
cond_model_config: __is_first_stage__
|
| 54 |
+
use_cache_kv: true
|
| 55 |
+
unet_config:
|
| 56 |
+
target: ldm.modules.diffusionmodules.openaimodel.UNetModel
|
| 57 |
+
params:
|
| 58 |
+
use_checkpoint: false
|
| 59 |
+
image_size: 64
|
| 60 |
+
in_channels: 16
|
| 61 |
+
out_channels: 8
|
| 62 |
+
model_channels: 160
|
| 63 |
+
attention_resolutions:
|
| 64 |
+
- 2
|
| 65 |
+
- 4
|
| 66 |
+
- 8
|
| 67 |
+
num_res_blocks: 2
|
| 68 |
+
channel_mult:
|
| 69 |
+
- 1
|
| 70 |
+
- 2
|
| 71 |
+
- 2
|
| 72 |
+
- 4
|
| 73 |
+
num_head_channels: 32
|
| 74 |
+
use_spatial_transformer: false
|
| 75 |
+
perceptual_loss_scale: 0.1
|
| 76 |
+
perceptual_loss_weight_by_t: true
|
| 77 |
+
perceptual_loss_config:
|
| 78 |
+
target: ldm.modules.losses.identity_loss.IdentityLoss
|
| 79 |
+
params:
|
| 80 |
+
model_path: ./pretrained/insightface_webface_r50.onnx
|
| 81 |
+
center_crop: true
|
| 82 |
+
resize_hw:
|
| 83 |
+
- 112
|
| 84 |
+
- 112
|
| 85 |
+
data:
|
| 86 |
+
target: main.DataModuleFromConfig
|
| 87 |
+
params:
|
| 88 |
+
batch_size: 1
|
| 89 |
+
num_workers: 8
|
| 90 |
+
wrap: false
|
| 91 |
+
train:
|
| 92 |
+
target: ldm.data.ir.ImageRestorationDataset
|
| 93 |
+
params:
|
| 94 |
+
use_given_lq: false
|
| 95 |
+
use_given_ref: true
|
| 96 |
+
max_num_refs: 5
|
| 97 |
+
ref_rand_aug: true
|
| 98 |
+
shuffle_refs_prob: 1.0
|
| 99 |
+
use_sample_weight: false
|
| 100 |
+
file_list: ./data/ffhq/file_list/train_references.csv
|
| 101 |
+
gt_dir: ./data/ffhq/images512x512
|
| 102 |
+
ref_dir: ./data/ffhq/images512x512
|
| 103 |
+
image_size:
|
| 104 |
+
- 512
|
| 105 |
+
- 512
|
| 106 |
+
degrad_opt:
|
| 107 |
+
blur_kernel_list:
|
| 108 |
+
- iso
|
| 109 |
+
- aniso
|
| 110 |
+
blur_kernel_prob:
|
| 111 |
+
- 0.5
|
| 112 |
+
- 0.5
|
| 113 |
+
blur_kernel_size: 41
|
| 114 |
+
blur_sigma:
|
| 115 |
+
- 0
|
| 116 |
+
- 16
|
| 117 |
+
downsample_range:
|
| 118 |
+
- 1
|
| 119 |
+
- 32
|
| 120 |
+
noise_range:
|
| 121 |
+
- 0
|
| 122 |
+
- 20
|
| 123 |
+
jpeg_range:
|
| 124 |
+
- 30
|
| 125 |
+
- 100
|
| 126 |
+
lr_flip_aug: true
|
Viso_Master_Models/ref-ldm_embedding/configs/vqgan.yaml
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
base_learning_rate: 0.0001
|
| 3 |
+
lr_schedule:
|
| 4 |
+
type: cosine
|
| 5 |
+
max_steps: 200000
|
| 6 |
+
warmup_steps: 10000
|
| 7 |
+
min_lr_scale: 0.01
|
| 8 |
+
target: taming.models.vqgan.VQModel
|
| 9 |
+
params:
|
| 10 |
+
embed_dim: 8
|
| 11 |
+
n_embed: 8192
|
| 12 |
+
monitor: val/rec_loss
|
| 13 |
+
ddconfig:
|
| 14 |
+
double_z: false
|
| 15 |
+
z_channels: 8
|
| 16 |
+
resolution: 512
|
| 17 |
+
in_channels: 3
|
| 18 |
+
out_ch: 3
|
| 19 |
+
ch: 128
|
| 20 |
+
ch_mult:
|
| 21 |
+
- 1
|
| 22 |
+
- 1
|
| 23 |
+
- 2
|
| 24 |
+
- 4
|
| 25 |
+
num_res_blocks: 2
|
| 26 |
+
attn_resolutions: []
|
| 27 |
+
dropout: 0.0
|
| 28 |
+
lossconfig:
|
| 29 |
+
target: taming.modules.losses.vqperceptual.VQLPIPSWithDiscriminator
|
| 30 |
+
params:
|
| 31 |
+
disc_conditional: false
|
| 32 |
+
disc_in_channels: 3
|
| 33 |
+
disc_start: 30001
|
| 34 |
+
disc_weight: 0.8
|
| 35 |
+
codebook_weight: 1.0
|
| 36 |
+
data:
|
| 37 |
+
target: main.DataModuleFromConfig
|
| 38 |
+
params:
|
| 39 |
+
batch_size: 32
|
| 40 |
+
num_workers: 32
|
| 41 |
+
train:
|
| 42 |
+
target: taming.data.base.ImageDataset
|
| 43 |
+
params:
|
| 44 |
+
size:
|
| 45 |
+
- 512
|
| 46 |
+
- 512
|
| 47 |
+
root_dir: ./data/ffhq/images1024x1024
|
| 48 |
+
file_list: ./data/ffhq/train_image.txt
|
| 49 |
+
validation:
|
| 50 |
+
target: taming.data.base.ImageDataset
|
| 51 |
+
params:
|
| 52 |
+
size:
|
| 53 |
+
- 512
|
| 54 |
+
- 512
|
| 55 |
+
root_dir: ./data/ffhq/images1024x1024
|
| 56 |
+
file_list: ./data/ffhq/val_image.txt
|
Viso_Master_Models/ref_ldm_unet_external_kv.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56edbea2aaf0361607645bbe0f35ce07ff8ddce80ee0ef617af305d50d251154
|
| 3 |
+
size 471789072
|