Skip to content
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

[Bug]: activating extra network lora: TypeError #13561

Open
1 task done
liuhaitao32 opened this issue Oct 9, 2023 · 8 comments
Open
1 task done

[Bug]: activating extra network lora: TypeError #13561

liuhaitao32 opened this issue Oct 9, 2023 · 8 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@liuhaitao32
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

activating extra network lora: TypeError
Traceback (most recent call last):
File "C:\d\sd_webui\webui\modules\extra_networks.py", line 145, in activate
extra_network.activate(p, [])
File "C:\d\sd_webui\webui\extensions-builtin\Lora\extra_networks_lora.py", line 18, in activate
p.all_prompts = [x + f"lora:{additional}:{shared.opts.extra_networks_default_multiplier}" for x in p.all_prompts]
TypeError: 'NoneType' object is not iterable

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

no error

Sysinfo

null

What browsers do you use to access the UI ?

No response

Console logs

Loading weights [4078eb4174] from C:\d\sd_webui\webui\models\Stable-diffusion\Guofeng3_v33.safetensors
Creating model from config: C:\d\sd_webui\webui\configs\v1-inference.yaml
Running on local URL:  http://192.168.1.90:8888

To create a public link, set `share=True` in `launch()`.
Startup time: 10.7s (prepare environment: 3.4s, import torch: 3.0s, import gradio: 0.5s, setup paths: 0.3s, initialize shared: 0.2s, other imports: 0.4s, load scripts: 1.7s, create ui: 0.9s, gradio launch: 0.3s).
Applying attention optimization: xformers... done.
No Image data blocks found.
activating extra network lora: TypeError
Traceback (most recent call last):
  File "C:\d\sd_webui\webui\modules\extra_networks.py", line 145, in activate
    extra_network.activate(p, [])
  File "C:\d\sd_webui\webui\extensions-builtin\Lora\extra_networks_lora.py", line 18, in activate
    p.all_prompts = [x + f"<lora:{additional}:{shared.opts.extra_networks_default_multiplier}>" for x in p.all_prompts]
TypeError: 'NoneType' object is not iterable

Additional information

No response

@liuhaitao32 liuhaitao32 added the bug-report Report of a bug, yet to be confirmed label Oct 9, 2023
@yfp86274
Copy link

I’ve encountered the same error....

Console logs

activating extra network hypernet: TypeError
Traceback (most recent call last):
  File "D:\AIDrawing\stable-diffusion-webui\modules\extra_networks.py", line 145, in activate
    extra_network.activate(p, [])
  File "D:\AIDrawing\stable-diffusion-webui\modules\extra_networks_hypernet.py", line 14, in activate
    p.all_prompts = [f"{prompt}{hypernet_prompt_text}" for prompt in p.all_prompts]
TypeError: 'NoneType' object is not iterable

Model loaded in 5.0s (load weights from disk: 0.5s, create model: 0.7s, apply weights to model: 2.3s, apply half(): 0.8s, calculate empty prompt: 0.7s).

To create a public link, set `share=True` in `launch()`.

@joyoungzhang
Copy link

try set Add hypernetwork to prompt to None
image

@yfp86274
Copy link

try set Add hypernetwork to prompt to None image

Thank you for your help, I’ve solved it~!

@jet3004
Copy link

jet3004 commented Dec 5, 2023

I have this exact same issue but the above – which was and is set to None – didn't solve it for me. Anyone else?

@ubohex
Copy link

ubohex commented Dec 12, 2023

I have this exact same issue but the above – which was and is set to None – didn't solve it for me. Anyone else?

set None, click Refresh button, apply&restart

@TheArkive
Copy link

I have the same issue. For me the Add hypernetwork to prompt setting was already set to None, and simply setting this setting again, saving, and restarting didn't help.

Here is my full error:

activating extra network lora: TypeError
Traceback (most recent call last):
  File "...edited...\stable-diffusion-webui\modules\extra_networks.py", line 145, in activate
    extra_network.activate(p, [])
  File "...edited...\stable-diffusion-webui\extensions-builtin\Lora\extra_networks_lora.py", line 18, in activate
    p.all_prompts = [x + f"<lora:{additional}:{shared.opts.extra_networks_default_multiplier}>" for x in p.all_prompts]
TypeError: 'NoneType' object is not iterable

Under User Interface > Quick Settings I have the sd_lora option to show a drop down menu for Lora models (next to checkpoints menu - top of the screen). With this setting, when I start SD, and when a previously used Lora loads from a previous session, this error occurs. When this additional drop menu is set to None, the error does not occur.

Additionally, if the sd_lora option is removed with a Lora model chosen, the error will persist until this setting is restored back to None. I actually had to re-add the sd_lora option in order to clear the drop menu to do this.

Seems like a minor bug.

@echdareez
Copy link

echdareez commented Mar 27, 2024

I had the same issue : the culprit was the following (also mentioned by @TheArkive ) :
image
More precisely : I had a LORA selected that wasn't compatible/corrupted or otherwise, experienced some strange behaviour (even when specified in the prompt)

@Sunnerick
Copy link

I had the same issue : the culprit was the following (also mentioned by @TheArkive ) : image More precisely : I had a LORA selected that wasn't compatible/corrupted or otherwise, experienced some strange behaviour (even when specified in the prompt)

I just change the model name to lcm-lora-sdxl.safetensors and everything works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

8 participants