AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.45k stars 26.73k forks source link

NameError: name 'sd' is not defined #10653

Closed sledgehkg closed 1 year ago

sledgehkg commented 1 year ago

Is there an existing issue for this?

What happened?

I updated automatic1111 to the latest version, now I get an error when I try to use any LORA.

I've tried reverting to an earlier build of automatic1111, but it make no difference.

Steps to reproduce the problem

  1. Select any LORA
  2. Press generate

What should have happened?

No error

Commit where the problem happens

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/22bcc7be428c94e9408f589966c2040187245d81

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Brave

Command Line Arguments

set SAFETENSORS_FAST_GPU=1
set COMMANDLINE_ARGS= --no-half --api --xformers --medvram

List of extensions

Hypernetwork-MonkeyPatch-Extension SDPE_v2.0 Stable-Diffusion-Webui-Civitai-Helper StylePile a1111-sd-webui-locon a1111-sd-webui-lycoris batch-face-swap deforum-for-automatic1111-webui depth-image-io-for-SDWebui depthmap2mask kohya_ss multi-subject-render openpose-editor posex sd-dynamic-prompts sd-dynamic-thresholding sd-webui-3d-open-pose-editor sd-webui-ar sd-webui-aspect-ratio-helper sd-webui-controlnet sd-webui-cutoff sd-webui-depth-lib sd-webui-gelbooru-prompt sd-webui-llul sd-webui-multiple-hypernetworks sd-webui-supermerger stable-diffusion-webui-depthmap-script stable-diffusion-webui-embedding-merge stable-diffusion-webui-state text-generation-webui

Console logs

locon load lora method
activating extra network lora with arguments [<modules.extra_networks.ExtraNetworkParams object at 0x00000203A9EEE2C0>]: NameError
Traceback (most recent call last):
  File "D:\StableDiffusion\stable-diffusion-webui\modules\extra_networks.py", line 75, in activate
    extra_network.activate(p, extra_network_args)
  File "D:\StableDiffusion\stable-diffusion-webui\extensions-builtin\Lora\extra_networks_lora.py", line 23, in activate
    lora.load_loras(names, multipliers)
  File "D:\StableDiffusion\stable-diffusion-webui\extensions\a1111-sd-webui-locon\scripts\..\..\..\extensions-builtin/Lora\lora.py", line 214, in load_loras
    lora = load_lora(name, lora_on_disk.filename)
  File "D:\StableDiffusion\stable-diffusion-webui\extensions\a1111-sd-webui-locon\scripts\main.py", line 376, in load_lora
    for key_diffusers, weight in sd.items():
NameError: name 'sd' is not defined

Additional information

No response

w-e-w commented 1 year ago

I updated automatic1111 to the latest version, now I get an error when I try to use any LORA.

I would not call https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/22bcc7be428c94e9408f589966c2040187245d81 form 3/29 the "latest version"

sledgehkg commented 1 year ago

After updating to the latest version, I reverted to 22bcc7b to see if it corrected the error

Sakura-Luna commented 1 year ago

Your actions caused the project to be incompatible with the extended version, this is not a bug.