每日签到 地址发布 老王说明书 宣传中心 繁/简
讨论怎么用ai搞涩涩
查看: 2.5K|回复: 3
收起左侧

[随便聊聊] 求大佬指教在用秋叶炼丹炉训练lora模型时失败怎么回事

[复制链接]
发表于 2025-12-16 12:21:21 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?免费注册

x
12:06:01-953368 INFO     Training started with config file / 训练开始,使用配置文件:
                         E:\comfyuiCHAJIAN\loraXUNLIAN\config\autosave\20251216-120601.toml
12:06:01-955358 INFO     Task efb22f10-546b-4cfb-a283-5da34db8ad08 created
2025-12-16 12:06:08 INFO     Loading settings from                                                    train_util.py:4012
                             E:\comfyuiCHAJIAN\loraXUNLIAN\config\autosave\20251216-120601.toml...
                    INFO     E:\comfyuiCHAJIAN\loraXUNLIAN\config\autosave\20251216-120601            train_util.py:4031
2025-12-16 12:06:08 INFO     prepare tokenizer                                                        train_util.py:4558
2025-12-16 12:06:12 INFO     update token length: 255                                                 train_util.py:4575
                    INFO     Using DreamBooth method.                                               train_network.py:172
                    INFO     prepare images.                                                          train_util.py:1686
                    INFO     found directory E:\comfyuiCHAJIAN\loraXUNLIAN\train\ysy\30_ysy contains  train_util.py:1633
                             35 image files
                    INFO     1050 train images with repeating.                                        train_util.py:1727
                    INFO     0 reg images.                                                            train_util.py:1730
                    WARNING  no regularization images / 正則化画像が見つかりませんでした              train_util.py:1735
                    INFO     [Dataset 0]                                                              config_util.py:572
                               batch_size: 1
                               resolution: (512, 512)
                               enable_bucket: True
                               network_multiplier: 1.0
                               min_bucket_reso: 256
                               max_bucket_reso: 1024
                               bucket_reso_steps: 64
                               bucket_no_upscale: True

                               [Subset 0 of Dataset 0]
                                 image_dir: "E:\comfyuiCHAJIAN\loraXUNLIAN\train\ysy\30_ysy"
                                 image_count: 35
                                 num_repeats: 30
                                 shuffle_caption: False
                                 keep_tokens: 0
                                 keep_tokens_separator:
                                 caption_separator: ,
                                 secondary_separator: None
                                 enable_wildcard: False
                                 caption_dropout_rate: 0.0
                                 caption_dropout_every_n_epoches: 0
                                 caption_tag_dropout_rate: 0.0
                                 caption_prefix: None
                                 caption_suffix: None
                                 color_aug: False
                                 flip_aug: False
                                 face_crop_aug_range: None
                                 random_crop: False
                                 token_warmup_min: 1,
                                 token_warmup_step: 0,
                                 alpha_mask: False,
                                 is_reg: False
                                 class_tokens: ysy
                                 caption_extension: .txt


                    INFO     [Dataset 0]                                                              config_util.py:578
                    INFO     loading image sizes.                                                      train_util.py:901
100%|███████████████████████████████████████████████████████████████████████████████| 35/35 [00:00<00:00, 17545.19it/s]
                    INFO     make buckets                                                              train_util.py:907
                    WARNING  min_bucket_reso and max_bucket_reso are ignored if bucket_no_upscale is   train_util.py:924
                             set, because bucket reso is defined by image size automatically /
                             bucket_no_upscaleが指定された場合は、bucketの解像度は画像サイズから自動計
                             算されるため、min_bucket_resoとmax_bucket_resoは無視されます
                    INFO     number of images (including repeats) /                                    train_util.py:953
                             各bucketの画像枚数(繰り返し回数を含む)
                    INFO     bucket 0: resolution (512, 512), count: 1050                              train_util.py:958
                    INFO     mean ar error (without repeats): 0.0                                      train_util.py:963
                    INFO     preparing accelerator                                                  train_network.py:225
accelerator device: cuda
                    INFO     loading model for process 0/1                                            train_util.py:4716
                    INFO     load StableDiffusion checkpoint:                                         train_util.py:4672
                             E:/秋叶/ComfyUI-aki-v2/ComfyUI/models/diffusion_models/majicflus_v10.saf
                             etensors
Traceback (most recent call last):
  File "E:\comfyuiCHAJIAN\loraXUNLIAN\scripts\stable\train_network.py", line 1242, in <module>
    trainer.train(args)
  File "E:\comfyuiCHAJIAN\loraXUNLIAN\scripts\stable\train_network.py", line 234, in train
    model_version, text_encoder, vae, unet = self.load_target_model(args, weight_dtype, accelerator)
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\comfyuiCHAJIAN\loraXUNLIAN\scripts\stable\train_network.py", line 101, in load_target_model
    text_encoder, vae, unet, _ = train_util.load_target_model(args, weight_dtype, accelerator)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\comfyuiCHAJIAN\loraXUNLIAN\scripts\stable\library\train_util.py", line 4718, in load_target_model
    text_encoder, vae, unet, load_stable_diffusion_format = _load_target_model(
                                                            ^^^^^^^^^^^^^^^^^^^
  File "E:\comfyuiCHAJIAN\loraXUNLIAN\scripts\stable\library\train_util.py", line 4673, in _load_target_model
    text_encoder, vae, unet = model_util.load_models_from_stable_diffusion_checkpoint(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\comfyuiCHAJIAN\loraXUNLIAN\scripts\stable\library\model_util.py", line 1005, in load_models_from_stable_diffusion_checkpoint
    converted_unet_checkpoint = convert_ldm_unet_checkpoint(v2, state_dict, unet_config)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\comfyuiCHAJIAN\loraXUNLIAN\scripts\stable\library\model_util.py", line 267, in convert_ldm_unet_checkpoint
    new_checkpoint["time_embedding.linear_1.weight"] = unet_state_dict["time_embed.0.weight"]
                                                       ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'time_embed.0.weight'
12:06:13-397552 ERROR    Training failed / 训练失败




















































































































































































































































































































































































































































































































































































回复

使用道具 举报

发表于 2025-12-22 16:15:04 | 显示全部楼层
建议遇到报错直接找AI问一下。
Gemini给出的回复是:
核心原因: 你正在尝试用 SD1.5 (Stable Diffusion 1.x) 的训练配置/脚本去加载一个 Flux 架构的大模型。

我看了一下Gemmini的完整回复,它猜测你训练使用的底模是flux架构的,这不一定对,但是可以说明问题。
各种模型之间的架构不同,因此不能使用相同的训练方法,你可以去下载这个底模的网站看一下这个模型的底模(Base Model),然后在训练的时候选择适合的脚本。
回复 支持 1 反对 0

使用道具 举报

 楼主| 发表于 2025-12-31 12:34:54 | 显示全部楼层
ICRS 发表于 2025-12-22 16:15
建议遇到报错直接找AI问一下。
Gemini给出的回复是:
核心原因: 你正在尝试用 SD1.5 (Stable Diffusion 1. ...

谢谢谢谢
回复 支持 反对

使用道具 举报

发表于 2026-1-9 17:27:58 手机版 | 显示全部楼层
大部分问题可以直接复制下来,直接扔给AI,他会处理,kimi、DeepSeek、Grok等等都行
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册
点击进行验证

本版积分规则

我们不生产资源,只做资源的搬运工。

广告合作-tags标签-app下载-Archiver-小黑屋-