deepfacelab中文网

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

万能模型的训练方式Liae结构适用吗?

[复制链接]

7

主题

100

帖子

625

积分

高级丹师

Rank: 5Rank: 5

积分
625
 楼主| 发表于 2022-1-10 22:12:47 | 显示全部楼层 |阅读模式
星级打分
  • 1
  • 2
  • 3
  • 4
  • 5
平均分:NAN  参与人数:0  我的评分:未评
本帖最后由 天天好想你 于 2022-1-10 22:47 编辑

DF结构的万能模型训练方式,滚石是这样说的:

1. 只支持DF结构
2. dst丢各种人脸数据进去,越杂越好,src保持单人数据
3. 训练时把true face参数打开,推荐0.01


请教一下:


1. 只支持DF结构。


这个训练方法适用于Liae结构吗?如果不能,那Liae结构的万能模型应该怎么练?


2. dst丢各种人脸数据进去,越杂越好,src保持单人数据。


如果我跟滚石对着干,偏要dst保持单人数据、src放三个妹纸的人脸数据进去,会练出个什么玩意儿?
回复

使用道具 举报

3

主题

93

帖子

1077

积分

初级丹圣

Rank: 8Rank: 8

积分
1077
发表于 2022-6-27 22:00:16 | 显示全部楼层
我在mrDeepFakes上找到答案了。贴在这里。大家有看不懂的可以问我,我在DFL方面是小白,但是因为在美国留过学,所以英文还可以。
注意:RTM其实就是咱们论坛常说的万能丹,ReadyToMerge字面意思是“直接合成”的模型,意思是不用训练。

10.3 RTM Training Workflow:

With introduction of DeepFaceLive (DFLive) a new training workflow has been established, contrary to what some users think this isn't a new training method and does not differ significantly from regular training and this training method has been employed by some people in one way or another, you may have yourself create one by accident without even realizing it.

RTM models (ReadyToMerge) are created by training an SRC set of the person we want to swap against large and varied DST set containing random faces of many people which covers all possible angles, expressions and lighting conditions. The SRC set must also have large variety of faces. The goal of RTM model training is to create a model that can apply our SRC face to any video, primarly for use with DeepFaceLive but also to speed up training process within DeepFaceLab 2.0 by creating a base model that can very quickly adapt to new target videos in less time compared to training a model from scratch.

The recommended type of models for use with RTM workklow are SAEHD LIAE models, LIAE-UD or LIAE-UDT thanks to their superior color and lighting matching capabilities as well as being able to adapt better to different face shapes than DF architecture.
AMP models can also be used to create RTM models, although they work a bit differently and as I lack know-how to explain AMP workflow yet I will only focus on LIAE RTM model training in this part of the guide.

1. Start by preparing SRC set: make sure you cover all possible angles, each with as many different lighting conditions and expressions, the better the coverage of different possible faces, the better results will be.

2. Prepare a DST set by collecting many random faces: this dataset must also have as much variety as possible, this dataset can be truly random, consisting of both masculine and femine faces of all sorts of skin colors or it can be specific to for example black masucline faces or feminine asian faces if that's the type of target face you plan on primarly use the model with, the more variety and more faces in the set the longer it will take to train a model.
ALTERNATIVELY - USE RTM WF dataset from iperov: https://tinyurl.com/2p9cvt25
If the link is dead go to https://github.com/iperov/DeepFaceLab and find torrent/magnet link to DFL builds as they contain the RTM WF dataset along them.

3. Apply XSeg masks to both datasets: this will ensure model correctly trains and as with any other training is require in order to create WF model and while it's optional for FF models it's still recommended to apply XSeg mask of the correct type to both datasets, make sure you use the same XSeg model for both datasets.

4. Pretrain a new model or use one that you already pretrained: pretrain for at least 600k-1kk iterations.

5. Start training on your SRC and random DST. If you are using an existing RTM model that you or someone else trained as your base model instead of pretrained model delete inter_ab file from the "model" folder before proceeding to train it:

NEW WORKFLOW:

Pretrain or download a WF LIAE-UDT SAEHD model (due to better SRC likenes -UDT variant can achieve, if you can't run LIAE-UDT model, pretrain or use an existing pretrained LIAE-UD model).

Resolution: 224 or higher. Face Type: WF.
Dims: AE: 512, E: 64, D: 64, D Masks: 32
Settings: EMP Enabled, Blur Out Mask Enabled, UY Enabled, LRD Enabled, BS:8 (if you can't run your model with high enough BS follow standard procedures to reduce model parameters: archi, dims, optimizer, optimizer/lrd on cpu).
Others options should be left at default values. Optionally use HSV at power 0.1 and CT mode that works best for you, usually RCT.

Make a backup before every stage or enable auto backups.

1. Train 2.000.000 iters with RW enabled and delete inter_AB.npy every 500k iters (save and stop model training, delete the file and resume training)
2. After deleting inter_AB 4th time train extra 500k with RW enabled.
3. If swapped face looks more like DST, delete inter_AB and repeat step 2.
4. Disable RW and train for additional 500k iters.
5. Enable GAN at power 0.1 with GAN_Dims:32 and Patch Size being 1/8th of your model resolution for 800.000k iters.

ALTERNATIVE EXPERIMENTAL WORKFLOW (NOT TESTED):

Follow the same steps as in the new workflow except do not train with EMP and LRD enabled all the time, instead near the end of step 2/3 run the model a bit with RW Enabled and LRD enabled until loss stops decreasing, then move on to step 4 by disabling both RW and LRD, after 400-500k run EMP for about 100-200k and then disable EMP and enable LRD for yet another 100-200k. UY can be left enabled all the time or disabled and enabled halfway through steps 2/3 and later halfway through step 4.
回复 支持 2 反对 0

使用道具 举报

0

主题

131

帖子

1098

积分

初级丹圣

Rank: 8Rank: 8

积分
1098
发表于 2022-1-10 22:15:17 | 显示全部楼层
好想法,建议楼主试试告诉我们结果
回复 支持 反对

使用道具 举报

14

主题

587

帖子

5972

积分

高级丹圣

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

积分
5972
发表于 2022-1-10 22:18:58 | 显示全部楼层
dst保持单人数据、src放三个妹纸的人脸数据进去=pretained
回复 支持 反对

使用道具 举报

10

主题

220

帖子

1196

积分

初级丹圣

Rank: 8Rank: 8

积分
1196
发表于 2022-1-10 22:27:08 | 显示全部楼层
不懂帮顶
回复

使用道具 举报

8

主题

238

帖子

2402

积分

初级丹圣

Rank: 8Rank: 8

积分
2402
发表于 2022-1-10 22:41:29 | 显示全部楼层
参数略有不同吧,跟随一下楼主
回复 支持 反对

使用道具 举报

10

主题

2828

帖子

1万

积分

高级丹圣

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

积分
17198

万事如意节日勋章

发表于 2022-1-10 22:47:45 | 显示全部楼层
不懂帮顶
回复

使用道具 举报

8

主题

400

帖子

3484

积分

高级丹圣

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

积分
3484
发表于 2022-1-10 22:53:02 | 显示全部楼层
我自己的经验,DF结构跟万能模型完全不搭,非常不适合。我自己实验的也好,滚石自己的杨幂模型也好,效果都不好。LIAE结构才是万能模型的理想选择,作者也有在官方英文论坛贴出训练方法,感兴趣可以去找一下
回复 支持 反对

使用道具 举报

11

主题

84

帖子

578

积分

高级丹师

Rank: 5Rank: 5

积分
578
发表于 2022-1-11 00:11:11 | 显示全部楼层
不懂幫頂
回复

使用道具 举报

1

主题

861

帖子

5990

积分

高级丹圣

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

积分
5990

万事如意节日勋章

发表于 2022-1-11 01:52:40 | 显示全部楼层
不懂帮顶
回复

使用道具 举报

11

主题

305

帖子

3324

积分

高级丹圣

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

积分
3324
发表于 2022-1-11 01:56:59 | 显示全部楼层
dsyrock 发表于 2022-1-10 22:53
我自己的经验,DF结构跟万能模型完全不搭,非常不适合。我自己实验的也好,滚石自己的杨幂模型也好,效果都 ...

求链接指路
回复 支持 反对

使用道具 举报

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

GMT+8, 2024-11-28 05:37 , Processed in 0.150765 second(s), 41 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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