-
Notifications
You must be signed in to change notification settings - Fork 142
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
[SOLVED] RuntimeError: Input type (torch.FloatTensor) and weight type (PrivateUse1FloatType) should be the same #40
Comments
Could you please provide |
pip list : (env) D:\ComfyUI>pip list accelerate 0.21.0 pip show torch :: (env) D:\ComfyUI>pip show torch python -V :: |
the only extension other than this one is the manager btw. |
Cannot repeat these errors Also you use different versions of one package: |
updated both torch and torchvision and then made the others same version , still the same error , in the end deleted the venv folder and set up the comfyui (while setting this up I found out the reason torch and torchvision's version numbers, those are installed by "pip install torch-directml") , then setup this extension , installed its requirements via install.bat inside the folder, then.... this error : "This ORT build has ['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider'] enabled." which I solved by uninstalling downgrading "onnxruntime-1.16.0" (which comfy installs by default) to "onnxruntime-1.15.1" ..... Annnnd ... "RuntimeError: Input type (torch.FloatTensor) and weight type (PrivateUse1FloatType) should be the same or input should be a MKLDNN tensor and weight is a dense tensor" same error as before , and while re updating torch to 2.0.1 this bit here: "torch-directml 0.2.0.dev230426 requires torch==2.0.0, but you have torch 2.0.1 which is incompatible. so if I want to use directml with my amd gpu with comfy , it doesnt work with the extension. To be clear it works if I don't use a face restore model , just basic swapping. This also works in other roop extensions too. ALSO everything including face restore function works beautifully with a1111. |
Yeah, it seems to be some incompatibility with torch-directml library |
same. Error occurred when executing ReActorFaceSwap: Ran out of input File "L:\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute |
Finally solved this by deleting torch and torchvision from the requirements , This way it is using torch 2.0.0 and torchvision 0.15.1 from the default installed versions of comfyui and codeformer etc is working correctly. |
I was using reactor on sdwebui without any problems and just found out it is also available for comfy , wanted to try it. It works if I don't select a face restore model but if I select either of the two the following error is shown and nothing is produced :
`Error occurred when executing ReActorFaceSwap:
Input type (torch.FloatTensor) and weight type (PrivateUse1FloatType) should be the same or input should be a MKLDNN tensor and weight is a dense tensor
File "D:\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 117, in execute
self.face_helper.get_face_landmarks_5(only_center_face=False, resize=640, eye_dist_threshold=5)
File "D:\ComfyUI\custom_nodes\comfyui-reactor-node\facelib\utils\face_restoration_helper.py", line 151, in get_face_landmarks_5
bboxes = self.face_det.detect_faces(input_img)
File "D:\ComfyUI\custom_nodes\comfyui-reactor-node\facelib\detection\retinaface\retinaface.py", line 209, in detect_faces
loc, conf, landmarks, priors = self.__detect_faces(image)
File "D:\ComfyUI\custom_nodes\comfyui-reactor-node\facelib\detection\retinaface\retinaface.py", line 156, in __detect_faces
loc, conf, landmarks = self(inputs)
File "D:\ComfyUI\env\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\ComfyUI\custom_nodes\comfyui-reactor-node\facelib\detection\retinaface\retinaface.py", line 121, in forward
out = self.body(inputs)
File "D:\ComfyUI\env\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\ComfyUI\env\lib\site-packages\torchvision\models_utils.py", line 69, in forward
x = module(x)
File "D:\ComfyUI\env\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\ComfyUI\env\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "D:\ComfyUI\env\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,`
The text was updated successfully, but these errors were encountered: