Coder Social home page Coder Social logo

Comments (7)

riade3788 avatar riade3788 commented on July 4, 2024

How are you still using colab ..i thought they banned the code

from a1111-sd-webui-locon.

RazredgeBR avatar RazredgeBR commented on July 4, 2024

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.

riade3788 avatar riade3788 commented on July 4, 2024

the fix you are asking to push didn't work for me

from a1111-sd-webui-locon.

RazredgeBR avatar RazredgeBR commented on July 4, 2024

God dammit, seems to work for some not for others...

from a1111-sd-webui-locon.

Taxiozaurus avatar Taxiozaurus commented on July 4, 2024

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.

RazredgeBR avatar RazredgeBR commented on July 4, 2024

I guess this is how people feel when a game update breaks all the mods.

from a1111-sd-webui-locon.

lcmiracle-yh avatar lcmiracle-yh commented on July 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.