Giter Club home page Giter Club logo

Comments (5)

hlky avatar hlky commented on July 18, 2024

When is this happening? Are you using gfpgan/esrgan as an option on generation, or in their standalone tabs?

gpu 1 is the card you're using for gfpgan/esrgan and gpu 0 is the card for the main model, correct?

Have you tried explicitly setting --gpu option as well as the other options? there might be something messed up with how the selected gpus are applied

from stable-diffusion.

ainub avatar ainub commented on July 18, 2024

The problem seems to be only with GFPGAN. It throws the error in both option on generation as well as in standalone tab mode.

esrgan is working correctly.

Your assumption is correct: gpu 1 for gfpgan/esrgan and gpu 0 for main model. I have now tried both with explicit gpu set and without:
python scripts/webui.py --optimized-turbo --gpu 0 --extra-models-gpu --esrgan-gpu 1 --gfpgan-gpu 1
python scripts/webui.py --optimized-turbo --extra-models-gpu --esrgan-gpu 1 --gfpgan-gpu 1

I tried the non-optimized variant as well, same result (esrgan works, gfpgan doesn't)
python scripts/webui.py --gpu 0 --extra-models-gpu --esrgan-gpu 1 --gfpgan-gpu 1

!!Runtime error (txt2img)!! Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1! (when checking argument for argument weight in method wrapper__cudnn_convolution) exiting...calling os._exit(0)

Thank you for sharing your interface, it helps a lot.

from stable-diffusion.

ainub avatar ainub commented on July 18, 2024

Traceback led me to a facexlib problem.
Someone else also mentioned it here: https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/4#issuecomment-1231927656

I guess the only way would be to manually patch facexlib or move GFPGAN to cpu only in case you don't want it on GPU.

from stable-diffusion.

ainub avatar ainub commented on July 18, 2024

Ok, fixed this way:

conda activate ldm
pip uninstall facexlib
git clone https://github.com/xinntao/facexlib
cd facexlib
git pull origin pull/19/head
python setup.py install
cd ..
python scripts/webui.py --optimized-turbo --gpu 0 --extra-models-gpu --esrgan-gpu 1 --gfpgan-gpu 1

And everything is working as intended.

from stable-diffusion.

hlky avatar hlky commented on July 18, 2024

I've forked, merged that pull request into the fork, and updated the environment.yaml so should be fixed for all now, thanks!

from stable-diffusion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.