Skip to content

FIX?: Assert fails in offload.py Line 1553 assert fails in mmgp/offload.py for LORA files lacking module data #29

Description

@somenewaccountthen

Assert fails in offload.py Line 1553 assert fails in mmgp/offload.py for LORA files lacking module data (i think).

I found this code from someone on civitai that fixes(?) it. Thanks to him.
(It's a comment on an adult LORA so i don't know if i should paste the link here, so i won't.)

I edited offload.py with his snippet and it worked.

offload.py Line 1553

                    # Old
                    #assert loras_module_data is not None
                    # New
                    if loras_module_data is None: 
                        if not hasattr(model, "_lora_warned_modules"): 
                            model._lora_warned_modules = set() 
                        if module_name not in model._lora_warned_modules: 
                            model._lora_warned_modules.add(module_name) 
                            print(f"[WARN] Module '{module_name}' is targeted by LoRA but does not support/declare LoRA. Skipping this module.") 
                        continue 

Kind regards.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions