grokuku / stable-diffusion

Easy Image Generation
GNU General Public License v3.0
36 stars 13 forks source link

Wrong xFormers version #34

Closed freezurbern closed 6 months ago

freezurbern commented 7 months ago

Using web UI 2 (automatic1111) gives an error message about the wrong xFormers version. How should I fix this, other than disabling xformers in the launch parameters? Thanks!

Error message in the web UI: image

Error message during first container run:

sd-webui-1  | Launching Web UI with arguments: --listen --port 9000 --enable-insecure-extension-access --medvram --xformers --api
sd-webui-1  | WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
sd-webui-1  |     PyTorch 2.1.2+cu121 with CUDA 1201 (you have 2.2.1+cu121)
sd-webui-1  |     Python  3.11.7 (you have 3.11.8)
sd-webui-1  |   Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
sd-webui-1  |   Memory-efficient attention, SwiGLU, sparse and more won't be available.
sd-webui-1  |   Set XFORMERS_MORE_DETAILS=1 for more details

Below is my docker-compose.yml:

  sd-webui:
    image: holaflenain/stable-diffusion:latest
    restart: unless-stopped
    environment:
      - WEBUI_VERSION=02
      - TZ=America/New_York
      - PUID=1000
      - PGID=1000
    volumes:
      - ./appdata/sd-webui:/config
    ports:
      - 9000:9000
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
grokuku commented 7 months ago

If you wan to try I just pushed a test version that should fix this issue. to do the update, stop your container, delete those folders: stable-diffusion\02-sd-webui\env stable-diffusion\02-sd-webui\conda-env

update the image (with the test tag) and then run your container. It will reinstall all packages correctly

Edit : The fix is confirmed to work so I pushed it on the latest version