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

A question about the environment #939

Open
zqq-nuli opened this issue Feb 15, 2025 · 5 comments
Open

A question about the environment #939

zqq-nuli opened this issue Feb 15, 2025 · 5 comments

Comments

@zqq-nuli
Copy link

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.

@Uniqbank
Copy link

@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
Copy link

@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.

@zqq-nuli
Copy link
Author

@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 #191

@zqq-nuli
Copy link
Author

@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

@MMbundles
Copy link

@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

——————

#943 (comment) 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?

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

3 participants