Akegarasu / Akegarasu/lora-scripts

无法针对flux-fill-dev训练lora

未关闭
#666 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
6.1k
派生
699
PR 合并指标
30 天内没有已合并 PR

描述

- 系统环境
Python 3.10.9
脚本版本:v1.12.0
ubuntu22.0.4

- 问题描述:
使用了flux.1-dev训练lora运行正常,但当我把模型文件更换成models/unet/flux1-fill-dev.safetensors时,报错信息如下:
```shell
Traceback (most recent call last):
File "/data/lora-scripts/./scripts/dev/flux_train_network.py", line 559, in
trainer.train(args)
File "/data/lora-scripts/scripts/dev/train_network.py", line 571, in train
model_version, text_encoder, vae, unet = self.load_target_model(args, weight_dtype, accelerator)
File "/data/lora-scripts/./scripts/dev/flux_train_network.py", line 98, in load_target_model
self.is_schnell, model = flux_utils.load_flow_model(
File "/data/lora-scripts/scripts/dev/library/flux_utils.py", line 136, in load_flow_model
info = model.load_state_dict(sd, strict=False, assign=True)
File "/data/lora-scripts/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2215, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Flux:
size mismatch for img_in.weight: copying a param with shape torch.Size([3072, 384]) from checkpoint, the shape in current model is torch.Size([3072, 64]).
```
查询资料发现修复次错误需要创建meta.jsonl配置文件,并设置`conditioning_image_column = "conditioning_image"`,但我在GUI下并没有找到在哪里填写`meta.jsonl`的文件路径和增加`conditioning_image_column`配置的地方。
请问使用本GUI训练fill需要如何配置呢?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。