kohya_ss训练lora报错:RuntimeError: Error(s) in loading state_dict for SdxlUNet2DConditionModel

报错截图:
在这里插入图片描述
原因是因为基模是基于SD1.5训练的,但是在khoya_ss的UI界面勾选了SDXL model导致报错:
在这里插入图片描述
取消勾选就行了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
create LoRA network. base dim (rank): 64, alpha: 32 neuron dropout: p=None, rank dropout: p=None, module dropout: p=None create LoRA for Text Encoder: 72 modules. create LoRA for U-Net: 192 modules. enable LoRA for text encoder enable LoRA for U-Net Traceback (most recent call last): File "D:\lora_lian\sd-scripts\train_network.py", line 873, in <module> train(args) File "D:\lora_lian\sd-scripts\train_network.py", line 242, in train info = network.load_weights(args.network_weights) File "D:\lora_lian\sd-scripts\networks\lora.py", line 884, in load_weights info = self.load_state_dict(weights_sd, False) File "D:\lora_lian\python\lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for LoRANetwork: size mismatch for lora_unet_mid_block_attentions_0_proj_out.lora_up.weight: copying a param with shape torch.Size([1280, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([1280, 64, 1, 1]). Traceback (most recent call last): File "D:\lora_lian\python\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\lora_lian\python\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 1114, in <module> main() File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 1110, in main launch_command(args) File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 1104, in launch_command simple_launcher(args) File "D:\lora_lian\python\lib\site-packages\accelerate\commands\launch.py", line 567, in simple_launcher raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) subprocess.CalledProcessError: Command '['D:\\lora_lian\\python\\python.exe', './sd-scripts/train_network.py', '--config_file', 'D:\\lora_lian\\toml\\autosave\\20230709-112914.toml']' returned non-zero exit status 1. Training failed / 训练失败
07-10

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值