hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
35.19k stars 4.98k forks source link

Google-colab remote gpu processing #579

Open Thankgod20 opened 4 days ago

Thankgod20 commented 4 days ago

For those without GPU powered system. The fork allows them to connect remotely to google colab to make use of its GPU resources. This currently works only for face swapping and live streaming. Fast internet connection is needed to reduce the latency of the stream

Summary by Sourcery

Enable remote GPU processing via Google Colab for face swapping and live streaming, adding a 'Remote Processor' option in the UI. Update the UI layout and documentation to support these new features.

New Features:

Enhancements:

Documentation:

sourcery-ai[bot] commented 4 days ago

Reviewer's Guide by Sourcery

This pull request implements a remote GPU processing feature for Google Colab, allowing users without GPU-powered systems to connect remotely to Google Colab for face swapping and live streaming. The changes primarily affect the UI, add remote processing functionality, and include new files for Google Colab integration.

File-Level Changes

Change Details Files
Expanded UI to support remote processing
  • Increased ROOT_WIDTH from 600 to 800
  • Added 'Remote Processor' switch
  • Added input fields for remote processing addresses
  • Adjusted positions of existing UI elements
  • Added NSFW switch (previously commented out)
modules/ui.py
Implemented remote processing functionality
  • Added remote_processor to frame processor choices
  • Created new global variables for remote processing addresses
  • Modified webcam_preview function to support remote processing
  • Added error handling for remote processing setup
modules/core.py
modules/globals.py
Added Google Colab integration
  • Created new file for Google Colab notebook
  • Implemented server-side face swapping logic
  • Added TCP communication for remote processing
google-colab/DeepLive_Google_Colab.ipynb
Created remote processor module
  • Implemented functions for sending and receiving frames
  • Added support for streaming video frames
  • Created face swapping logic for remote processing
modules/processors/frame/remote_processor.py
Updated project metadata and documentation
  • Incremented version number to 1.3.1
  • Changed edition to 'Portable-Colab'
  • Added instructions for Google Colab usage in README.md
modules/metadata.py
README.md

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.