stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: loras not working on new update
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
since new update when i try to use loras get the error below and images dont come out with loras implemented
Steps to reproduce the problem
- Go to ....
- Press ....
- ...
What should have happened?
output images with my loras
Commit where the problem happens
b08500c
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
--xformers --theme=dark --autolaunch
List of extensions
Console logs
loading Lora C:\StableDiffusion\stable-diffusion-webui\models\Lora\Trained\rad.safetensors: AttributeError9, 3.06it/s]
Traceback (most recent call last):
File "C:\StableDiffusion\stable-diffusion-webui\extensions-builtin\Lora\lora.py", line 218, in load_loras
lora = load_lora(name, lora_on_disk.filename)
File "C:\StableDiffusion\stable-diffusion-webui\extensions-builtin\Lora\lora.py", line 137, in load_lora
is_sd2 = 'model_transformer_resblocks' in shared.sd_model.lora_layer_mapping
File "C:\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1614, in __getattr__
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'LatentDiffusion' object has no attribute 'lora_layer_mapping'
Additional information
No response
Possible duplicate of #10326. Switch to the previous stable release for now.
#10326, might be related but I was having both issues, characters dropping out of LoRA names with that issue, and this issue of 'LatentDiffusion' object has no attribute 'lora_layer_mapping'
I figured out some models seem to let me "load" the LoRA without this error, then I can switch models and the error goes away for now.
Looks like a fix will be released soon based on the 1.2.1 candidate in the dev branch.
Yup, same, loras are all faulting out. Great not just me. How do you roll back to the last working version? There's a code you can input to force it to a version right? I don't remember how to do it.
Ah right.
"git log
Pick the hash you want
git checkout
hmm, I think I went to one from a few days ago and it's still not recognizing the loras. Is it a conflict in the new controlnet?
This is the error, rolling back didn't help, it didn't have an issue till I updated all my plugins, which i did to get the new controlnet. This happens for every lora I try to use.
loading Lora L:\supersd2\stabdif3\models\Lora\1970RetroFuturism.safetensors: AttributeError Traceback (most recent call last): File "L:\supersd2\stabdif3\extensions-builtin\Lora\lora.py", line 218, in load_loras lora = load_lora(name, lora_on_disk.filename) File "L:\supersd2\stabdif3\extensions-builtin\Lora\lora.py", line 137, in load_lora is_sd2 = 'model_transformer_resblocks' in shared.sd_model.lora_layer_mapping File "L:\supersd2\stabdif3\venv\lib\site-packages\torch\nn\modules\module.py", line 1614, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'LatentDiffusion' object has no attribute 'lora_layer_mapping'
I had the same problem, but I found that it could be solved by switching CheckPoint once
I had the same problem, but I found that it could be solved by switching CheckPoint once
That worked thanks!!
I had the same problem, but I found that it could be solved by switching CheckPoint once
Thanks
I can't reproduce this one. It is definitely unrelated to #10326 which is fixed in 1.2.1 RC, but does not happen for me.
I can't reproduce this one. It is definitely unrelated to #10326 which is fixed in 1.2.1 RC, but does not happen for me.
the problem still exists in v1.2.1
FYI, running v1.2.1, I've just met this bug, but it went away when I switched checkpoint (and then back) as noted by naevo.
I update is now, and i got this error!! and loras dont load!
Error loading script: lora_script.py
Traceback (most recent call last):
File "F:\SD\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "F:\SD\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "
Getting the same issue in v 1.2.1 and was also fixed by swapping checkpoints.
Edit: Oddly the checkpoint swap is now not working...
for me swapping checkpoints dont work!
Happens to me now too, updated now and yesterday ( around 20 hours ago ) and yesterday worked
edit : which would mean this may be an extension problem since the repo didn't update since 3 days ? I'm not sure if that's true ?
IMPORTANT EDIT 2 : Uninstall the locon, extension y'all... this is it
None of the solutions here are working for me.
Edit:
Go To Settings > Additional Network and add the path (\stable-diffusion-webui\models\Lora) to: "Extra paths to scan for LoRA models [...]"
https://github.com/kohya-ss/sd-webui-additional-networks/issues/177#issue-1701564848
Fixed it for me
mine suddenly began to work from night to day! really strange
I found a solution,go to extension tab and click "Apply and restart UI",error will be solved,i install locon extension,so i guess this error maybe some extension bug.
Is the a1111-sd-webui-locon
extension still needed for LyCORIS support? I think so, but I couldn't find a definitive answer.
https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/39ec4f06ffb2c26e1298b2c5d80874dc3fd693ac breaks it completely
loading Lora /ai/stable-diffusion-webui/stable-diffusion-webui/models/Lora/somefolder/somelora.safetensors: TypeError
Traceback (most recent call last):
File "/ai/stable-diffusion-webui/stable-diffusion-webui/extensions/a1111-sd-webui-locon/scripts/../../../extensions-builtin/Lora/lora.py", line 253, in load_loras
lora = load_lora(name, lora_on_disk)
File "/ai/stable-diffusion-webui/stable-diffusion-webui/extensions/a1111-sd-webui-locon/scripts/main.py", line 367, in load_lora
lora.mtime = os.path.getmtime(filename)
File "/home/kadah/anaconda3/envs/a1111/lib/python3.10/genericpath.py", line 55, in getmtime
return os.stat(filename).st_mtime
TypeError: stat: path should be string, bytes, os.PathLike or integer, not LoraOnDisk
I've submitted a PR for the above with a1111-sd-webui-locon
. https://github.com/KohakuBlueleaf/a1111-sd-webui-locon/pull/39
Mine just stopped working with all these error below. i've tried changing CKPT, --reset, but none of those work.
Error loading script: inpaint.py
Traceback (most recent call last):
File "C:\ai\stable-diffusion-webui\modules\scripts.py", line 257, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\ai\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "
Error loading script: knn2img.py
Traceback (most recent call last):
File "C:\ai\stable-diffusion-webui\modules\scripts.py", line 257, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\ai\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "
Error loading script: train_searcher.py
Traceback (most recent call last):
File "C:\ai\stable-diffusion-webui\modules\scripts.py", line 257, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\ai\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "
Just move all your loras to the Lycoris folder (if you don't have it, install lycoris), then trigger them like you would a locon. lyco: instead of lora:
My mistake, I meant Lycoris folder, if you don't have that in your models folder install lycoris.
On Wed, May 24, 2023 at 5:52 PM Timothy Maggenti @.***> wrote:
So where is this locon folder to move my loras too, which boberto3000 speaks of?
— Reply to this email directly, view it on GitHub https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/10342#issuecomment-1562105979, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3XWJ4CCFO5WXYCLFYH24P3XH2UN7ANCNFSM6AAAAAAYAS7XKM . You are receiving this because you commented.Message ID: @.***>
This has just started happing for me after latest commit, 20ae71f may27, none of the solutions above have fixed it , , only solution is to go back to commit c3eced2 of 2 weeks ago
This has just started happing for me after latest commit, 20ae71f may27, none of the solutions above have fixed it , , only solution is to go back to commit c3eced2 of 2 weeks ago
Hi, can you tell me how I can go back to the previous version? I tried "git checkout c3eced2" but it doesn't work.
This has just started happing for me after latest commit, 20ae71f may27, none of the solutions above have fixed it , , only solution is to go back to commit c3eced2 of 2 weeks ago
Hi, can you tell me how I can go back to the previous version? I tried "git checkout c3eced2" but it doesn't work.
I just downloaded the lora.py file off the older(working) commit and replaced it on the current(broken) commit. That solved my issues with the LORA files stopped working.
Updating all Extensions (Extensions tab -> check for updates -> apply and restart) worked for me
Updating extensions is exactly what broke it for me.
Update: I did a git pull
, and things seem to be working again.
Happens to me now too, updated now and yesterday ( around 20 hours ago ) and yesterday worked
edit : which would mean this may be an extension problem since the repo didn't update since 3 days ? I'm not sure if that's true ?
IMPORTANT EDIT 2 : Uninstall the locon, extension y'all... this is it
Thank you very much this solve the issue for me, I LOVE YOU.
I have updated my extensions and lora is still broken for me.
AttributeError: 'LatentDiffusion' object has no attribute 'lora_layer_mapping'
Might need to update Automatic1111 as well.
check out this helpful YT video (around 4 min mark) on how to set up so Automatic1111 checks for updates every time it starts:
https://www.youtube.com/watch?v=3cvP7yJotUM
the extensions needs to be updated in Automatic1111 [https://www.bing.com/th?id=OVP.GPTwkisq0n2yxXd7LyGCZAEsDh&pid=Api]https://www.youtube.com/watch?v=3cvP7yJotUM Install Automatic 1111 WITH automated Updates - super easy #gitpull #stablediffusionhttps://www.youtube.com/watch?v=3cvP7yJotUM In this video, i will show you how to install and use Automatic 1111 Stable Diffusion and automatically update it with Git Pull to have the newest Version without any fuss! #### Links from the Video #### Python 3.10.6: https://www.python.org/downloads/release/python-3106/ Git for Windows: https://gitforwindows.org/ SD 1.5 Download: https ... www.youtube.com
From: becausereasons @.> Sent: Friday, June 23, 2023 12:06 AM To: AUTOMATIC1111/stable-diffusion-webui @.> Cc: dPunisher66 @.>; Comment @.> Subject: Re: [AUTOMATIC1111/stable-diffusion-webui] [Bug]: loras not working on new update (Issue #10342)
I have updated my extensions and lora is still broken for me.
AttributeError: 'LatentDiffusion' object has no attribute 'lora_layer_mapping'
— Reply to this email directly, view it on GitHubhttps://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/10342#issuecomment-1603137406, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5C75OMUIN3IPEKPCVKGPZ3XMSGCNANCNFSM6AAAAAAYAS7XKM. You are receiving this because you commented.Message ID: @.***>
Closing as stale.