Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to solve #28

Open
zachysaur opened this issue Mar 3, 2024 · 2 comments
Open

how to solve #28

zachysaur opened this issue Mar 3, 2024 · 2 comments

Comments

@zachysaur
Copy link

100%|████████████████████████████████████████████████████████████████| 30/30 [03:52<00:00, 7.75s/it]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.29 seconds
Inswapper: Target index: 0.0
Applied providers: ['AzureExecutionProvider', 'CPUExecutionProvider'], with options: {'AzureExecutionProvider': {}, 'CPUExecutionProvider': {}}
find model: ./checkpoints\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['AzureExecutionProvider', 'CPUExecutionProvider'], with options: {'AzureExecutionProvider': {}, 'CPUExecutionProvider': {}}
find model: ./checkpoints\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0
Applied providers: ['AzureExecutionProvider', 'CPUExecutionProvider'], with options: {'AzureExecutionProvider': {}, 'CPUExecutionProvider': {}}
find model: ./checkpoints\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0
Applied providers: ['AzureExecutionProvider', 'CPUExecutionProvider'], with options: {'AzureExecutionProvider': {}, 'CPUExecutionProvider': {}}
find model: ./checkpoints\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0
Applied providers: ['AzureExecutionProvider', 'CPUExecutionProvider'], with options: {'AzureExecutionProvider': {}, 'CPUExecutionProvider': {}}
find model: ./checkpoints\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5
set det-size: (320, 320)
F:\New folder (2)\Fooocus-inswapper\fooocusins_env\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
warnings.warn(
Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}}
inswapper-shape: [1, 3, 128, 128]
F:\New folder (2)\Fooocus-inswapper\fooocusins_env\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
Replacing faces in target image from the left to the right by order
Traceback (most recent call last):
File "F:\New folder (2)\Fooocus-inswapper\modules\async_worker.py", line 859, in worker
handler(task)
File "F:\New folder (2)\Fooocus-inswapper\fooocusins_env\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "F:\New folder (2)\Fooocus-inswapper\fooocusins_env\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "F:\New folder (2)\Fooocus-inswapper\modules\async_worker.py", line 811, in handler
imgs = perform_face_swap(imgs, inswapper_source_image, inswapper_target_image_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\New folder (2)\Fooocus-inswapper\modules\face_swap.py", line 17, in perform_face_swap
from inswapper.restoration import face_restoration,check_ckpts,set_realesrgan,torch,ARCH_REGISTRY,cv2
File "F:\New folder (2)\Fooocus-inswapper\inswapper\restoration.py", line 10, in
from basicsr.utils import imwrite, img2tensor, tensor2img
File "F:\New folder (2)\Fooocus-inswapper\fooocusins_env\Lib\site-packages\basicsr_init_.py", line 4, in
from .data import *
File "F:\New folder (2)\Fooocus-inswapper\fooocusins_env\Lib\site-packages\basicsr\data_init_.py", line 22, in
dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\New folder (2)\Fooocus-inswapper\fooocusins_env\Lib\site-packages\basicsr\data_init
.py", line 22, in
dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ggrov\anaconda3\Lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\New folder (2)\Fooocus-inswapper\fooocusins_env\Lib\site-packages\basicsr\data\realesrgan_dataset.py", line 11, in
from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
File "F:\New folder (2)\Fooocus-inswapper\fooocusins_env\Lib\site-packages\basicsr\data\degradations.py", line 8, in
from torchvision.transforms.functional_tensor import rgb_to_grayscale
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'
Total time: 301.64 seconds

@machineminded
Copy link
Owner

This appears to be a related issue:

XPixelGroup/BasicSR#650

I'll try to dig into this more. But running configure.bat and run.bat should be enough in Windows.

@machineminded
Copy link
Owner

Did you run some of the configure.bat commands manually? If you wanted to just configure inswapper, you could install requirements and then clone inswapper and codeformer, then copy the facelib and basicsr folders over to the venv site packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants