un1tz3r0 / sdxl-webcam

A virtual webcam with SDXL Turbo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SDXL turbo virtual webcam demo

This script passes your webcam feed into SDXL turbo img2img and streams it to a virtual cam you can use in your Zoom calls.

Alt text

Quickstart

At the least:

sudo apt-get install v4l2loopback-dkms
sudo apt-get install python3-dev

Then clone this repo.

poetry install

Download the wheel from https://github.com/chengzeyi/stable-fast/releases/tag/v0.0.13.post3

poetry shell
pip install <sd-fast wheel>

Go to img2img.py and update the CACHE_DIR

python cam.py

You should now have a virtual cam. Use the keymap popup to activate keybindings.

Disclaimer: this is only tested on Linux. Prepare to fight some drivers and missing libs. This command will be your ally in dark times:

sudo modprobe -r v4l2loopback && sudo modprobe v4l2loopback devices=1 video_nr=4 card_label="Virtual" exclusive_caps=1 max_buffers=2

Demo fridays @ glif

This script was thrown together for our friday demos at glif.app. Give us a follow to see what we're up to: https://twitter.com/heyglif

Acknowledgements

About

A virtual webcam with SDXL Turbo


Languages

Language:Python 100.0%