deepfacelab中文网

 找回密码
 立即注册(仅限QQ邮箱)
查看: 1405|回复: 15

enabel GAN to learn small details of the face【持续更新】

[复制链接]

4

主题

10

帖子

145

积分

高级丹童

Rank: 2

积分
145
 楼主| 发表于 2022-1-18 15:54:41 | 显示全部楼层 |阅读模式
星级打分
  • 1
  • 2
  • 3
  • 4
  • 5
平均分:NAN  参与人数:0  我的评分:未评
本帖最后由 yajun 于 2022-1-20 10:25 编辑

中间这几十万的训练好像没有明显改善了,loss不动
接下来开启 GAN 学习面部细节,Loss 明显下降

GAN-20220118-155003.png
参数:
Running trainer.

Choose one of saved models, or enter a name to create a new model.
[r] : rename
[d] : delete

[0] : RTM Liae-UD-256 - latest
:
0
Loading RTM Liae-UD-256_SAEHD model...

Choose one or several GPU idxs (separated by comma).

[CPU] : CPU
  [0] : NVIDIA GeForce RTX 3090

[0] Which GPU indexes to choose? :
0

Press enter in 2 seconds to override model settings.
[4] Autobackup every N hour ( 0..24 ?:help ) : 8
8
[n] Write preview history ( y/n ?:help ) :
n
[2000000] Target iteration :
2000000
[n] Flip SRC faces randomly ( y/n ?:help ) :
n
[y] Flip DST faces randomly ( y/n ?:help ) :
y
[16] Batch_size ( ?:help ) :
16
[n] Masked training ( y/n ?:help ) : y
[y] Eyes and mouth priority ( y/n ?:help ) :
y
[y] Uniform yaw distribution of samples ( y/n ?:help ) :
y
[y] Blur out mask ( y/n ?:help ) :
y
[y] Place models and optimizer on GPU ( y/n ?:help ) :
y
[y] Use AdaBelief optimizer? ( y/n ?:help ) :
y
[y] Use learning rate dropout ( n/y/cpu ?:help ) :
y
[y] Enable random warp of samples ( y/n ?:help ) : n
[0.05] Random hue/saturation/light intensity ( 0.0 .. 0.3 ?:help ) :
0.05
[0.0] GAN power ( 0.0 .. 5.0 ?:help ) : ?
Forces the neural network to learn small details of the face. Enable it only when the face is trained enough with lr_dropout(on) and random_warp(off), and don't disable. The higher the value, the higher the chances of artifacts. Typical fine value is 0.1
[0.0] GAN power ( 0.0 .. 5.0 ?:help ) : 0.1
0.1
[32] GAN patch size ( 3-640 ?:help ) :
32
[16] GAN dimensions ( 4-512 ?:help ) :
16
[0.0] Face style power ( 0.0..100.0 ?:help ) : ?
Learn the color of the predicted face to be the same as dst inside mask. If you want to use this option with 'whole_face' you have to use XSeg trained mask. Warning: Enable it only after 10k iters, when predicted face is clear enough to start learn style. Start from 0.001 value and check history changes. Enabling this option increases the chance of model collapse.
[0.0] Face style power ( 0.0..100.0 ?:help ) :
0.0
[0.0] Background style power ( 0.0..100.0 ?:help ) : ?
Learn the area outside mask of the predicted face to be the same as dst. If you want to use this option with 'whole_face' you have to use XSeg trained mask. For whole_face you have to use XSeg trained mask. This can make face more like dst. Enabling this option increases the chance of model collapse. Typical value is 2.0
[0.0] Background style power ( 0.0..100.0 ?:help ) :
0.0
[lct] Color transfer for src faceset ( none/rct/lct/mkl/idt/sot ?:help ) : ?
Change color distribution of src samples close to dst samples. Try all modes to find the best.
[lct] Color transfer for src faceset ( none/rct/lct/mkl/idt/sot ?:help ) :
lct
[n] Enable gradient clipping ( y/n ?:help ) :
n
[n] Enable pretraining mode ( y/n ?:help ) :
n
Initializing models: 100%|###############################################################| 7/7 [00:03<00:00,  1.88it/s]
Loading samples: 100%|############################################################| 1158/1158 [00:02<00:00, 454.60it/s]
Sort by yaw: 100%|#################################################################| 128/128 [00:00<00:00, 4736.36it/s]
Loading samples: 100%|##############################################################| 971/971 [00:02<00:00, 483.61it/s]
Sort by yaw: 100%|#################################################################| 128/128 [00:00<00:00, 3119.29it/s]
================== Model Summary ===================
==                                                ==
==            Model name: RTM Liae-UD-256_SAEHD   ==
==                                                ==
==     Current iteration: 513374                  ==
==                                                ==
==---------------- Model Options -----------------==
==                                                ==
==            resolution: 256                     ==
==             face_type: wf                      ==
==     models_opt_on_gpu: True                    ==
==                 archi: liae-ud                 ==
==               ae_dims: 256                     ==
==                e_dims: 64                      ==
==                d_dims: 64                      ==
==           d_mask_dims: 22                      ==
==       masked_training: True                    ==
==       eyes_mouth_prio: True                    ==
==           uniform_yaw: True                    ==
==             adabelief: True                    ==
==            lr_dropout: y                       ==
==           random_warp: False                   ==
==       true_face_power: 0.0                     ==
==      face_style_power: 0.0                     ==
==        bg_style_power: 0.0                     ==
==               ct_mode: lct                     ==
==              clipgrad: False                   ==
==              pretrain: False                   ==
==       autobackup_hour: 8                       ==
== write_preview_history: False                   ==
==           target_iter: 2000000                 ==
==       random_src_flip: False                   ==
==       random_dst_flip: True                    ==
==            batch_size: 16                      ==
==             gan_power: 0.1                     ==
==        gan_patch_size: 32                      ==
==              gan_dims: 16                      ==
==         blur_out_mask: True                    ==
==      random_hsv_power: 0.05                    ==
==                                                ==
==------------------ Running On ------------------==
==                                                ==
==          Device index: 0                       ==
==                  Name: NVIDIA GeForce RTX 3090 ==
==                  VRAM: 21.17GB                 ==
==                                                ==
====================================================
Starting. Target iteration: 2000000. Press "Enter" to stop training and save model.
[15:34:55][#516028][0534ms][0.4937][0.2940]
1.19:
昨天开启 GAN, 训练到今天早晨的效果


[0.05] Random hue/saturation/light intensity ( 0.0 .. 0.3 ?:help ) :
0.05
[0.1] GAN power ( 0.0 .. 5.0 ?:help ) :
0.1
[32] GAN patch size ( 3-640 ?:help ) :
32
[16] GAN dimensions ( 4-512 ?:help ) :
16
[0.0] Face style power ( 0.0..100.0 ?:help ) : ?
Learn the color of the predicted face to be the same as dst inside mask. If you want to use this option with 'whole_face' you have to use XSeg trained mask. Warning: Enable it only after 10k iters, when predicted face is clear enough to start learn style. Start from 0.001 value and check history changes. Enabling this option increases the chance of model collapse.
[0.0] Face style power ( 0.0..100.0 ?:help ) : 0.001
0.001
[0.0] Background style power ( 0.0..100.0 ?:help ) : ?
Learn the area outside mask of the predicted face to be the same as dst. If you want to use this option with 'whole_face' you have to use XSeg trained mask. For whole_face you have to use XSeg trained mask. This can make face more like dst. Enabling this option increases the chance of model collapse. Typical value is 2.0
[0.0] Background style power ( 0.0..100.0 ?:help ) : 2.0
2.0

训练了一会儿,每个迭代的时间变长了1倍 loss 下降一般般
Starting. Target iteration: 2000000. Press "Enter" to stop training and save model.
[10:59:57][#626909][0993ms][0.3595][0.1564]
[11:24:47][#628445][1020ms][0.3580][0.1565]
[11:49:47][#629974][0979ms][0.3577][0.1559]
[12:14:46][#631529][0936ms][0.3573][0.1560]
[12:39:47][#633090][1431ms][0.3563][0.1557]
[13:04:46][#634659][0981ms][0.3560][0.1556]
[13:29:47][#636231][0966ms][0.3557][0.1548]
[13:54:46][#637802][1005ms][0.3547][0.1544]
[14:19:46][#639370][0961ms][0.3544][0.1547]
[14:44:47][#640943][1148ms][0.3539][0.1543]
[15:09:47][#642517][1315ms][0.3541][0.1546]
[15:34:47][#644084][0972ms][0.3535][0.1544]
[15:49:43][#645024][0991ms][0.3580][0.1722]


要把GAN调大试试,现在的速度太慢了16:00
Forces the neural network to learn small details of the face. Enable it only when the face is trained enough with lr_dropout(on) and random_warp(off), and don't disable. The higher the value, the higher the chances of artifacts. Typical fine value is 0.1
值越高,出现伪影的机会就越高。
增加到 1 试试看
[23:32:40][#671308][1025ms][0.3468][0.1539]
[23:57:31][#672847][0991ms][0.3443][0.1538]
[00:22:30][#674404][1062ms][0.3504][0.1540]
[00:47:30][#675966][0979ms][0.3432][0.1517]
[01:12:30][#677528][0942ms][0.3443][0.1528]
[01:37:30][#679091][1013ms][0.3424][0.1529]
[02:02:30][#680652][1016ms][0.3443][0.1540]
[02:27:30][#682214][0993ms][0.3416][0.1511]
[02:52:30][#683776][0928ms][0.3426][0.1515]
[03:17:30][#685339][0976ms][0.3409][0.1523]
[03:42:31][#686902][1317ms][0.3377][0.1506]
[04:07:31][#688464][1032ms][0.3420][0.1502]
[04:32:30][#690026][0978ms][0.3443][0.1522]
[04:57:30][#691588][0928ms][0.3363][0.1501]
[05:22:31][#693150][0956ms][0.3350][0.1497]
[05:47:30][#694712][0967ms][0.3385][0.1497]
[06:12:30][#696274][0999ms][0.3408][0.1500]
[06:37:30][#697836][0954ms][0.3345][0.1497]
[07:02:30][#699399][0973ms][0.3369][0.1495]
[07:27:33][#700958][0949ms][0.3398][0.1502]
[07:52:30][#702505][1032ms][0.3385][0.1495]
[08:17:31][#704057][1427ms][0.3341][0.1486]
[08:42:30][#705613][0966ms][0.3395][0.1492]
[09:07:30][#707169][0973ms][0.3356][0.1482]
[09:32:30][#708722][0991ms][0.3413][0.1487]
[09:57:30][#710263][0960ms][0.3368][0.1485]
跑了一晚上 效果一般般 【20220120】 loss 下降缓慢,人脸更加模糊了,担心是不是训练坏了,把GAN调整为 0.2 screenshot-20220120-102138.png










回复

使用道具 举报

43

主题

2026

帖子

1万

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
11522
发表于 2022-1-18 16:23:25 | 显示全部楼层
学到了
回复

使用道具 举报

4

主题

10

帖子

145

积分

高级丹童

Rank: 2

积分
145
 楼主| 发表于 2022-1-18 16:38:11 | 显示全部楼层
[0.0] Face style power ( 0.0..100.0 ?:help ) : ?
Learn the color of the predicted face to be the same as dst inside mask. If you want to use this option with 'whole_face' you have to use XSeg trained mask. Warning: Enable it only after 10k iters, when predicted face is clear enough to start learn style. Start from 0.001 value and check history changes. Enabling this option increases the chance of model collapse.

明天再开启这个
回复 支持 反对

使用道具 举报

0

主题

24

帖子

137

积分

高级丹童

Rank: 2

积分
137
发表于 2022-1-18 19:08:49 | 显示全部楼层
啊...我还看不懂这个
回复 支持 反对

使用道具 举报

1

主题

74

帖子

1028

积分

初级丹圣

Rank: 8Rank: 8

积分
1028
发表于 2022-1-18 19:21:04 | 显示全部楼层
可以的,不错,等开Face style power之后再贴个图看看效果?
回复 支持 反对

使用道具 举报

21

主题

171

帖子

2222

积分

初级丹圣

Rank: 8Rank: 8

积分
2222
发表于 2022-1-18 23:03:41 | 显示全部楼层
这就有点高端了
回复 支持 反对

使用道具 举报

1

主题

80

帖子

432

积分

初级丹师

Rank: 3Rank: 3

积分
432
发表于 2022-1-19 00:18:03 | 显示全部楼层
感谢分享
回复

使用道具 举报

19

主题

327

帖子

1万

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
10381
发表于 2022-1-19 09:36:21 | 显示全部楼层
学习一下.
回复

使用道具 举报

4

主题

10

帖子

145

积分

高级丹童

Rank: 2

积分
145
 楼主| 发表于 2022-1-19 11:30:11 | 显示全部楼层
本帖最后由 yajun 于 2022-1-19 15:51 编辑

昨天开启 GAN, 训练到今天早晨的效果
screenshot-20220119-113539.png

[0.05] Random hue/saturation/light intensity ( 0.0 .. 0.3 ?:help ) :
0.05
[0.1] GAN power ( 0.0 .. 5.0 ?:help ) :
0.1
[32] GAN patch size ( 3-640 ?:help ) :
32
[16] GAN dimensions ( 4-512 ?:help ) :
16
[0.0] Face style power ( 0.0..100.0 ?:help ) : ?
Learn the color of the predicted face to be the same as dst inside mask. If you want to use this option with 'whole_face' you have to use XSeg trained mask. Warning: Enable it only after 10k iters, when predicted face is clear enough to start learn style. Start from 0.001 value and check history changes. Enabling this option increases the chance of model collapse.
[0.0] Face style power ( 0.0..100.0 ?:help ) : 0.001
0.001
[0.0] Background style power ( 0.0..100.0 ?:help ) : ?
Learn the area outside mask of the predicted face to be the same as dst. If you want to use this option with 'whole_face' you have to use XSeg trained mask. For whole_face you have to use XSeg trained mask. This can make face more like dst. Enabling this option increases the chance of model collapse. Typical value is 2.0
[0.0] Background style power ( 0.0..100.0 ?:help ) : 2.0
2.0

训练了一会儿,每个迭代的时间变长了1倍 loss 下降一般般
Starting. Target iteration: 2000000. Press "Enter" to stop training and save model.
[10:59:57][#626909][0993ms][0.3595][0.1564]
[11:24:47][#628445][1020ms][0.3580][0.1565]
[11:49:47][#629974][0979ms][0.3577][0.1559]
[12:14:46][#631529][0936ms][0.3573][0.1560]
[12:39:47][#633090][1431ms][0.3563][0.1557]
[13:04:46][#634659][0981ms][0.3560][0.1556]
[13:29:47][#636231][0966ms][0.3557][0.1548]
[13:54:46][#637802][1005ms][0.3547][0.1544]
[14:19:46][#639370][0961ms][0.3544][0.1547]
[14:44:47][#640943][1148ms][0.3539][0.1543]
[15:09:47][#642517][1315ms][0.3541][0.1546]
[15:34:47][#644084][0972ms][0.3535][0.1544]
[15:49:43][#645024][0991ms][0.3580][0.1722]



回复 支持 反对

使用道具 举报

6

主题

407

帖子

2万

积分

高级丹圣

Rank: 13Rank: 13Rank: 13Rank: 13

积分
20547
发表于 2022-1-19 12:00:51 | 显示全部楼层
3090就是牛皮
回复 支持 反对

使用道具 举报

QQ|Archiver|手机版|deepfacelab中文网 |网站地图

GMT+8, 2024-9-20 23:31 , Processed in 0.117580 second(s), 10 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表