sd-webui-roop
sd-webui-roop copied to clipboard
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 "
There's nothing for me to fix here, the error occurred in one of the dependencies. I'll keep this issue for the sake of discussion.
this is mine:
Error loading script: faceswap.py
Traceback (most recent call last):
File "D:\AI\sd-webui-aki-v4\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "D:\AI\sd-webui-aki-v4\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "
2023-06-19 21:37:21,021 - roop - INFO - roop v0.0.2
Error loading script: swapper.py
Traceback (most recent call last):
File "D:\AI\sd-webui-aki-v4\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "D:\AI\sd-webui-aki-v4\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "
2023-06-19 20:38:41,694 - roop - INFO - roop v0.0.2
Error loading script: swapper.py
Traceback (most recent call last):
File "F:\Deepfake\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "F:\Deepfake\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "
Same error
this is mine:
Error loading script: faceswap.py Traceback (most recent call last): File "D:\AI\sd-webui-aki-v4\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\AI\sd-webui-aki-v4\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:\AI\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\faceswap.py", line 15, in from scripts.swapper import UpscaleOptions, swap_face, ImageResult File "D:\AI\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\swapper.py", line 12, in import insightface ModuleNotFoundError: No module named 'insightface' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
2023-06-19 21:37:21,021 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "D:\AI\sd-webui-aki-v4\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\AI\sd-webui-aki-v4\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:\AI\sd-webui-aki-v4\extensions\sd-webui-roop\scripts\swapper.py", line 12, in import insightface ModuleNotFoundError: No module named 'insightface' 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
I got the same problem. Please help resolve this error. Thank you
Error loading script: swapper.py
Traceback (most recent call last):
File "D:\Git\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "D:\Git\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "
same here
When using pip to install packages, you may often encounter an error message that reads "which is required to install pyproject.toml-based project". Trying to solve the issue by running "pip install pyproject.toml" may not work, and various online solutions such as installing python-dev may also prove ineffective.
xcode-select --install
However, once you have successfully installed the required dependencies, running "pip install" again should resolve the corresponding issue.
When using pip to install packages, you may often encounter an error message that reads "which is required to install pyproject.toml-based project". Trying to solve the issue by running "pip install pyproject.toml" may not work, and various online solutions such as installing python-dev may also prove ineffective.
xcode-select --install
However, once you have successfully installed the required dependencies, running "pip install" again should resolve the corresponding issue.
xcode-select --install
Error running postprocess_batch: I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py Traceback (most recent call last): File "I:\AI\sd-webui-aki-v4.2\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, script_args) File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py", line 183, in postprocess_image result: ImageResult = swap_face( File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 123, in swap_face source_face = get_face_single(source_img, face_index=0) File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 76, in get_face_single face_analyser = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "I:\AI\sd-webui-aki-v4.2\python\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError ** This problem is really giving me a headache. I haven't been able to sleep for several days. I really want to solve this problem quickly.*
Error running postprocess_batch: I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py Traceback (most recent call last): File "I:\AI\sd-webui-aki-v4.2\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, script_args) File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py", line 183, in postprocess_image result: ImageResult = swap_face( File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 123, in swap_face source_face = get_face_single(source_img, face_index=0) File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 76, in get_face_single face_analyser = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "I:\AI\sd-webui-aki-v4.2\python\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError ** This problem is really giving me a headache. I haven't been able to sleep for several days. I really want to solve this problem quickly.*
same error
2023-06-19 20:38:41,694 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "F:\Deepfake\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "F:\Deepfake\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 "F:\Deepfake\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 31, in ANALYSIS_MODEL = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "F:\Deepfake\stable-diffusion-webui\venv\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError
Same error
This is an issue with insightface. To solve this problem, I changed the root of the face_analysis.py file, line 24, to the absolute address like:
'F:/YOURFOLDER/stable-diffusion-webui/venv/Lib/site-packages/insightface'
- I downloaded the buffalo_l model from insightface's github
- I created a folder called "models" and unzipped it inside. (F:\YOUTFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\models)
NOTE: The face_analysys.py file is located in the folder: F:\YOURFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\app
2023-06-19 20:38:41,694 - roop - 信息 - roop v0.0.2 加载脚本时出错: swapper.py 回溯(最近一次调用): 文件 “F:\Deepfake\stable-diffusion-webui\modules\scripts.py”,第 263 行,在 load_scripts script_module = script_loading.load_module(scriptfile.path) 文件 “F:\Deepfake\stable-diffusion-webui\modules\script_loading.py”,第 10 行,在 load_module module_spec.loader.exec_module(module) 文件 “”,第 883 行,在 exec_module 文件 “”,第 241 行, 在_call_with_frames_removed文件中 “F:\Deepfake\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py”,第 31 行,在 ANALYSIS_MODEL = insightface.app.FaceAnalysis(name=“buffalo_l”, providers=providers) 文件 “F:\Deepfake\stable-diffusion-webui\venv\lib\site-packages\insightface\app\face_analysis.py”,第 43 行,在 init 断言 '检测' in self.models 断言错误 同样的错误
这是洞察力的问题。
为了解决这个问题,我将face_analysis.py文件的根目录第 24 行更改为绝对地址,如下所示: 'F:/YOURFOLDER/stable-diffusion-webui/venv/Lib/site-packages/insightface'
- 我从insightface的github下载了buffalo_l模型
- 我创建了一个名为“models”的文件夹并将其解压缩。(F:\YOUTFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\models)
注意:face_analysys.py文件位于以下文件夹中:F:\YOURFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\app
find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\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: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\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: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
set det-size: (640, 640)
I:\AI\sd-webui-aki-v4.2\python\lib\site-packages\insightface\utils\transform.py:68: FutureWarning:
rcond parameter will change to the default of machine precision times max(M, N) where M and N are the input matrix dimensions.
To use the future default and silence this warning we advise to pass rcond=None, to keep using the old, explicitly pass rcond=-1.
P = np.linalg.lstsq(X_homo, Y)[0].T # Affine matrix. 3 x 4
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\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: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\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: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
find model: I:\AI\sd-webui-aki-v4.2\python\Lib\site-packages\insightface\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
set det-size: (640, 640)
Error running postprocess_batch: I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py
Traceback (most recent call last):
File "I:\AI\sd-webui-aki-v4.2\modules\scripts.py", line 496, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\faceswap.py", line 183, in postprocess_image
result: ImageResult = swap_face(
File "I:\AI\sd-webui-aki-v4.2\extensions\sd-webui-roop\scripts\swapper.py", line 132, in swap_face
result = face_swapper.get(result, target_face, source_face)
AttributeError: 'NoneType' object has no attribute 'get'
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
Hello author, the previous problem has been resolved, but a new problem has occurred:)~~~~
2023-06-19 20:38:41,694 - roop - INFO - roop v0.0.2 Error loading script: swapper.py Traceback (most recent call last): File "F:\Deepfake\stable-diffusion-webui\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "F:\Deepfake\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 "F:\Deepfake\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 31, in ANALYSIS_MODEL = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File "F:\Deepfake\stable-diffusion-webui\venv\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError Same error
This is an issue with insightface.
To solve this problem, I changed the root of the face_analysis.py file, line 24, to the absolute address like:
'F:/YOURFOLDER/stable-diffusion-webui/venv/Lib/site-packages/insightface'
* I downloaded the buffalo_l model from insightface's github * I created a folder called "models" and unzipped it inside. (F:\YOUTFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\models)NOTE: The face_analysys.py file is located in the folder: F:\YOURFOLDER\stable-diffusion-webui\venv\Lib\site-packages\insightface\app
This fixed it for me! I can now see the roop tab. THANK YOU!!!!
This problem is really giving me a headache. I haven't been able to sleep for several days. I really want to solve this problem quickly.*
U are so cute
Error running postprocess_batch: xxxx\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py/it] Traceback (most recent call last): File " xxxx\stable-diffusion-webui\modules\scripts.py", line 496, in postprocess_image script.postprocess_image(p, pp, *script_args) File " xxxx\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py", line 184, in postprocess_image result: ImageResult = swap_face( File " xxxx\stable-diffusion-webui\extensions\sd-webui-roop\scripts\swapper.py", line 123, in swap_face source_face = get_face_single(source_img, face_index=0) File " xxxx\extensions\sd-webui-roop\scripts\swapper.py", line 76, in get_face_single face_analyser = insightface.app.FaceAnalysis(name="buffalo_l", providers=providers) File " xxxx\stable-diffusion-webui\venv-3060\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError
https://www.reddit.com/r/StableDiffusion/comments/14i2rr1/im_getting_this_big_ass_error_after_install_roop/
Error running postprocess_image: E:\AI\stable-diffusion-webui\extensions\sd-webui-roop\scripts\faceswap.py Traceback (most recent call last): File "E:\AI\stable-diffusion-webui\modules\scripts.py", line 514, in postprocess_image script.postprocess_image(p, pp, *script_args) File "E:\AI\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'
I have not slightest clue what to do, It was working fine and after week or so I am getting this fat error
Error running postprocess_batch: /Users/ricosun/BACKUP stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py████████████████████████████████████████████████████████| 45/45 [00:54<00:00, 1.84s/it] Traceback (most recent call last): File "/Users/ricosun/BACKUP stable-diffusion-webui/modules/scripts.py", line 463, in postprocess_image script.postprocess_image(p, pp, *script_args) File "/Users/ricosun/BACKUP stable-diffusion-webui/extensions/sd-webui-roop/scripts/faceswap.py", line 184, in postprocess_image result: ImageResult = swap_face( File "/Users/ricosun/BACKUP stable-diffusion-webui/extensions/sd-webui-roop/scripts/swapper.py", line 109, in swap_face converted = convert_to_sd(target_img) File "/Users/ricosun/BACKUP stable-diffusion-webui/extensions/sd-webui-roop/scripts/cimage.py", line 6, in convert_to_sd chunks = detect(img) File "/opt/homebrew/lib/python3.10/site-packages/ifnude/detector.py", line 46, in detect detection_model = onnxruntime.InferenceSession(model_path, providers=["CPUExecutionProvider"]) File "/opt/homebrew/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 383, in init self._create_inference_session(providers, provider_options, disabled_optimizers) File "/opt/homebrew/lib/python3.10/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 /Users/ricosun/.ifnude/detector.onnx failed:Protobuf parsing failed.
Please help !
do it like this
