为unet训练第二阶段添加lora微调方法、加载lora权重推理方法#129
Closed
Ustinianer wants to merge 2 commits intobytedance:mainfrom
Closed
Conversation
|
你好,能分享一下训练方法吗?好像除了准备数据,还需要改一些配置啥的,我折腾了一下没弄出来 |
Author
Author
|
@Ustinianer 你好,请教下,如果只使用某个人3-5分钟的视频做lora训练,能不能让这个数字人嘴唇更像本人呢 |
|
load lora config报错啦: [rank0]: Traceback (most recent call last):
[rank0]: File "<frozen runpy>", line 198, in _run_module_as_main
[rank0]: File "<frozen runpy>", line 88, in _run_code
[rank0]: File "/root/LatentSync/scripts/train_unet.py", line 548, in <module>
[rank0]: main(config)
[rank0]: File "/root/LatentSync/scripts/train_unet.py", line 165, in main
[rank0]: lora_config = LoraConfig(
[rank0]: ^^^^^^^^^^^
[rank0]: File "<string>", line 31, in __init__
[rank0]: File "/usr/local/miniconda3/envs/py312/lib/python3.12/site-packages/peft/tuners/lora/config.py", line 418, in __post_init__
[rank0]: super().__post_init__()
[rank0]: File "/usr/local/miniconda3/envs/py312/lib/python3.12/site-packages/peft/config.py", line 67, in __post_init__
[rank0]: raise ValueError(
[rank0]: ValueError: Invalid task type: 'IMAGE_GENERATION'. Must be one of the following task types: SEQ_CLS, SEQ_2_SEQ_LM, CAUSAL_LM, TOKEN_CLS, QUESTION_ANS, FEATURE_EXTRACTION. |
|
latentsysc更新到1.5版本了。大佬啥时候有空适配一下 |
|
大佬,help |
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




使用lora方法,可将显存占用降到40g以下,实现在A100-40g设备上微调
实测在以下配置下使用lora微调,A100-40g显存占用约38g
target_modules: ["to_q", "to_k", "to_v"]
lora_alpha: 1
lora_dropout: 0.0
bias: "none"
r: 8