Comments (5)
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.
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.
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.
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.
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)
- No Image Showing After Generation
- [BUG] When SD is relaunched it switches port numbers, it should maintain the same port to preserve user parameters
- ReadMe update - using GFPGAN reduces available memory
- [BUG] When attempting to use the img2img functionality, the server outputs an error instead of generating a new image. HOT 1
- [Bug]ZeroDivisionError: division by zero. No i2i result since yesterday update HOT 4
- Resize mode in img2img : tensor size error HOT 7
- Seed number is not precise for single txt2img image generated in batch HOT 3
- Not able to regenerate exact result from yaml file / some info is missing HOT 1
- Repeated relaunches upon first run after Linux installation
- CPU Support HOT 2
- New error on start after latest update. HOT 1
- k_euler very slow suddenly HOT 1
- Newest release broke webui IMG2IMG HOT 1
- Can't run batches more than 10 after latest commits HOT 8
- Aspect ratio box seems to be broken HOT 2
- Poor text responsiveness in prompt input box after recent update HOT 29
- unsupported operand type(s) for +=: 'dict' and 'str' HOT 7
- Script for AMD? HOT 7
- Expose API HOT 2
- Personalization (textual inversion) seems broken with WebUi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-diffusion.