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

Remote GPU #74

Closed
wants to merge 5 commits into from
Closed

Conversation

mynameisfiber
Copy link
Contributor

My good GPU is on a headless machine so I hacked in some remote GPU capabilities and cleaned up some of the prediction code. Normally I'd also run black and isort on things, but that doesn't seem to be the package standard so forgive the messy code!

This pull request adds in the following arguments:

  • is-worker: designates whether the current process is a dedicated worker
  • worker-port: what port the worker listens on
  • worker-host: what host the worker is on
  • compress: whether to compress communications for faster throughput at the cost of some CPU

What I do to have the system up is on my server I run:

$ ./run.sh --is-worker --compress

and on my laptop I run:

$ ./run.sh --worker-host 192.168.X.X --compress

and profit!

Currently I get about 10FPS on WIFI connected to my servers RTX 2080TI. I presume most of the decrease in framerate is because of network latency. If I had a spare network cable, I could test doing things on the wire.

NOTE: This PR adds extra python dependencies which requires running ./scripts/install.sh again.

@alievk
Copy link
Owner

alievk commented Apr 20, 2020

That's a fantastic work! Will be testing it!

@pablodz
Copy link

pablodz commented Apr 21, 2020

Very interesting

@E3V3A
Copy link

E3V3A commented Apr 24, 2020

Are you guys done testing this?
Then please merge. (I would love seeing this work..).

@E3V3A E3V3A mentioned this pull request Apr 24, 2020
@alievk
Copy link
Owner

alievk commented Apr 26, 2020

@E3V3A Still didn't get my hands on it, you can clone https://github.com/mynameisfiber/avatarify/tree/feat/remote-gpu and test it meanwhile.

@alievk
Copy link
Owner

alievk commented Apr 26, 2020

Hi @mynameisfiber , thank you very much for the PR. I've tried it on my Lenovo T470s and 2080 Ti sever and got ~9FPS, while running locally at 30FPS.

Could you sync with our latest version so that we could merge neatly?

@alievk
Copy link
Owner

alievk commented May 3, 2020

@mynameisfiber I manually merged this branch into https://github.com/alievk/avatarify/tree/feat/remote-gpu

Could you reopen your pull request to merge to this branch or should I close this PR?

@mynameisfiber
Copy link
Contributor Author

@alievk I'll just close this PR and you can manually merge the new branch! I'm glad it's working for you. Did you mean you got 30FPS using this branch and 9FPS locally with just your laptop?

@alievk
Copy link
Owner

alievk commented May 11, 2020

@mynameisfiber looks like the bottleneck was in the data serialization. If you directly send over encoded jpeg images [1] it features a decent performance (20FPS over WiFi connection to a dedicated server in the internet).

[1] https://github.com/alievk/avatarify/blob/master/afy/predictor_remote.py#L49

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

Successfully merging this pull request may close these issues.

4 participants