Skip to content

[auto] Extension dependencies are also installed for disabled extensions #563

@DevilaN

Description

@DevilaN

Has this issue been opened before?

  • It is not in the FAQ, I checked.
  • It is not in the issues, I searched.

Describe the bug

Entrypoint for auto installs dependencies for all existing extensions on disk not checking whether it is enabled.
My cat is left intact.

Which UI

auto or auto-cpu

Hardware / Software

Potato on steroids.

Steps to Reproduce

  1. Install any extension that has dependencies inside @install.py@ file.
  2. Disable that extension in webui.
  3. Restart container.
  4. See dependency installation info for that very extension being processed.

Additional context

Following code in services/AUTOMATIC1111/entrypoint.sh file is reason for such behavior:

# For install.py, please refer to https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Developing-extensions#installpy
list=(./extensions/*/install.py)
for installscript in "${list[@]}"; do
  PYTHONPATH=${ROOT} python "$installscript"
done

I propose something like this to resolve if extension is enabled by using info in config.json file:

EXTNAME=`echo $installscript | cut -d '/' -f 3`
if ! `jq -e ".disabled_extensions|any(. == \"$EXTNAME\")" config.json`; then
  PYTHONPATH=${ROOT} python "$installscript"
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-responseWaiting for the issuer to respondbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions