Giter VIP home page Giter VIP logo

sd-webui-roop's Introduction

roop for StableDiffusion

This is an extension for StableDiffusion's AUTOMATIC1111 web-ui that allows face-replacement in images. It is based on roop but will be developed seperately.

Disclaimer

This software is meant to be a productive contribution to the rapidly growing AI-generated media industry. It will help artists with tasks such as animating a custom character or using the character as a model for clothing etc.

The developers of this software are aware of its possible unethical applicaitons and are committed to take preventative measures against them. It has a built-in check which prevents the program from working on inappropriate media. We will continue to develop this project in the positive direction while adhering to law and ethics. This project may be shut down or include watermarks on the output if requested by law.

Users of this software are expected to use this software responsibly while abiding the local law. If face of a real person is being used, users are suggested to get consent from the concerned person and clearly mention that it is a deepfake when posting content online. Developers of this software will not be responsible for actions of end-users.

Installation

First of all, if you can't install it for some reason, don't open an issue here. Google your errors.

On Windows, download and install Visual Studio. During the install, make sure to include the Python and C++ packages.

  • Run this command: pip install insightface==0.7.3
  • In web-ui, go to the "Extensions" tab and use this URL https://github.com/s0md3v/sd-webui-roop in the "install from URL" tab.
  • Close webui and run it again
  • If you encounter 'NoneType' object has no attribute 'get' error, download the inswapper_128.onnx model and put it inside <webui_dir>/models/roop/ directory.

For rest of the errors, use google. Good luck.

Usage

  1. Under "roop" drop-down menu, import an image containing a face.
  2. Turn on the "Enable" checkbox
  3. That's it, now the generated result will have the face you selected

Tips

Getting good quality results

First of all, make sure the "Restore Face" option is enabled. You can also try the "Upscaler" option or for more finer control, use an upscaler from the "Extras" tab.

For even better quality, use img2img with denoise set to 0.1 and gradually increase it until you get a balance of quality and resembelance.

Replacing specific faces

If there are multiple faces in an image, select the face numbers you wish to swap using the "Comma separated face number(s)" option.

The face didn't get swapped?

Did you click "Enable"?

If you did and your console doesn't show any errors, it means roop detected that your image is either NSFW or wasn't able to detect a face at all.

sd-webui-roop's People

Contributors

maxchiron avatar ryan-haines avatar s0md3v avatar spensercai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sd-webui-roop's Issues

ModuleNotFoundError: No module named

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
import insightface
ModuleNotFoundError: No module named 'insightface'
from ifnude import detect
ModuleNotFoundError: No module named 'ifnude'
File "", line 11, in
ModuleNotFoundError: No module named 'Cython'

NameError: name 'urllib' is not defined

Error loading script: cimage.py
Traceback (most recent call last):
File "M:\SD\sdwebui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "M:\SD\sdwebui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude_init
.py", line 1, in
from .detector import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 35, in
download(model_url, model_path)
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 15, in download
request = urllib.request.urlopen(url)
NameError: name 'urllib' is not defined
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

Downloading the detection model to C:\Users\dckf.models/detector.onnx
Error loading script: faceswap.py
Traceback (most recent call last):
File "M:\SD\sdwebui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "M:\SD\sdwebui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in
from scripts.swapper import UpscaleOptions, swap_face, ImageResult
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\swapper.py", line 14, in
from scripts.cimage import convert_to_sd
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude_init
.py", line 1, in
from .detector import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 35, in
download(model_url, model_path)
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 15, in download
request = urllib.request.urlopen(url)
NameError: name 'urllib' is not defined
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

2023-06-20 23:36:04,537 - roop - INFO - roop v0.0.2
Downloading the detection model to C:\Users\dckf.models/detector.onnx
Error loading script: swapper.py
Traceback (most recent call last):
File "M:\SD\sdwebui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "M:\SD\sdwebui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\swapper.py", line 14, in
from scripts.cimage import convert_to_sd
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude_init
.py", line 1, in
from .detector import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 35, in
download(model_url, model_path)
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 15, in download
request = urllib.request.urlopen(url)
NameError: name 'urllib' is not defined
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

ImportError: cannot import name 'ImageResult'

hi,

I m running roop as well separately, meaning i got python and C++ as well.

But for the extension, i got this error:

Error loading script: faceswap.py
Traceback (most recent call last):
  File "C:\IA\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\IA\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\IA\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in <module>
    from scripts.swapper import UpscaleOptions, swap_face, ImageResult
ImportError: cannot import name 'ImageResult' from 'scripts.swapper' (C:\IA\stable-diffusion-webui\extensions\sd-webui-faceswap\scripts\swapper.py)

Any clue is welcome.

thanks

what's the matter?

venv "H:\AI\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.3.2-RC-1-gbaf6946e
Commit hash: baf6946e06249c5af9851c60171692c44ef633e0
Installing requirements

Error running install.py for extension H:\AI\stable-diffusion-webui\extensions\sd-webui-roop.
Command: "H:\AI\stable-diffusion-webui\venv\Scripts\python.exe" "H:\AI\stable-diffusion-webui\extensions\sd-webui-roop\install.py"
Error code: 1
stderr: Traceback (most recent call last):
File "D:\python\Python31011\lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "D:\python\Python31011\lib\http\client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "D:\python\Python31011\lib\http\client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "D:\python\Python31011\lib\http\client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "D:\python\Python31011\lib\http\client.py", line 1038, in _send_output
self.send(msg)
File "D:\python\Python31011\lib\http\client.py", line 976, in send
self.connect()
File "D:\python\Python31011\lib\http\client.py", line 1455, in connect
self.sock = self._context.wrap_socket(self.sock,
File "D:\python\Python31011\lib\ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "D:\python\Python31011\lib\ssl.py", line 1071, in _create
self.do_handshake()
File "D:\python\Python31011\lib\ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] Զǿȹرһеӡ

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "H:\AI\stable-diffusion-webui\extensions\sd-webui-roop\install.py", line 25, in
download(model_url, model_path)
File "H:\AI\stable-diffusion-webui\extensions\sd-webui-roop\install.py", line 16, in download
request = urllib.request.urlopen(url)
File "D:\python\Python31011\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "D:\python\Python31011\lib\urllib\request.py", line 519, in open
response = self._open(req, data)
File "D:\python\Python31011\lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "D:\python\Python31011\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "D:\python\Python31011\lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "D:\python\Python31011\lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10054] Զǿȹرһеӡ>

Is there an error in executing install.py? Everything that should have been downloaded has already been downloaded.

Image Browser: ImageReward is not installed, cannot be used.

Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
2023-06-22 14:41:38,943 - roop - INFO - roop v0.0.2
2023-06-22 14:41:38,944 - roop - INFO - roop v0.0.2
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\jasoncow/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
Image Browser: ImageReward is not installed, cannot be used.

Protobuf parsing failed

Error running postprocess_batch: G:\SD\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py0, 4.14it/s]
Traceback (most recent call last):
File "G:\SD\stable-diffusion-webui\modules\scripts.py", line 496, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "G:\SD\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 187, in postprocess_image
result: ImageResult = swap_face(
File "G:\SD\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 111, in swap_face
converted = convert_to_sd(target_img)
File "G:\SD\stable-diffusion-webui\extensions\sd-webui-roop\scripts\cimage.py", line 6, in convert_to_sd
chunks = detect(img)
File "G:\SD\stable-diffusion-webui\venv\lib\site-packages\ifnude\detector.py", line 46, in detect
detection_model = onnxruntime.InferenceSession(model_path, providers=["CPUExecutionProvider"])
File "G:\SD\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 383, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "G:\SD\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 424, in _create_inference_session
sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from C:\Users\LTC.ifnude/detector.onnx failed:Protobuf parsing failed.

Model not detected

If you install the extension on Vlad Diffusion, the model isn't detected.

Says it's installed, no menu

It says it's installed but there is no drop down menu. I do have others; face swap, batch face swap 0.0.7
When it didnt seem to install from the extension tab I followed the link to see I needed to pip install insightface==0.7.3
Did doing these two things backwards make the tab not show up in the gui? I've relaunched, still nothing.

[Code Enhancement] - Making this extension work with API (code included)

First, great extension! I do not use A1111 directly via the Gradio UI, but rather through API. I ran into an issue with trying to add your extension to the script pattern that makes it work via API, and I suspect it is because of how your code in one function expects that the source image be passed. I have modified your function in swapper.py to account for a base64 string as well, and it seems to work, in case you'd like to add it to your code. I'd open a PR but I've also modified some other stuff and don't want to cloud up this small suggested change.

def swap_face(
    source_img: Image.Image,
    target_img: Image.Image,
    model: Union[str, None] = None,
    faces_index: Set[int] = {0},
    upscale_options: Union[UpscaleOptions, None] = None,
) -> ImageResult:
    result_image = target_img
    converted = convert_to_sd(target_img)
    scale, fn = converted[0], converted[1]
    if model is not None and not scale:
        
        if isinstance(source_img, str):  # source_img is a base64 string
            import base64, io
            if 'base64,' in source_img:  # check if the base64 string has a data URL scheme
                # split the base64 string to get the actual base64 encoded image data
                base64_data = source_img.split('base64,')[-1]
                # decode base64 string to bytes
                img_bytes = base64.b64decode(base64_data)
            else:
                # if no data URL scheme, just decode
                img_bytes = base64.b64decode(source_img)
            
            source_img = Image.open(io.BytesIO(img_bytes))
        
        source_img = cv2.cvtColor(np.array(source_img), cv2.COLOR_RGB2BGR)
        target_img = cv2.cvtColor(np.array(target_img), cv2.COLOR_RGB2BGR)
        source_face = get_face_single(source_img, face_index=0)
        if source_face is not None:
            result = target_img
            model_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), model)
            face_swapper = getFaceSwapModel(model_path)

            for face_num in faces_index:
                target_face = get_face_single(target_img, face_index=face_num)
                if target_face is not None:
                    result = face_swapper.get(result, target_face, source_face)
                else:
                    logger.info(f"No target face found for {face_num}")

            result_image = Image.fromarray(cv2.cvtColor(result, cv2.COLOR_BGR2RGB))
            if upscale_options is not None:
                result_image = upscale_image(result_image, upscale_options)
        else:
            logger.info("No source face found")
    result_image.save(fn.name)
    return ImageResult(path=fn.name)

The specific addition I added I will highlight here:

...
        if isinstance(source_img, str):  # source_img is a base64 string
            import base64, io
            if 'base64,' in source_img:  # check if the base64 string has a data URL scheme
                # split the base64 string to get the actual base64 encoded image data
                base64_data = source_img.split('base64,')[-1]
                # decode base64 string to bytes
                img_bytes = base64.b64decode(base64_data)
            else:
                # if no data URL scheme, just decode
                img_bytes = base64.b64decode(source_img)
            
            source_img = Image.open(io.BytesIO(img_bytes))
...

Error loading script: faceswap.py and swapper.py

Error loading script: faceswap.py
Traceback (most recent call last):
File "E:\sd ui\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\sd ui\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "E:\sd ui\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in
from scripts.swapper import UpscaleOptions, swap_face, ImageResult
File "E:\sd ui\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 12, in
import insightface
ModuleNotFoundError: No module named 'insightface'

Error loading script: swapper.py
Traceback (most recent call last):
File "E:\sd ui\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\sd ui\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "E:\sd ui\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 12, in
import insightface
ModuleNotFoundError: No module named 'insightface'

Doesnt work on GPU

It works with CPU. Libs installed by itself. Noticed that it doesnt install GPU libraries. Wonder if this is a bug or set it that way.

Mac Support?

Will there be Mac support for this? Is there an alternative installation to get it to work on Apple?

error

i used in google colab.
Error running postprocess_batch: /content/sdw/extensions/sd-webui-roop/scripts/faceswap.py
Traceback (most recent call last):
File "/content/sdw/modules/scripts.py", line 506, in postprocess_batch
script.postprocess_batch(p, *script_args, images=images, **kwargs)
TypeError: FaceSwapScript.postprocess_batch() got multiple values for argument 'images'

NameError: name 'urllib' is not defined and Error loading script: cimage.py

Error loading script: cimage.py
Traceback (most recent call last):
File "K:\StableDiffusion\sdwebui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "K:\StableDiffusion\sdwebui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "K:\StableDiffusion\sdwebui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\ifnude_init
.py", line 1, in
from .detector import detect
File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 35, in
download(model_url, model_path)
File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 15, in download
request = urllib.request.urlopen(url)
NameError: name 'urllib' is not defined
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

Downloading the detection model to C:\Users\dckf.models/detector.onnx
Error loading script: faceswap.py
Traceback (most recent call last):
File "K:\StableDiffusion\sdwebui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "K:\StableDiffusion\sdwebui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "K:\StableDiffusion\sdwebui\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in
from scripts.swapper import UpscaleOptions, swap_face, ImageResult
File "K:\StableDiffusion\sdwebui\extensions\sd-webui-roop\scripts\swapper.py", line 14, in
from scripts.cimage import convert_to_sd
File "K:\StableDiffusion\sdwebui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\ifnude_init
.py", line 1, in
from .detector import detect
File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 35, in
download(model_url, model_path)
File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 15, in download
request = urllib.request.urlopen(url)
NameError: name 'urllib' is not defined
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

2023-06-19 14:32:09,178 - roop - INFO - roop v0.0.2
Downloading the detection model to C:\Users\dckf.models/detector.onnx
Error loading script: swapper.py
Traceback (most recent call last):
File "K:\StableDiffusion\sdwebui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "K:\StableDiffusion\sdwebui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "K:\StableDiffusion\sdwebui\extensions\sd-webui-roop\scripts\swapper.py", line 14, in
from scripts.cimage import convert_to_sd
File "K:\StableDiffusion\sdwebui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\ifnude_init
.py", line 1, in
from .detector import detect
File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 35, in
download(model_url, model_path)
File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 15, in download
request = urllib.request.urlopen(url)
NameError: name 'urllib' is not defined
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

Error loading script: swapper.py. ModelProto does not have a graph.

2023-06-18 22:28:36,560 - roop - INFO - roop v0.0.2
Error loading script: swapper.py
Traceback (most recent call last):
File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\extensions\sd-webui-roop\scripts\swapper.py", line 31, in
ANALYSIS_MODEL = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers)
File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\insightface\app\face_analysis.py", line 31, in init
model = model_zoo.get_model(onnx_file, **kwargs)
File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 96, in get_model
model = router.get_model(providers=providers, provider_options=provider_options)
File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 40, in get_model
session = PickableInferenceSession(self.onnx_file, **kwargs)
File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in init
super().init(model_path, **kwargs)
File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 383, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "C:\Users\dani\sd backup\updated fully\stable-diffusion-webui-master\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 424, in _create_inference_session
sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from C:\Users\dani/.insightface\models\buffalo_l\genderage.onnx failed:C:\a_work\1\s\onnxruntime\core\graph\model.cc:134 onnxruntime::Model::Model ModelProto does not have a graph.

FaceSwapScript.postprocess_batch() got multiple values for argument 'images'

Error running postprocess_batch: D:_AI_stableDiffusion\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py
Traceback (most recent call last):
File "D:_AI_stableDiffusion\stable-diffusion-webui\modules\scripts.py", line 487, in postprocess_batch
script.postprocess_batch(p, *script_args, images=images, **kwargs)
TypeError: FaceSwapScript.postprocess_batch() got multiple values for argument 'images'

Error running postprocess_batch: D:_AI_stableDiffusion\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py
Traceback (most recent call last):
File "D:_AI_stableDiffusion\stable-diffusion-webui\modules\scripts.py", line 496, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "D:_AI_stableDiffusion\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 183, in postprocess_image
result: ImageResult = swap_face(
File "D:_AI_stableDiffusion\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 111, in swap_face
converted = convert_to_sd(target_img)
File "D:_AI_stableDiffusion\stable-diffusion-webui\extensions\sd-webui-roop\scripts\cimage.py", line 6, in convert_to_sd
chunks = detect(img)
File "D:_AI_stableDiffusion\stable-diffusion-webui\venv\lib\site-packages\ifnude\detector.py", line 46, in detect
detection_model = onnxruntime.InferenceSession(model_path, providers=["CPUExecutionProvider"])
File "D:_AI_stableDiffusion\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 383, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "D:_AI_stableDiffusion\stable-diffusion-webui\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 424, in _create_inference_session
sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from C:\Users\Administrator.ifnude/detector.onnx failed:Protobuf parsing failed.

AttributeError: 'NoneType' object has no attribute 'get'

Hello!
Thank you for this plugin, looks very promissing!

But while trying to swap face in txt2img tab getting an error:

13:15:27-568317 ERROR Running script postprocess image: C:\Stable-Diffusion\vlad1111\automatic\extensions\sd-webui-roop\scripts\faceswap.py: AttributeError ╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮ │ C:\Stable-Diffusion\vlad1111\automatic\modules\scripts.py:466 in postprocess_image │ │ │ │ 465 │ │ │ │ args = p.per_script_args.get(script.title(), p.script_args[script.args_f │ │ ❱ 466 │ │ │ │ script.postprocess_image(p, pp, *args) │ │ 467 │ │ │ │ s.append(f'{script.title()}:{round(time.time()-t0, 2)}s') │ │ │ │ C:\Stable-Diffusion\vlad1111\automatic\extensions\sd-webui-roop\scripts\faceswap.py:187 in postprocess_image │ │ │ │ 186 │ │ │ │ image: Image.Image = script_pp.image │ │ ❱ 187 │ │ │ │ result: ImageResult = swap_face( │ │ 188 │ │ │ │ │ self.source, │ │ │ │ C:\Stable-Diffusion\vlad1111\automatic\extensions\sd-webui-roop\scripts\swapper.py:125 in swap_face │ │ │ │ 124 │ │ │ │ if target_face is not None: │ │ ❱ 125 │ │ │ │ │ result = face_swapper.get(result, target_face, source_face) │ │ 126 │ │ │ │ else: │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ AttributeError: 'NoneType' object has no attribute 'get'

Plus, label for the last field in an extension tab is
"Model not found, please download one and reload automatic 1111"
And it is not clear which model I have to download.

Unable to choose a different face in pics with multiple people

I see it says we can select a face. But it always chooses the face closest to the left no matter what number I put.

Also, is it possible to choose multiple faces? No matter if I enter "1" or "0, 1" it always does the same one. Not sure if I'm doing something wrong.

I appreciate your time and work on this. 🙏🏾

When I enable faceswap , then it report following error

Error running postprocess_batch: /stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py
webui-docker-auto-1 | Traceback (most recent call last):
webui-docker-auto-1 | File "/stable-diffusion-webui/modules/scripts.py", line 496, in postprocess_image
webui-docker-auto-1 | script.postprocess_image(p, pp, *script_args)
webui-docker-auto-1 | File "/stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py", line 184, in postprocess_image
webui-docker-auto-1 | result: ImageResult = swap_face(
webui-docker-auto-1 | File "/stable-diffusion-webui/extensions/sd-webui-roop/scripts/swapper.py", line 125, in swap_face
webui-docker-auto-1 | source_face = get_face_single(source_img, face_index=0)
webui-docker-auto-1 | File "/stable-diffusion-webui/extensions/sd-webui-roop/scripts/swapper.py", line 78, in get_face_single
webui-docker-auto-1 | face_analyser = copy.deepcopy(ANALYSIS_MODEL)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 172, in deepcopy
webui-docker-auto-1 | y = _reconstruct(x, memo, *rv)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 271, in _reconstruct
webui-docker-auto-1 | state = deepcopy(state, memo)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy
webui-docker-auto-1 | y = copier(x, memo)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict
webui-docker-auto-1 | y[deepcopy(key, memo)] = deepcopy(value, memo)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy
webui-docker-auto-1 | y = copier(x, memo)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict
webui-docker-auto-1 | y[deepcopy(key, memo)] = deepcopy(value, memo)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 172, in deepcopy
webui-docker-auto-1 | y = _reconstruct(x, memo, *rv)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 271, in _reconstruct
webui-docker-auto-1 | state = deepcopy(state, memo)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy
webui-docker-auto-1 | y = copier(x, memo)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict
webui-docker-auto-1 | y[deepcopy(key, memo)] = deepcopy(value, memo)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 172, in deepcopy
webui-docker-auto-1 | y = _reconstruct(x, memo, *rv)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/copy.py", line 273, in _reconstruct
webui-docker-auto-1 | y.setstate(state)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/site-packages/insightface/model_zoo/model_zoo.py", line 33, in setstate
webui-docker-auto-1 | self.init(model_path)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/site-packages/insightface/model_zoo/model_zoo.py", line 25, in init
webui-docker-auto-1 | super().init(model_path, **kwargs)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 396, in init
webui-docker-auto-1 | raise e
webui-docker-auto-1 | File "/usr/local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 383, in init
webui-docker-auto-1 | self._create_inference_session(providers, provider_options, disabled_optimizers)
webui-docker-auto-1 | File "/usr/local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 415, in _create_inference_session
webui-docker-auto-1 | raise ValueError(
webui-docker-auto-1 | ValueError: This ORT build has ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'] enabled. Since ORT 1.9, you are required to explicitly set the providers parameter when instantiating InferenceSession. For example, onnxruntime.InferenceSession(..., providers=['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'], ...)

Face swap py error/ traceback error

Error calling: /Users/devinketchens/stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py/ui
Traceback (most recent call last):
File "/Users/devinketchens/stable-diffusion-webui/modules/scripts.py", line 271, in wrap_call
res = func(*args, **kwargs)
File "/Users/devinketchens/stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py", line 64, in ui
models = get_models()
File "/Users/devinketchens/stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py", line 21, in get_models
models = glob.glob(models_path)
UnboundLocalError: local variable 'models_path' referenced before assignment

Error calling: /Users/devinketchens/stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py/ui
Traceback (most recent call last):
File "/Users/devinketchens/stable-diffusion-webui/modules/scripts.py", line 271, in wrap_call
res = func(*args, **kwargs)
File "/Users/devinketchens/stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py", line 64, in ui
models = get_models()
File "/Users/devinketchens/stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py", line 21, in get_models
models = glob.glob(models_path)
UnboundLocalError: local variable 'models_path' referenced before assignment

SFW gets flagged as NSFW

it say "potential nsfw content was detected in one or more images. a black image will be returned instead. try again with a different prompt and/or seed." but image is SWF

install.py, ifnude, and some other things wont install

Error running install.py for extension D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop.
Command: "D:\sd\sd-webui-aki-v4.1\python\python.exe" "D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop\install.py"
Error code: 1
stdout: Check roop requirements
Install insightface==0.7.3
Installing sd-webui-roop requirement: insightface==0.7.3
Install onnx==1.14.0
Installing sd-webui-roop requirement: onnx==1.14.0
Install onnxruntime==1.15.0
Installing sd-webui-roop requirement: onnxruntime==1.15.0
Install tensorflow==2.12.0
Installing sd-webui-roop requirement: tensorflow==2.12.0
Install opencv-python==4.7.0.72
Installing sd-webui-roop requirement: opencv-python==4.7.0.72
Install ifnude
Installing sd-webui-roop requirement: ifnude
Couldn't install sd-webui-roop requirement: ifnude.
Command: "D:\sd\sd-webui-aki-v4.1\python\python.exe" -m pip install ifnude --prefer-binary --index-url https://mirror.baidu.com/pypi/simple
Error code: 1
stdout: Looking in indexes: https://mirror.baidu.com/pypi/simple, https://mirrors.aliyun.com/pypi/simple
Looking in links: https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html

stderr: ERROR: Could not find a version that satisfies the requirement ifnude (from versions: none)
ERROR: No matching distribution found for ifnude

Warning: Failed to install ifnude, roop will not work.

stderr: Traceback (most recent call last):
File "D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop\install.py", line 44, in
raise e
File "D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop\install.py", line 26, in
launch.run_pip(
File "D:\sd\sd-webui-aki-v4.1\modules\launch_utils.py", line 124, in run_pip
return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
File "D:\sd\sd-webui-aki-v4.1\modules\launch_utils.py", line 101, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install sd-webui-roop requirement: ifnude.

Command: "D:\sd\sd-webui-aki-v4.1\python\python.exe" -m pip install ifnude --prefer-binary --index-url https://mirror.baidu.com/pypi/simple
Error code: 1
stdout: Looking in indexes: https://mirror.baidu.com/pypi/simple, https://mirrors.aliyun.com/pypi/simple
Looking in links: https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html

stderr: ERROR: Could not find a version that satisfies the requirement ifnude (from versions: none)
ERROR: No matching distribution found for ifnude

Installing requirements for TemporalKit extension

Launching Web UI with arguments: --theme dark --xformers --no-half-vae --api --autolaunch
[-] ADetailer initialized. version: 23.6.2, num models: 8
[AddNet] Updating model hashes...

[AddNet] Updating model hashes...

2023-06-19 06:46:55,455 - ControlNet - INFO - ControlNet v1.1.224
ControlNet preprocessor location: D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\annotator\downloads
2023-06-19 06:46:55,549 - ControlNet - INFO - ControlNet v1.1.224
Loading weights [ecefb796ff] from D:\sd\sd-webui-aki-v4.1\models\Stable-diffusion\neverendingDreamNED_v122BakedVae.safetensors
Creating model from config: D:\sd\sd-webui-aki-v4.1\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Couldn't find VAE named vae-ft-mse-840000-ema-pruned.safetensors; using None instead
Textual inversion embeddings loaded(1): EasyNegative
Model loaded in 4.2s (load weights from disk: 0.6s, create model: 0.3s, apply weights to model: 1.9s, apply half(): 0.5s, move model to device: 0.8s).
Error loading script: cimage.py
Traceback (most recent call last):
File "D:\sd\sd-webui-aki-v4.1\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "D:\sd\sd-webui-aki-v4.1\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
ModuleNotFoundError: No module named 'ifnude'

Error loading script: faceswap.py
Traceback (most recent call last):
File "D:\sd\sd-webui-aki-v4.1\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "D:\sd\sd-webui-aki-v4.1\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in
from scripts.swapper import UpscaleOptions, swap_face, ImageResult
File "D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\swapper.py", line 14, in
from scripts.cimage import convert_to_sd
File "D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
ModuleNotFoundError: No module named 'ifnude'

2023-06-19 06:47:01,046 - roop - INFO - roop v0.0.1
Error loading script: swapper.py
Traceback (most recent call last):
File "D:\sd\sd-webui-aki-v4.1\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "D:\sd\sd-webui-aki-v4.1\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\swapper.py", line 14, in
from scripts.cimage import convert_to_sd
File "D:\sd\sd-webui-aki-v4.1\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
ModuleNotFoundError: No module named 'ifnude'

cant seem to install ifnude and other things. how to fix?

CLIP Skip affects the output?

I tried the roop a few times. My system is macOS M2 Pro. I seems to work, but just sometimes. I don't know what's affecting it.

Does CLIP skip perhaps affect the face swap?

I updated to the latest and now I don't think it works at all.

Traceback (most recent call last):

Error calling: D:\AI\extensions\sd-webui-roop\scripts\faceswap.py/ui
Traceback (most recent call last):
File "D:\AI\modules\scripts.py", line 283, in wrap_call
res = func(*args, **kwargs)
File "D:\AI\extensions\sd-webui-roop\scripts\faceswap.py", line 64, in ui
models = get_models()
File "D:\AI\extensions\sd-webui-roop\scripts\faceswap.py", line 21, in get_models
models = glob.glob(models_path)
UnboundLocalError: local variable 'models_path' referenced before assignment
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

**UnboundLocalError on line 21 of the script**

Dear s0md3v,

I have encountered an UnboundLocalError in the script provided in the repository. The error is due to the use of an undefined local variable models_path on line 21:

models = glob.glob(models_path)

This issue is caused because models_path is not defined before this line of code is executed. However, I noticed that models_path is defined later on in the script:

models_path = os.path.join(scripts.basedir(), "models/roop/*")

To fix this issue, I suggest moving the definition of models_path before its usage. Here is the corrected get_models() function:

def get_models():
    models_path = os.path.join(scripts.basedir(), "models/roop/*")
    models = glob.glob(models_path)
    models += glob.glob(models_path)
    models = [x for x in models if x.endswith(".onnx") or x.endswith(".pth")]
    return models

This change has resolved the UnboundLocalError in my tests. I am reporting this so it might be helpful to others who face the same issue, and for a possible fix in a future update of the script.

Thank you for your attention to this matter.

Best regards

models not found

i made sure the models are where i think they suppose to be but the log says no models found and i cant select one in the dropdown menu.

here is the console output

Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
2023-06-20 01:50:01,998 - roop - INFO - roop v0.0.2
2023-06-20 01:50:02,014 - roop - INFO - roop v0.0.2
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Walter/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
2023-06-20 01:50:05,217 - roop - WARNING - You should at least have one model in models directory, please read the doc here : https://github.com/s0md3v/sd-webui-roop/
2023-06-20 01:50:05,795 - roop - WARNING - You should at least have one model in models directory, please read the doc here : https://github.com/s0md3v/sd-webui-roop/

Feature Request - Enable use of roop's during "Extras" tab upscaling

Hello. Super neat extension.

I find that when I do my final 4x upscale with the Extras tab using CodeFormer, I lose a decent amount of the input face.

I see that there's an option to use an upscaler during generation, but is there any way to enable the use of roop while upscaling in the "Extras" tab? Essentially just have the dropdown that's in txt2img/img2img in the Extras tab as well.

I'd love to just automatically upscale every generation I make, but my 1060 6GB and I don't really have the resources (or the time) for that. haha.

"When I try to start the Web UI after installing the plugin, I receive this error message. Even executing pip install protobuf==3.20 doesn't work."

RuntimeError: Failed to import transformers.modeling_utils because of the following error (look up to see its traceback):
Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates


"When I try to start the Web UI after installing the plugin, I receive this error message. Even executing pip install protobuf==3.20 doesn't work."

Broke the Automatic1111 start-up

when i downloaded the extension closing the Automatic1111 and open it again make it stuck at installing requirements, fixed the problem by deleting roop extension manually

AttributeError: 'FaceSwapScript' object has no attribute 'enable'

Hello.
Installed Visual Studio (Like everything you need, according to two youtube videos)
Installed insightface. He gave an error until he manually copied from users to the venv//site-packages folder in the stable diffusion folder. Install ifnude
The root tab appeared, but at startup, it gives such errors
From https://github.com/AUTOMATIC1111/stable-diffusion-webui

  • branch release_candidate -> FETCH_HEAD
    Already up to date.
    venv "venv\Scripts\Python.exe"
    Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
    Version: v1.4.0-RC
    Commit hash: 3b11f17a374520e493e120e7f47443acd97393c8
    Installing requirements
    Checking roop requirements
    Install insightface==0.7.3
    Installing sd-webui-roop requirement: insightface==0.7.3
    Install onnx==1.14.0
    Installing sd-webui-roop requirement: onnx==1.14.0
    Install onnxruntime==1.15.0
    Installing sd-webui-roop requirement: onnxruntime==1.15.0
    Install opencv-python==4.7.0.72
    Installing sd-webui-roop requirement: opencv-python==4.7.0.72

Launching Web UI with arguments: --autolaunch --xformers --theme=dark
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
2023-06-21 21:24:37,798 - roop - INFO - roop v0.0.2
2023-06-21 21:24:37,800 - roop - INFO - roop v0.0.2
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: tmp/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
Loading weights [aba96b389d] from E:\amain\models\Stable-diffusion\mdjrny-v4.safetensors
*** Error calling: E:\amain\extensions\sd-webui-roop\scripts\faceswap.py/ui
Traceback (most recent call last):
File "E:\amain\modules\scripts.py", line 294, in wrap_call
return func(*args, **kwargs)
File "E:\amain\extensions\sd-webui-roop\scripts\faceswap.py", line 64, in ui
models = get_models()
File "E:\amain\extensions\sd-webui-roop\scripts\faceswap.py", line 21, in get_models
models = glob.glob(models_path)
UnboundLocalError: local variable 'models_path' referenced before assignment


*** Error calling: E:\amain\extensions\sd-webui-roop\scripts\faceswap.py/ui
Traceback (most recent call last):
File "E:\amain\modules\scripts.py", line 294, in wrap_call
return func(*args, **kwargs)
File "E:\amain\extensions\sd-webui-roop\scripts\faceswap.py", line 64, in ui
models = get_models()
File "E:\amain\extensions\sd-webui-roop\scripts\faceswap.py", line 21, in get_models
models = glob.glob(models_path)
UnboundLocalError: local variable 'models_path' referenced before assignment


Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch().
Creating model from config: E:\amain\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
Startup time: 8.0s (import torch: 1.3s, import gradio: 1.0s, import ldm: 0.4s, other imports: 0.8s, opts onchange: 0.7s, load scripts: 2.7s, create ui: 0.6s, gradio launch: 0.3s).
DiffusionWrapper has 859.52 M params.
preload_extensions_git_metadata for 11 extensions took 0.53s
Loading VAE weights specified in settings: E:\amain\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors
Applying attention optimization: xformers... done.
Textual inversion embeddings loaded(0):
Model loaded in 4.9s (load weights from disk: 0.8s, create model: 0.5s, apply weights to model: 0.7s, apply half(): 1.1s, load VAE: 0.2s, move model to device: 1.5s)

And when I launch "roop"

*** Error running process: E:\amain\extensions\sd-webui-roop\scripts\faceswap.py
Traceback (most recent call last):
File "E:\amain\modules\scripts.py", line 474, in process
script.process(p, *script_args)
TypeError: FaceSwapScript.process() missing 11 required positional arguments: 'img', 'enable', 'faces_index', 'model', 'face_restorer_name', 'face_restorer_visibility', 'upscaler_name', 'upscaler_scale', 'upscaler_visibility', 'swap_in_source', and 'swap_in_generated'


100%|██████████████████████████████████████████████████████████████████████████████████| 16/16 [00:02<00:00, 5.68it/s]
*** Error running postprocess_batch: E:\amain\extensions\sd-webui-roop\scripts\faceswap.py6/16 [00:02<00:00, 7.05it/s]
Traceback (most recent call last):
File "E:\amain\modules\scripts.py", line 506, in postprocess_batch
script.postprocess_batch(p, *script_args, images=images, **kwargs)
File "E:\amain\extensions\sd-webui-roop\scripts\faceswap.py", line 177, in postprocess_batch
if self.enable:
AttributeError: 'FaceSwapScript' object has no attribute 'enable'


*** Error running postprocess_image: E:\amain\extensions\sd-webui-roop\scripts\faceswap.py
Traceback (most recent call last):
File "E:\amain\modules\scripts.py", line 514, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "E:\amain\extensions\sd-webui-roop\scripts\faceswap.py", line 181, in postprocess_image
if self.enable and self.swap_in_generated:
AttributeError: 'FaceSwapScript' object has no attribute 'enable'


Total progress: 100%|██████████████████████████████████████████████████████████████████| 16/16 [00:02<00:00, 6.58it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 16/16 [00:02<00:00, 7.05it/s]

Error (Didn't follow the instructions)

I'm sorry but I made a mistake, first I found the extension on the stabile diffusion UI and installed it from there. It didn't do anything so I checked the repo. Then I saw visual studio was needed so I installed that according to the requirements.

Now I get roop and can attempt to use it but it doesn't work and I get this error:

Error running postprocess_batch: C:\Users\Robby\Documents\GitHub\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py
Traceback (most recent call last):
File "C:\Users\Username\Documents\GitHub\stable-diffusion-webui\modules\scripts.py", line 496, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "C:\Users\Username\Documents\GitHub\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 181, in postprocess_image
if self.enable and self.swap_in_generated:
AttributeError: 'FaceSwapScript' object has no attribute 'enable'

What can I do? I'd like to delete the extension and add again but I don't see the option. I could delete the folder?

More errors:

2023-06-21 11:17:09,980 - roop - INFO - roop v0.0.2
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Username/.insightface\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Username/.insightface\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Username/.insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Username/.insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: C:\Users\Username/.insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
Error calling: C:\Users\Username\Documents\GitHub\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py/ui
Traceback (most recent call last):
File "C:\Users\Username\Documents\GitHub\stable-diffusion-webui\modules\scripts.py", line 283, in wrap_call
res = func(*args, **kwargs)
File "C:\Users\Username\Documents\GitHub\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 64, in ui
models = get_models()
File "C:\Users\Username\Documents\GitHub\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 21, in get_models
models = glob.glob(models_path)
UnboundLocalError: local variable 'models_path' referenced before assignment

Error calling: C:\Users\Username\Documents\GitHub\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py/ui
Traceback (most recent call last):
File "C:\Users\Username\Documents\GitHub\stable-diffusion-webui\modules\scripts.py", line 283, in wrap_call
res = func(*args, **kwargs)
File "C:\Users\Username\Documents\GitHub\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 64, in ui
models = get_models()
File "C:\Users\Username\Documents\GitHub\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 21, in get_models
models = glob.glob(models_path)
UnboundLocalError: local variable 'models_path' referenced before assignment

Doesn't work, many errors.

Z:\Temp\pip-build-env-nfrh8bu8\overlay\Lib\site-packages\setuptools\command\build_py.py:201: _Warning: Package 'insightface.thirdparty.face3d.mesh.cython' is absent from the packages configuration.
!!

      ********************************************************************************
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'insightface.thirdparty.face3d.mesh.cython' as an importable package[^1],
      but it is absent from setuptools' `packages` configuration.

      This leads to an ambiguous overall configuration. If you want to distribute this
      package, please make sure that 'insightface.thirdparty.face3d.mesh.cython' is explicitly added
      to the `packages` configuration field.

      Alternatively, you can also rely on setuptools' discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).

      You can read more about "package discovery" on setuptools documentation page:

      - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

      If you don't want 'insightface.thirdparty.face3d.mesh.cython' to be distributed and are
      already explicitly excluding 'insightface.thirdparty.face3d.mesh.cython' via
      `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
      you can try to use `exclude_package_data`, or `include-package-data=False` in
      combination with a more fine grained `package-data` configuration.

      You can read more about "package data files" on setuptools documentation page:

      - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


      [^1]: For Python, any directory (with suitable naming) can be imported,
            even if it does not contain any `.py` files.
            On the other hand, currently there is no concept of package data
            directory, all directories are treated like packages.
      ********************************************************************************

!!
check.warn(importable)
Z:\Temp\pip-build-env-nfrh8bu8\overlay\Lib\site-packages\setuptools\command\build_py.py:201: _Warning: Package 'insightface.data.images' is absent from the packages configuration.
!!

      ********************************************************************************
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'insightface.data.images' as an importable package[^1],
      but it is absent from setuptools' `packages` configuration.

      This leads to an ambiguous overall configuration. If you want to distribute this
      package, please make sure that 'insightface.data.images' is explicitly added
      to the `packages` configuration field.

      Alternatively, you can also rely on setuptools' discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).

      You can read more about "package discovery" on setuptools documentation page:

      - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

      If you don't want 'insightface.data.images' to be distributed and are
      already explicitly excluding 'insightface.data.images' via
      `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
      you can try to use `exclude_package_data`, or `include-package-data=False` in
      combination with a more fine grained `package-data` configuration.

      You can read more about "package data files" on setuptools documentation page:

      - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


      [^1]: For Python, any directory (with suitable naming) can be imported,
            even if it does not contain any `.py` files.
            On the other hand, currently there is no concept of package data
            directory, all directories are treated like packages.
      ********************************************************************************

!!
check.warn(importable)
Z:\Temp\pip-build-env-nfrh8bu8\overlay\Lib\site-packages\setuptools\command\build_py.py:201: _Warning: Package 'insightface.data.objects' is absent from the packages configuration.
!!

      ********************************************************************************
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'insightface.data.objects' as an importable package[^1],
      but it is absent from setuptools' `packages` configuration.

      This leads to an ambiguous overall configuration. If you want to distribute this
      package, please make sure that 'insightface.data.objects' is explicitly added
      to the `packages` configuration field.

      Alternatively, you can also rely on setuptools' discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).

      You can read more about "package discovery" on setuptools documentation page:

      - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

      If you don't want 'insightface.data.objects' to be distributed and are
      already explicitly excluding 'insightface.data.objects' via
      `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
      you can try to use `exclude_package_data`, or `include-package-data=False` in
      combination with a more fine grained `package-data` configuration.

      You can read more about "package data files" on setuptools documentation page:

      - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


      [^1]: For Python, any directory (with suitable naming) can be imported,
            even if it does not contain any `.py` files.
            On the other hand, currently there is no concept of package data
            directory, all directories are treated like packages.
      ********************************************************************************

!!
check.warn(importable)
creating build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
copying insightface\thirdparty\face3d\mesh\cython\mesh_core.cpp -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.cpp -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
creating build\lib.win-amd64-cpython-310\insightface\data\images
copying insightface\data\images\Tom_Hanks_54745.png -> build\lib.win-amd64-cpython-310\insightface\data\images
copying insightface\data\images\mask_black.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
copying insightface\data\images\mask_blue.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
copying insightface\data\images\mask_green.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
copying insightface\data\images\mask_white.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
copying insightface\data\images\t1.jpg -> build\lib.win-amd64-cpython-310\insightface\data\images
creating build\lib.win-amd64-cpython-310\insightface\data\objects
copying insightface\data\objects\meanshape_68.pkl -> build\lib.win-amd64-cpython-310\insightface\data\objects
copying insightface\thirdparty\face3d\mesh\cython\mesh_core.h -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.c -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
copying insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.pyx -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
copying insightface\thirdparty\face3d\mesh\cython\setup.py -> build\lib.win-amd64-cpython-310\insightface\thirdparty\face3d\mesh\cython
running build_ext
building 'insightface.thirdparty.face3d.mesh.cython.mesh_core_cython' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

ERROR: Failed building wheel for insightface
ERROR: Could not build wheels for insightface which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 21.2.3; however, version 23.1.2 is available.
You should consider upgrading via the 'C:\stable-diffusion\webui\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip' command.

Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
Civitai Helper: Get Custom Model Folder
Civitai Helper: Load setting from: C:\stable-diffusion\webui\stable-diffusion-webui\extensions\Stable-Diffusion-Webui-Civitai-Helper\setting.json
Civitai Helper: No setting file, use default
[-] ADetailer initialized. version: 23.6.2, num models: 8
2023-06-19 09:10:53,582 - ControlNet - INFO - ControlNet v1.1.224
ControlNet preprocessor location: C:\stable-diffusion\webui\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-06-19 09:10:53,695 - ControlNet - INFO - ControlNet v1.1.224
Error loading script: cimage.py
Traceback (most recent call last):
File "C:\stable-diffusion\webui\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\stable-diffusion\webui\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\stable-diffusion\webui\stable-diffusion-webui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
ModuleNotFoundError: No module named 'ifnude'

Error loading script: faceswap.py
Traceback (most recent call last):
File "C:\stable-diffusion\webui\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\stable-diffusion\webui\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\stable-diffusion\webui\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in
from scripts.swapper import UpscaleOptions, swap_face, ImageResult
File "C:\stable-diffusion\webui\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 12, in
import insightface
ModuleNotFoundError: No module named 'insightface'

2023-06-19 09:10:53,750 - roop - INFO - roop v0.0.2
Error loading script: swapper.py
Traceback (most recent call last):
File "C:\stable-diffusion\webui\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\stable-diffusion\webui\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\stable-diffusion\webui\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 12, in
import insightface
ModuleNotFoundError: No module named 'insightface'

NameError: name 'urllib' is not defined (I have been updating to the latest version, but it keeps prompting an error. Only the version on June 18 can run normally)

I have been updating to the latest version, but it keeps prompting an error. Only the version on June 18 can run normally

Error loading script: cimage.py
Traceback (most recent call last):
File "M:\SD\sdwebui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "M:\SD\sdwebui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude_init
.py", line 1, in
from .detector import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 35, in
download(model_url, model_path)
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 15, in download
request = urllib.request.urlopen(url)
NameError: name 'urllib' is not defined
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

Error loading script: faceswap.py
Downloading the detection model to C:\Users\dckf.models/detector.onnx
Traceback (most recent call last):
File "M:\SD\sdwebui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "M:\SD\sdwebui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in
from scripts.swapper import UpscaleOptions, swap_face, ImageResult
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\swapper.py", line 14, in
from scripts.cimage import convert_to_sd
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude_init
.py", line 1, in
from .detector import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 35, in
download(model_url, model_path)
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 15, in download
request = urllib.request.urlopen(url)
NameError: name 'urllib' is not defined
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

2023-06-22 17:44:07,086 - roop - INFO - roop v0.0.2
Downloading the detection model to C:\Users\dckf.models/detector.onnx
Error loading script: swapper.py
Traceback (most recent call last):
File "M:\SD\sdwebui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "M:\SD\sdwebui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\swapper.py", line 14, in
from scripts.cimage import convert_to_sd
File "M:\SD\sdwebui\extensions\sd-webui-roop\scripts\cimage.py", line 2, in
from ifnude import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude_init
.py", line 1, in
from .detector import detect
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 35, in
download(model_url, model_path)
File "M:\SD\sdwebui\py310\lib\site-packages\ifnude\detector.py", line 15, in download
request = urllib.request.urlopen(url)
NameError: name 'urllib' is not defined
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

I have been updating to the latest version, but it keeps prompting an error. Only the version on June 18 can run normally

Where should I download this detector.onnx

2023-06-20 04:28:45,894 - roop - INFO - roop v0.0.2
Downloading the detection model to C:\Users\Administrator.ifnude/detector.onnx
Error loading script: swapper.py
Traceback (most recent call last):
File "C:\AI\python\lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\AI\python\lib\http\client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\AI\python\lib\http\client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\AI\python\lib\http\client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\AI\python\lib\http\client.py", line 1038, in _send_output
self.send(msg)
File "C:\AI\python\lib\http\client.py", line 976, in send
self.connect()
File "C:\AI\python\lib\http\client.py", line 1455, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\AI\python\lib\ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "C:\AI\python\lib\ssl.py", line 1071, in _create
self.do_handshake()
File "C:\AI\python\lib\ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

can you help me - error

Error running install.py for extension C:\Users\SD\stable-diffusion-webui\extensions\sd-webui-roop.
Command: "C:\Users\SD\stable-diffusion-webui\venv\Scripts\python.exe" "C:\Users\SD\stable-diffusion-webui\extensions\sd-webui-roop\install.py"
Error code: 1
stdout: Check roop requirements
Install insightface==0.7.3
Installing sd-webui-roop requirement: insightface==0.7.3
Install onnx==1.14.0
Installing sd-webui-roop requirement: onnx==1.14.0
Install onnxruntime==1.15.0
Installing sd-webui-roop requirement: onnxruntime==1.15.0
Install tensorflow==2.12.0
Installing sd-webui-roop requirement: tensorflow==2.12.0
Couldn't install sd-webui-roop requirement: tensorflow==2.12.0.
Command: "C:\Users\SD\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install tensorflow==2.12.0 --prefer-binary
Error code: 1
stdout: Collecting tensorflow==2.12.0
Using cached tensorflow-2.12.0-cp310-cp310-win_amd64.whl (1.9 kB)
Requirement already satisfied: tensorflow-intel==2.12.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow==2.12.0) (2.12.0)
Requirement already satisfied: absl-py>=1.0.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.4.0)
Requirement already satisfied: astunparse>=1.6.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.6.3)
Requirement already satisfied: flatbuffers>=2.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (23.3.3)
Requirement already satisfied: gast<=0.4.0,>=0.2.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.4.0)
Requirement already satisfied: google-pasta>=0.1.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.2.0)
Requirement already satisfied: h5py>=2.9.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.8.0)
Requirement already satisfied: jax>=0.3.15 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.4.12)
Requirement already satisfied: libclang>=13.0.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (16.0.0)
Requirement already satisfied: numpy<1.24,>=1.22 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.23.5)
Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.3.0)
Requirement already satisfied: packaging in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (23.0)
Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.20.3)
Requirement already satisfied: setuptools in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (67.6.1)
Requirement already satisfied: six>=1.12.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.16.0)
Requirement already satisfied: termcolor>=1.1.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.2.0)
Requirement already satisfied: typing-extensions>=3.6.6 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (4.5.0)
Requirement already satisfied: wrapt<1.15,>=1.11.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.14.1)
Requirement already satisfied: grpcio<2.0,>=1.24.3 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.51.3)
Collecting tensorboard<2.13,>=2.12 (from tensorflow-intel==2.12.0->tensorflow==2.12.0)
Using cached tensorboard-2.12.3-py3-none-any.whl (5.6 MB)
Collecting tensorflow-estimator<2.13,>=2.12.0 (from tensorflow-intel==2.12.0->tensorflow==2.12.0)
Using cached tensorflow_estimator-2.12.0-py2.py3-none-any.whl (440 kB)
Collecting keras<2.13,>=2.12.0 (from tensorflow-intel==2.12.0->tensorflow==2.12.0)
Using cached keras-2.12.0-py2.py3-none-any.whl (1.7 MB)
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.31.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from astunparse>=1.6.0->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.38.4)
Requirement already satisfied: ml-dtypes>=0.1.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from jax>=0.3.15->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.2.0)
Requirement already satisfied: scipy>=1.7 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from jax>=0.3.15->tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.10.1)
Requirement already satisfied: google-auth<3,>=1.6.3 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.16.2)
Collecting google-auth-oauthlib<1.1,>=0.5 (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0)
Using cached google_auth_oauthlib-1.0.0-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: markdown>=2.6.8 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.4.1)
Requirement already satisfied: requests<3,>=2.21.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.25.1)
Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.7.1)
Requirement already satisfied: werkzeug>=1.0.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.2.3)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (5.3.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (4.9)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.3.1)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (4.0.0)
Requirement already satisfied: idna<3,>=2.5 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.26.15)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2022.12.7)
Requirement already satisfied: MarkupSafe>=2.1.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from werkzeug>=1.0.1->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.1.2)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.2.2)
Installing collected packages: tensorflow-estimator, keras, google-auth-oauthlib, tensorboard, tensorflow
Attempting uninstall: tensorflow-estimator
Found existing installation: tensorflow-estimator 2.10.0
Uninstalling tensorflow-estimator-2.10.0:
Successfully uninstalled tensorflow-estimator-2.10.0
Attempting uninstall: keras
Found existing installation: keras 2.10.0
Uninstalling keras-2.10.0:
Successfully uninstalled keras-2.10.0
Attempting uninstall: google-auth-oauthlib
Found existing installation: google-auth-oauthlib 0.4.6
Uninstalling google-auth-oauthlib-0.4.6:
Successfully uninstalled google-auth-oauthlib-0.4.6
Attempting uninstall: tensorboard
Found existing installation: tensorboard 2.10.1
Uninstalling tensorboard-2.10.1:
Successfully uninstalled tensorboard-2.10.1
Attempting uninstall: tensorflow
Found existing installation: tensorflow 2.10.1
Uninstalling tensorflow-2.10.1:
Successfully uninstalled tensorflow-2.10.1

stderr: ERROR: Could not install packages due to an OSError: [WinError 5] : 'C:\Users\SD\AppData\Local\Temp\pip-uninstall-dlwz0m5i\python\flags_pybind.pyd'
Check the permissions.

Warning: Failed to install tensorflow==2.12.0, roop will not work.

stderr: Traceback (most recent call last):
File "C:\Users\SD\stable-diffusion-webui\extensions\sd-webui-roop\install.py", line 44, in
raise e
File "C:\Users\SD\stable-diffusion-webui\extensions\sd-webui-roop\install.py", line 26, in
launch.run_pip(
File "C:\Users\SD\stable-diffusion-webui\modules\launch_utils.py", line 124, in run_pip
return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
File "C:\Users\SD\stable-diffusion-webui\modules\launch_utils.py", line 101, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install sd-webui-roop requirement: tensorflow==2.12.0.
Command: "C:\Users\SD\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install tensorflow==2.12.0 --prefer-binary
Error code: 1
stdout: Collecting tensorflow==2.12.0
Using cached tensorflow-2.12.0-cp310-cp310-win_amd64.whl (1.9 kB)
Requirement already satisfied: tensorflow-intel==2.12.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow==2.12.0) (2.12.0)
Requirement already satisfied: absl-py>=1.0.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.4.0)
Requirement already satisfied: astunparse>=1.6.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.6.3)
Requirement already satisfied: flatbuffers>=2.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (23.3.3)
Requirement already satisfied: gast<=0.4.0,>=0.2.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.4.0)
Requirement already satisfied: google-pasta>=0.1.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.2.0)
Requirement already satisfied: h5py>=2.9.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.8.0)
Requirement already satisfied: jax>=0.3.15 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.4.12)
Requirement already satisfied: libclang>=13.0.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (16.0.0)
Requirement already satisfied: numpy<1.24,>=1.22 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.23.5)
Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.3.0)
Requirement already satisfied: packaging in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (23.0)
Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.20.3)
Requirement already satisfied: setuptools in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (67.6.1)
Requirement already satisfied: six>=1.12.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.16.0)
Requirement already satisfied: termcolor>=1.1.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.2.0)
Requirement already satisfied: typing-extensions>=3.6.6 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (4.5.0)
Requirement already satisfied: wrapt<1.15,>=1.11.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.14.1)
Requirement already satisfied: grpcio<2.0,>=1.24.3 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.51.3)
Collecting tensorboard<2.13,>=2.12 (from tensorflow-intel==2.12.0->tensorflow==2.12.0)
Using cached tensorboard-2.12.3-py3-none-any.whl (5.6 MB)
Collecting tensorflow-estimator<2.13,>=2.12.0 (from tensorflow-intel==2.12.0->tensorflow==2.12.0)
Using cached tensorflow_estimator-2.12.0-py2.py3-none-any.whl (440 kB)
Collecting keras<2.13,>=2.12.0 (from tensorflow-intel==2.12.0->tensorflow==2.12.0)
Using cached keras-2.12.0-py2.py3-none-any.whl (1.7 MB)
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.31.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from astunparse>=1.6.0->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.38.4)
Requirement already satisfied: ml-dtypes>=0.1.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from jax>=0.3.15->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.2.0)
Requirement already satisfied: scipy>=1.7 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from jax>=0.3.15->tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.10.1)
Requirement already satisfied: google-auth<3,>=1.6.3 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.16.2)
Collecting google-auth-oauthlib<1.1,>=0.5 (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0)
Using cached google_auth_oauthlib-1.0.0-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: markdown>=2.6.8 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.4.1)
Requirement already satisfied: requests<3,>=2.21.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.25.1)
Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.7.1)
Requirement already satisfied: werkzeug>=1.0.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.2.3)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (5.3.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (4.9)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.3.1)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (4.0.0)
Requirement already satisfied: idna<3,>=2.5 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (1.26.15)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2022.12.7)
Requirement already satisfied: MarkupSafe>=2.1.1 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from werkzeug>=1.0.1->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (2.1.2)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in c:\users\sd\stable-diffusion-webui\venv\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.0->tensorflow==2.12.0) (3.2.2)
Installing collected packages: tensorflow-estimator, keras, google-auth-oauthlib, tensorboard, tensorflow
Attempting uninstall: tensorflow-estimator
Found existing installation: tensorflow-estimator 2.10.0
Uninstalling tensorflow-estimator-2.10.0:
Successfully uninstalled tensorflow-estimator-2.10.0
Attempting uninstall: keras
Found existing installation: keras 2.10.0
Uninstalling keras-2.10.0:
Successfully uninstalled keras-2.10.0
Attempting uninstall: google-auth-oauthlib
Found existing installation: google-auth-oauthlib 0.4.6
Uninstalling google-auth-oauthlib-0.4.6:
Successfully uninstalled google-auth-oauthlib-0.4.6
Attempting uninstall: tensorboard
Found existing installation: tensorboard 2.10.1
Uninstalling tensorboard-2.10.1:
Successfully uninstalled tensorboard-2.10.1
Attempting uninstall: tensorflow
Found existing installation: tensorflow 2.10.1
Uninstalling tensorflow-2.10.1:
Successfully uninstalled tensorflow-2.10.1

stderr: ERROR: Could not install packages due to an OSError: [WinError 5] : 'C:\Users\SD\AppData\Local\Temp\pip-uninstall-dlwz0m5i\python\flags_pybind.pyd'
Check the permissions.

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.