Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'time_embed.0.weight' #478

Closed
thibaudart opened this issue Mar 29, 2023 · 0 comments
Closed

KeyError: 'time_embed.0.weight' #478

thibaudart opened this issue Mar 29, 2023 · 0 comments

Comments

@thibaudart
Copy link

I launch a training, stop it and want to continue it.

I set the source model as the model of the latest epoch and the resume from saved training state to the latest state folder. Everyelse are similar.

I got this issue:

Traceback (most recent call last):
File "D:\kohya_ss\train_network.py", line 699, in
train(args)
File "D:\kohya_ss\train_network.py", line 126, in train
text_encoder, vae, unet, _ = train_util.load_target_model(args, weight_dtype)
File "D:\kohya_ss\library\train_util.py", line 2547, in load_target_model
text_encoder, vae, unet = model_util.load_models_from_stable_diffusion_checkpoint(args.v2, name_or_path)
File "D:\kohya_ss\library\model_util.py", line 877, in load_models_from_stable_diffusion_checkpoint
converted_unet_checkpoint = convert_ldm_unet_checkpoint(v2, state_dict, unet_config)
File "D:\kohya_ss\library\model_util.py", line 234, in convert_ldm_unet_checkpoint
new_checkpoint["time_embedding.linear_1.weight"] = unet_state_dict["time_embed.0.weight"]
KeyError: 'time_embed.0.weight'

bmaltais pushed a commit that referenced this issue May 7, 2023
jstayco added a commit to jstayco/kohya_ss that referenced this issue May 9, 2023
commit cb74a17
Author: bmaltais <bernard@ducourier.com>
Date:   Mon May 8 20:50:54 2023 -0400

    Update some module versions

commit fe874aa
Author: bmaltais <bernard@ducourier.com>
Date:   Sun May 7 16:14:19 2023 -0400

    Update run_cmd_training syntax

commit b158cb3
Author: bmaltais <bernard@ducourier.com>
Date:   Sun May 7 15:49:55 2023 -0400

    Consider gradient_accumulation_steps for steps calculation

commit b902846
Author: bmaltais <bernard@ducourier.com>
Date:   Sun May 7 15:30:10 2023 -0400

    Implement Adaptive noise scale

commit 344b4af
Author: bmaltais <bernard@ducourier.com>
Date:   Sun May 7 10:08:31 2023 -0400

    Update DAdaptation requirements

commit 3393bb8
Author: bmaltais <bernard@ducourier.com>
Date:   Sun May 7 10:06:47 2023 -0400

    Add support for new DAdaptation optimizer in GUI

commit 80057b5
Merge: 6769cb1 3b1af3f
Author: bmaltais <bernard@ducourier.com>
Date:   Sun May 7 10:02:21 2023 -0400

    Merge branch 'main' of https://github.com/kohya-ss/sd-scripts into dev

commit 3b1af3f
Merge: e6ad3cb 437501c
Author: Kohya S <52813779+kohya-ss@users.noreply.github.com>
Date:   Sun May 7 21:20:55 2023 +0900

    Merge pull request bmaltais#484 from kohya-ss/dev

    more dadapataion optimizer, move docs, adaptive noise scale etc.

commit 437501c
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sun May 7 21:18:13 2023 +0900

    update readme

commit 8bd2072
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sun May 7 21:15:20 2023 +0900

    update readme

commit 85df289
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sun May 7 21:00:06 2023 +0900

    remove gradio from requirements

commit 8856496
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sun May 7 20:59:02 2023 +0900

    update link to documents

commit a7df7db
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sun May 7 20:56:42 2023 +0900

    move documents to docs folder

commit 59507c7
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sun May 7 20:50:19 2023 +0900

    update documents

commit 6769cb1
Author: bmaltais <bernard@ducourier.com>
Date:   Sun May 7 07:11:59 2023 -0400

    Fix bad default conversion value

commit ac81ead
Merge: dcab64e 7daa164
Author: bmaltais <bernard@ducourier.com>
Date:   Sun May 7 07:07:31 2023 -0400

    Merge branch 'dev' of https://github.com/bmaltais/kohya_ss into dev

commit dcab64e
Author: bmaltais <bernard@ducourier.com>
Date:   Sun May 7 07:07:28 2023 -0400

    Fix issue with noise offset

commit 09c719c
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sun May 7 18:09:08 2023 +0900

    add adaptive noise scale

commit e54b631
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sun May 7 10:23:25 2023 +0900

    do not save cuda_rng_state if no cuda closes bmaltais#390

commit fdbdb47
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sun May 7 09:57:54 2023 +0900

    pre calc LoRA in generating

commit 7daa164
Author: Bernard Maltais <bernard@ducourier.com>
Date:   Sat May 6 11:26:59 2023 -0400

    Reverting to bitsandbytes 0.35.0

commit 165fc43
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sat May 6 18:25:26 2023 +0900

    fix comment

commit 42cbf75
Merge: 2127907 e6ad3cb
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sat May 6 18:22:45 2023 +0900

    Merge branch 'main' into dev

commit e6ad3cb
Merge: ad5f318 cb1076e
Author: Kohya S <52813779+kohya-ss@users.noreply.github.com>
Date:   Sat May 6 18:22:19 2023 +0900

    Merge pull request bmaltais#478 from rockerBOO/patch-1

    Typo for LoRA name

commit 2127907
Author: Kohya S <ykumeykume@gmail.com>
Date:   Sat May 6 18:14:16 2023 +0900

    refactor selection and logging for DAdaptation

commit 164a197
Author: 青龍聖者@bdsqlsz <865105819@qq.com>
Date:   Sat May 6 16:30:09 2023 +0800

    Support for more Dadaptation (bmaltais#455)

    * Update train_util.py for add DAdaptAdan and DAdaptSGD

    * Update train_util.py for DAdaptadam

    * Update train_network.py for dadapt

    * Update train_README-ja.md for DAdapt

    * Update train_util.py for DAdapt

    * Update train_network.py for DAdaptAdaGrad

    * Update train_db.py for DAdapt

    * Update fine_tune.py for DAdapt

    * Update train_textual_inversion.py for DAdapt

    * Update train_textual_inversion_XTI.py for DAdapt

commit cb1076e
Author: Dave Lage <rockerboo@gmail.com>
Date:   Thu May 4 09:49:30 2023 -0400

    Typo for LoRA name

    LoRA-C3Liar to LoRA-C3Lier to match the definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant