Skip to content

[Bug]: IndexError while applying cross attention optimization at startup (dev branch) #10605

@MMP0

Description

@MMP0

Is there an existing issue for this?

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

What happened?

I always get an IndexError while applying cross attention optimization at startup regardless of the cross_attention_optimization value. And this causes CUDA out of memory as no optimizations are applied.

After changing Settings > Optimizations > Cross attention optimization and clicking the [Apply settings] button, the optimizer is applied as expected. It only fails at startup.

Steps to reproduce the problem

  1. Clone the project
  2. Launch

What should have happened?

IndexError should not be raised.

It should be

applying cross attention optimization: sdp-no-mem

or something.

Commit where the problem happens

05e6fc9

What platforms do you use to access the UI ?

No response

What browsers do you use to access the UI ?

No response

Command Line Arguments

./webui.sh --opt-sdp-attention --opt-sdp-no-mem-attention --opt-split-attention

List of extensions

Extension URL Version Update
sd-extension-system-info https://github.com/vladmandic/sd-extension-system-info.git 79243697 (Thu May 18 11:01:58 2023) unknown
LDSR built-in    
Lora built-in    
ScuNET built-in    
SwinIR built-in    
prompt-bracket-checker built-in    

Console logs

applying cross attention optimization: IndexError
Traceback (most recent call last):
  File "/content/stable-diffusion-webui/modules/sd_hijack.py", line 172, in hijack
    self.optimization_method = apply_optimizations()
  File "/content/stable-diffusion-webui/modules/sd_hijack.py", line 67, in apply_optimizations
    matching_optimizer = optimizers[0]
IndexError: list index out of range

Additional information

OS: Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reportReport of a bug, yet to be confirmed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions