Comments (7)
How are you still using colab ..i thought they banned the code
from a1111-sd-webui-locon.
How are you still using colab ..i thought they banned the code
I'm using this notebook:
https://colab.research.google.com/github/sagiodev/stablediffusion_webui/blob/master/StableDiffusionUI_ngrok_sagiodev.ipynb
from a1111-sd-webui-locon.
the fix you are asking to push didn't work for me
from a1111-sd-webui-locon.
God dammit, seems to work for some not for others...
from a1111-sd-webui-locon.
After looking at the current "fix" I've changed it up a little to look like this:
--- a/scripts/main.py
+++ b/scripts/main.py
@@ -368,9 +368,14 @@ KRON_KEY = {
def load_lora(name, lora_on_disk):
print('locon load lora method')
lora = LoraModule(name, lora_on_disk)
- lora.mtime = os.path.getmtime(lora_on_disk.filename)
+ lora_filename = ''
+ if (isinstance(lora_on_disk, str)):
+ lora_filename = lora_on_disk
+ else:
+ lora_filename = lora_on_disk.filename
- sd = sd_models.read_state_dict(lora_on_disk.filename)
+ lora.mtime = os.path.getmtime(lora_filename)
+ sd = sd_models.read_state_dict(lora_filename)
is_sd2 = 'model_transformer_resblocks' in shared.sd_model.lora_layer_mapping
keys_failed_to_match = []
@@ -608,7 +613,7 @@ def load_lora(name, lora_on_disk):
if len(keys_failed_to_match) > 0:
print(shared.sd_model.lora_layer_mapping)
- print(f"Failed to match keys when loading Lora {lora_on_disk.filename}: {keys_failed_to_match}")
+ print(f"Failed to match keys when loading Lora {lora_filename}: {keys_failed_to_match}")
return lora
~
It is a very haphazard bandage and not the prettiest looking.
Problem is that I'm not sure about how it should interact with the larger codebase. Especially with new version of A1111 having the "LoRa Alias" thing that introduced LoRa as objects into the code, instead of plain string.
Hence I'm not making a pull request with these changes.
from a1111-sd-webui-locon.
I guess this is how people feel when a game update breaks all the mods.
from a1111-sd-webui-locon.
I figure I'll mention here that, in the ReadMe.md of locon it says:
This extension is basically deprecated and will not have any official update at all. Please consider to use a1111-sd-webui-lycoris instead (but if there are new PRs, I will accept them)
Back over in A1111 repo KohakuBLueleaf pushed for replacing Locon with Lycoris AUTOMATIC1111/stable-diffusion-webui#8169 (reply in thread)
from a1111-sd-webui-locon.
Related Issues (20)
- getting RuntimeError: shape '[1280]' is invalid for input of size 0 while applying locon model HOT 1
- extension doesn't load if data directory changed HOT 1
- Quite trivial issue, might change walrus operator to the traditional one HOT 1
- Installed via Automatic1111 install from URL but getting error on LOCON HOT 1
- locon load lora method HOT 1
- It wasn't clear HOT 1
- 第657行 (mid:=module.mid_model) 不兼容python 3.7
- Lycoris not supported for inpainting and outpainting HOT 1
- Error HOT 2
- Request to fix the import path for build-in lora
- 'LatentDiffusion' object has no attribute 'lora_layer_mapping' after today git pull stable-diffusion-webui HOT 6
- [CRITICAL]All LoRAs not working anymore HOT 37
- AttributeError: 'str' object has no attribute 'filename' HOT 3
- Error when load Lora
- locon is not working with google colab… HOT 7
- Trying to Use Locon as Lora - Attribute Error String HOT 1
- Keeping the 'lora' conception in simple is preferable for future development.
- Locon doesn't work...? HOT 1
- Fail to work with A1111 V1.4.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from a1111-sd-webui-locon.