Deep-Live-Cam icon indicating copy to clipboard operation
Deep-Live-Cam copied to clipboard

A question about the environment

Open zqq-nuli opened this issue 10 months ago • 5 comments

This problem occurred when I was organizing the Deep-Live-Cam project. I wanted to change it to run in API mode, and it has basically succeeded.

But the face enhancement part will go wrong. The general error is that an error will occur when the load_frame_processor_module in its processors-frame-core.py file dynamically imports the face_enhancer package. No module named 'torchvision.transforms.functional_tensor' This seems to be because the new version of torchvision changed the function name to _functional_tensor, but I carefully checked the pip of the two projects and there is no difference between them. I use conda for environment management, and the python version, pip version, package version, and cuda version are all the same. The original project runs without this error, and the face enhancement also runs normally. After the image is processed here, the face is obviously blurred.

zqq-nuli avatar Feb 15 '25 06:02 zqq-nuli

@zqq-nuli , nice to e-meet you. :)

I was facing similar issue with _functional_tensor and after trying couple of other versions with no success, I had to change import in one of the lib file which resolved this issue. I know it's not ideal but a hacky way to solve it but had to remove my blocker in meantime.

Hope it helps anyone facing similar issues.

Uniqbank avatar Feb 15 '25 17:02 Uniqbank

@zqq-nuli , I am also trying to run it in API mode, can you please share the details if you succeeded in doing so? Thanks in advance.

Uniqbank avatar Feb 15 '25 17:02 Uniqbank

@zqq-nuli , nice to e-meet you. :)

I was facing similar issue with _functional_tensor and after trying couple of other versions with no success, I had to change import in one of the lib file which resolved this issue. I know it's not ideal but a hacky way to solve it but had to remove my blocker in meantime.

Hope it helps anyone facing similar issues.

Unfortunately, I also solved the problem in this way. I found the solution through this isuess https://github.com/hacksider/Deep-Live-Cam/issues/191

zqq-nuli avatar Feb 17 '25 21:02 zqq-nuli

@zqq-nuli , I am also trying to run it in API mode, can you please share the details if you succeeded in doing so? Thanks in advance.

I think I have succeeded in part of the face_swapper part of the call work has been completed, but unfortunately it is not completely successful, the current face enhancement version call still has some problems, I have no intention of continuing to fix it, because my energy is limited, we have found a better solution

zqq-nuli avatar Feb 17 '25 21:02 zqq-nuli

@zqq-nuli , I am also trying to run it in API mode, can you please share the details if you succeeded in doing so? Thanks in advance.

I think I have succeeded in part of the face_swapper part of the call work has been completed, but unfortunately it is not completely successful, the current face enhancement version call still has some problems, I have no intention of continuing to fix it, because my energy is limited, we have found a better solution

——————

https://github.com/hacksider/Deep-Live-Cam/issues/943#issue-2858344183 You gave this suggestion about doing this I think it is not a problem with the code base, but a problem with your local environment. You can try to turn off the function of falling back to the CPU version and try to run cuda alone. Currently, if you run the cuda version, it will not be successfully called and will fall back to the cpu version. Can you give me an insight on how to do it?

MMbundles avatar Feb 18 '25 08:02 MMbundles