-
Notifications
You must be signed in to change notification settings - Fork 110
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
Someone please push the FIX to the main branch!!! #43
Comments
How are you still using colab ..i thought they banned the code |
I'm using this notebook: |
the fix you are asking to push didn't work for me |
God dammit, seems to work for some not for others... |
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. |
I guess this is how people feel when a game update breaks all the mods. |
I figure I'll mention here that, in the ReadMe.md of locon it says: |
On the first report of this issue #40 people are reporting that the fix is very simple, just changing two lines of code is apparently enough to fix:
Issue #40 (comment)
But some of us are working on certain constraints, and speaking for myself, I can't edit any files on the Colab I run A1111, and therefore I cannot apply this fix myself. I can either use the extension as is, or not use it at all!
So, any dev, could you please push a fix to the main branch so we can go back to things working?
The text was updated successfully, but these errors were encountered: