Closed hanruishiren closed 3 months ago
Exact same issue here, I trained my first Lora and I get this error when I want to use it.
same issue here
I tested:
Comparing these two tests, I think the problem is from dreambooth, but not from sdwebui.
FYI.
What hash/revision? I'll revert
On Thu, Jan 25, 2024, 1:52 AM hanruishiren @.***> wrote:
I tested:
- Training the lora weight by the elder version of sdwebui and dreambooth extension, then I loaded the lora weight in the latest sdwebui and generated the images with my instance word. Everything is ok.
- Training the lora weight by the latest version of sdwebui and dreambooth extension, then I loaded the lora weight in the latest sdwebui, sdwebui report the error as my topic says.
Comparing these two tests, I think the problem is from dreambooth, but not from sdwebui.
FYI.
— Reply to this email directly, view it on GitHub https://github.com/d8ahazard/sd_dreambooth_extension/issues/1439#issuecomment-1909558977, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMO4NCXVXCM3HRLHBJGSKTYQIFLVAVCNFSM6AAAAABBYGCBYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBZGU2TQOJXG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I ran through all the recent commit changes and the last commit that works is (731da11)f9c800ac39e0a9a668d716ce76a151453 on 21NOV23.
bump
This issue is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days
Same issue
This issue is stale because it has been open for 14 days with no activity. Remove stale label or comment or this will be closed in 30 days
Same issue
same issue
I don't get it. The purpose of this software is to create models, but the resulting models cannot be used for months now. But this bug report again and again turns "stale", while the project is obviously active (see commits)
can somebody please help? All LORA model generations fail as shown above.
I ran through all the recent commit changes and the last commit that works is (731da11)f9c800ac39e0a9a668d716ce76a151453 on 21NOV23.
doesn't work, same issue with this commit
webui v1.7.0 with dreambooth extension 1.1.0 doesn't have this problem I don't recommend downgrading though, because LORA training of that version has other problems
webui HEAD with dreambooth 1.1.0 also works this seems to be related to a change in diffusers, that dreambooth was trying to adapt to in https://github.com/d8ahazard/sd_dreambooth_extension/commit/797cb64723add661d9c009347cdb9e42b0de32c8 but fails
The reason for this error message: AssertionError:Could not find a module type (out of ModuleTypeLora,ModuleTypeHada,ModuleTypela3,ModuleTypeLokr,ModuleTypeFu 11,ModuleTypeNorm,ModuleTypeGLora,ModuleTypeOFT)that would accept those keys:0.attn1.to_k.lora_down.weight,0.attn1.to_k.1o ra_up.weight,0.attni.to_out.0.lora_down.weight,0.attn1.to_out.0.lora_up.weight,0.attn1.to_q.lora_down.weight,0.attn1.to_q.1o ra_up.weight,0.attni.to_v.lora_down.weight,0.attni.to_v.lora_up.weight,0.attn2.to_k.lora_down.weight,0.attn2.to_k.lora_up.we ight,0.attn2.to_out.0.lora_down.weight,0.attn2.to_out.0.lora_up.weight,0.attn2.to_q.lora_down.weight,0.attn2.to_q.lora_up.we ight,0.attn2.to_v.lora_down.weight,0.attn2.to_v.lora_up.weight
is that the keys for the weights in LORAs generated by this extension are different from what sd expects.
SD expects for example
...blocks_0_attn1_to_k.lora_down.weight
while dreambooth generates files with
...blocks.0.attn1.to_k.lora_down.weight
Is anybody with knowledge of the dreambooth codebase able fix it? Should be simple enough to do now that the cause is clear. The first one is apparently how diffusers generates it, and it must be converted for SD. Which dreambooth apparently tries to do in diff_to_sd.py, but not completely.
Here is a conversion script that shows nicely the differences between diffusers and SD LORA keys, in the comments at the beginning: https://gist.github.com/eavae/a336029601f726737a0fd070f44c2f8a
This issue is stale because it has been open for 14 days with no activity. Remove stale label or comment or this will be closed in 30 days
this extension should be deprecated and removed from webui, if nobody takes care of major problems. this issue is not stale or closed. it wastes people's time thinking this extension still works.
This issue is stale because it has been open for 14 days with no activity. Remove stale label or comment or this will be closed in 30 days
Is there an existing issue for this?
What happened?
The LORA weight trained by the latest version of dreambooth extension can't be loaded, and can't not be used by SD.
Steps to reproduce the problem
I updated sdwebui(A1111) and dreambooth extension(this) to the latest version, and also the requirements. (btw: the old version of sdwebui and dreambooth extension are well runing on another PC which was built 5 month ago by me.)
Then I start to train my lora as usual.
During the training, everything is fine, nothing unusual.
But when I test the trained LORA weights (mylor4lor4_3600.safetensors), the prompt is "mylor4lor4", the bug comes, as below.
A1111 can generates images but without loading my lora weight, only loading the checkpoint weight.
Commit and libraries
Console logs
Additional information