ai-forever / ghost

A new one shot face swap approach for image and video domains
Apache License 2.0
1.25k stars 264 forks source link

Colab no longer working #75

Open adamgeddon1686 opened 1 year ago

adamgeddon1686 commented 1 year ago

Google colab has upgraded the default python runtime to 3.10 and that makes the version of onnxruntime incompatible. I tried just upgrading onnxruntime but that didn't work because of a changes to onnxruntime from version 1.8 to anything beyond that. I am attempting a workaround by using the fallback runtime but eventually it won't work anymore. The only solution long term seems to be to either upgrade the inference to work with a different version of onnx or to rebuild onnx to work on python 3.10. I am also reaching out to the people behind onnx to see if this is possible.

adamgeddon1686 commented 1 year ago

I actually got it to work by using the fallback runtime that has python 3.9 by running "Use fallback runtime version" from the command palette. Then you have to make sure to re-enable the GPU and it should work. But this will only be a temporary fix since the fallback runtime will eventually be phased out. According to their documentation, sometime in may. The best solution would be to make this to work with a newer version of onnxruntime-gpu that is compatible with later versions of python. But that is beyond my capabilities. Alternative, you could make a version of onnx that runs on the newer versions of python. If not, this will stop working on colab in a few weeks.

ak3389 commented 1 year ago

I have the same problem

adamgeddon1686 commented 1 year ago

It really boils down to a single command which no longer works which is

!pip install onnxruntime-gpu == 1.8

This is because this version of onnxruntime-gpu 1.8 isn't compatible with python 3.10 and there is a major change from v1.8 to future version which would require a rewrite of the code in the notebook.

AlexanderGroshev commented 1 year ago

Hi @adamgeddon1686, @ak3389! Error fixed, colab should work now.

loboere commented 10 months ago

now colab give error colab error OSError: libcudart.so.11.0: cannot open shared object file: No such file or directory