Describe the bug
I am using stable-diffusion-webui-docker and have installed it according to the 'sd webui faceswaplab' document. I am using 'img2img' and checked 'enabled'. The following error occurred :
FaceSwapLab - INFO - Try to use model : /stable-diffusion-webui/models/faceswaplab/inswapper_128.onnx
/usr/local/lib/python3.10/site-packages/insightface/utils/transform.py:68: FutureWarning: rcond parameter will change to the default of machine precision times max(M, N) where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass rcond=None, to keep using the old, explicitly pass rcond=-1.
P = np.linalg.lstsq(X_homo, Y)[0].T # Affine matrix. 3 x 4
Downloading the detection model to /root/.ifnude/detector.onnx
2023-08-28 14:35:39,353 - FaceSwapLab - ERROR - Failed to swap face in postprocess method : <urlopen error [Errno 104] Connection reset by peer>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/local/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/usr/local/lib/python3.10/http/client.py", line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create
self.do_handshake()
File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab.py", line 187, in postprocess
swapped_images = swapper.process_images_units(
File "/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_swapping/swapper.py", line 832, in process_images_units
swapped = process_image_unit(model, units[0], image, info, force_blend)
File "/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_swapping/swapper.py", line 707, in process_image_unit
if check_against_nsfw(image):
File "/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_utils/imgutils.py", line 33, in check_against_nsfw
from ifnude import detect
File "/usr/local/lib/python3.10/site-packages/ifnude/init.py", line 1, in
from .detector import detect
File "/usr/local/lib/python3.10/site-packages/ifnude/detector.py", line 36, in
download(model_url, model_path)
File "/usr/local/lib/python3.10/site-packages/ifnude/detector.py", line 16, in download
request = urllib.request.urlopen(url)
File "/usr/local/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/usr/local/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.10/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/local/lib/python3.10/urllib/request.py", line 1351, in do_open
raise URLError(err)
Total progress: 100%|██████████| 1/1 [00:00<00:00, 1.30it/s]reset by peer>
c^H^C progress: 100%|██████████| 1/1 [00:00<00:00, 1.30it/s]
To Reproduce
Steps to reproduce the behavior:
select tab for img2img
Click on 'generate
See error
Expected behavior
I hope I can successfully replace my face through img2img
Screenshots
Desktop (please complete the following information):
OS: Ubuntu 22.04
Browser chrome
Version 116
Additional context
Why do I need to send another network request to the outside world after I have already configured the ONNX model through the document
Describe the bug I am using
stable-diffusion-webui-docker
and have installed it according to the 'sd webui faceswaplab' document. I am using 'img2img' and checked 'enabled'. The following error occurred :FaceSwapLab - INFO - Try to use model : /stable-diffusion-webui/models/faceswaplab/inswapper_128.onnx /usr/local/lib/python3.10/site-packages/insightface/utils/transform.py:68: FutureWarning:
rcond
parameter will change to the default of machine precision timesmax(M, N)
where M and N are the input matrix dimensions. To use the future default and silence this warning we advise to passrcond=None
, to keep using the old, explicitly passrcond=-1
. P = np.linalg.lstsq(X_homo, Y)[0].T # Affine matrix. 3 x 4 Downloading the detection model to /root/.ifnude/detector.onnx 2023-08-28 14:35:39,353 - FaceSwapLab - ERROR - Failed to swap face in postprocess method : <urlopen error [Errno 104] Connection reset by peer> Traceback (most recent call last): File "/usr/local/lib/python3.10/urllib/request.py", line 1348, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/usr/local/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/local/lib/python3.10/http/client.py", line 975, in send self.connect() File "/usr/local/lib/python3.10/http/client.py", line 1454, in connect self.sock = self._context.wrap_socket(self.sock, File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 104] Connection reset by peerDuring handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab.py", line 187, in postprocess swapped_images = swapper.process_images_units( File "/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_swapping/swapper.py", line 832, in process_images_units swapped = process_image_unit(model, units[0], image, info, force_blend) File "/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_swapping/swapper.py", line 707, in process_image_unit if check_against_nsfw(image): File "/stable-diffusion-webui/extensions/sd-webui-faceswaplab/scripts/faceswaplab_utils/imgutils.py", line 33, in check_against_nsfw from ifnude import detect File "/usr/local/lib/python3.10/site-packages/ifnude/init.py", line 1, in
from .detector import detect
File "/usr/local/lib/python3.10/site-packages/ifnude/detector.py", line 36, in
download(model_url, model_path)
File "/usr/local/lib/python3.10/site-packages/ifnude/detector.py", line 16, in download
request = urllib.request.urlopen(url)
File "/usr/local/lib/python3.10/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/usr/local/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain
File "/usr/local/lib/python3.10/urllib/request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/usr/local/lib/python3.10/urllib/request.py", line 1351, in do_open raise URLError(err) Total progress: 100%|██████████| 1/1 [00:00<00:00, 1.30it/s]reset by peer> c^H^C progress: 100%|██████████| 1/1 [00:00<00:00, 1.30it/s]
To Reproduce Steps to reproduce the behavior:
Expected behavior I hope I can successfully replace my face through img2img
Screenshots
Desktop (please complete the following information):
Additional context Why do I need to send another network request to the outside world after I have already configured the ONNX model through the document