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

Can video_blend.py turned into using CUDA instead of CPU? #110

Open
FurkanGozukara opened this issue Nov 7, 2023 · 3 comments
Open

Can video_blend.py turned into using CUDA instead of CPU? #110

FurkanGozukara opened this issue Nov 7, 2023 · 3 comments

Comments

@FurkanGozukara
Copy link

FurkanGozukara commented Nov 7, 2023

I am preparing a free Kaggle Notebook tutorial

Running this step : !python video_blend.py result/elon_musk_speech_short_768 --beg 1 --end 31 --itv 10 --key keys --output result/elon_musk_speech_short_768/blend.mp4 --fps 30.0 --n_proc 3 -ps

It is taking forever and no process

It is fully using CPU

Can this be done on GPU?

The ebsynth compiled on Kaggle with below command

!bash build-linux-cpu+cuda.sh

image

it is getting stuck at below part

Traceback (most recent call last):
  File "/kaggle/working/Rerender_A_Video/video_blend.py", line 318, in <module>
    main(args)
  File "/kaggle/working/Rerender_A_Video/video_blend.py", line 263, in main
    run_ebsynth(video_sequence)
  File "/kaggle/working/Rerender_A_Video/video_blend.py", line 133, in run_ebsynth
    p.join()
  File "/opt/conda/lib/python3.10/multiprocessing/process.py", line 149, in join
    res = self._popen.wait(timeout)
  File "/opt/conda/lib/python3.10/multiprocessing/popen_fork.py", line 43, in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
  File "/opt/conda/lib/python3.10/multiprocessing/popen_fork.py", line 27, in poll
    pid, sts = os.waitpid(self.pid, flag)

got this below pip errors

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
cudf 23.8.0 requires cupy-cuda11x>=12.0.0, which is not installed.
cuml 23.8.0 requires cupy-cuda11x>=12.0.0, which is not installed.
dask-cudf 23.8.0 requires cupy-cuda11x>=12.0.0, which is not installed.
apache-beam 2.46.0 requires dill<0.3.2,>=0.3.1.1, but you have dill 0.3.7 which is incompatible.
apache-beam 2.46.0 requires pyarrow<10.0.0,>=3.0.0, but you have pyarrow 11.0.0 which is incompatible.
chex 0.1.82 requires numpy>=1.25.0, but you have numpy 1.22.4 which is incompatible.
cudf 23.8.0 requires pandas<1.6.0dev0,>=1.3, but you have pandas 2.0.2 which is incompatible.
cudf 23.8.0 requires protobuf<5,>=4.21, but you have protobuf 3.20.3 which is incompatible.
cuml 23.8.0 requires dask==2023.7.1, but you have dask 2023.9.0 which is incompatible.
dask-cuda 23.8.0 requires dask==2023.7.1, but you have dask 2023.9.0 which is incompatible.
dask-cuda 23.8.0 requires pandas<1.6.0dev0,>=1.3, but you have pandas 2.0.2 which is incompatible.
dask-cudf 23.8.0 requires dask==2023.7.1, but you have dask 2023.9.0 which is incompatible.
dask-cudf 23.8.0 requires pandas<1.6.0dev0,>=1.3, but you have pandas 2.0.2 which is incompatible.
fitter 1.6.0 requires pandas<3.0.0,>=2.0.3, but you have pandas 2.0.2 which is incompatible.
momepy 0.6.0 requires shapely>=2, but you have shapely 1.8.5.post1 which is incompatible.
pymc3 3.11.5 requires numpy<1.22.2,>=1.15.0, but you have numpy 1.22.4 which is incompatible.
pymc3 3.11.5 requires scipy<1.8.0,>=1.7.3, but you have scipy 1.11.2 which is incompatible.
raft-dask 23.8.0 requires dask==2023.7.1, but you have dask 2023.9.0 which is incompatible.
torchvision 0.15.1+cu117 requires torch==2.0.0, but you have torch 2.0.1 which is incompatible.
ydata-profiling 4.3.1 requires scipy<1.11,>=1.4.1, but you have scipy 1.11.2 which is incompatible.
@williamyang1991
Copy link
Owner

We are not the developers of ebsynth, we just use it. So we have no idea on how to modify it to satisfy your need.
Maybe you can raise an issue in the original ebsynth repository to ask for help from the ebsynth's developers.

@FurkanGozukara
Copy link
Author

We are not the developers of ebsynth, we just use it. So we have no idea on how to modify it to satisfy your need. Maybe you can raise an issue in the original ebsynth repository to ask for help from the ebsynth's developers.

so you think this is ebsynth problem. it works very well on my PC windows or on RunPod ubuntu. why do you think not working on Kaggle? any ideas?

@williamyang1991
Copy link
Owner

Because this code video_blend.py is just about ebsynth without diffusion. And you code stuck when it call the ebsynth.exe (run_ebsynth(video_sequence))
I am not familiar with the kaggle platform. So I have no idea.

Maybe you can print the cmd of ebsynth and try to run this cmd rather than video_blend.py and see if it works.

if OPEN_EBSYNTH_LOG:
print(cmd)
subprocess.run(cmd,
shell=True,
capture_output=not OPEN_EBSYNTH_LOG)

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