Skip to content

ErenalpCet/StreamDiffusionWebcam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StreamDiffusionWebcam

StreamDiffusionWebcam: A Solution for Real-Time Diffusion Generation

Authors: Erenalp Çetintürk

This projects code was copied from this. This project added the ability to use the camera insted of the screen for diffusion.

We really thank for the projects owners to allow for me to use their code.

The Projects Features

  1. Model Acceleration
    • This project optimizes the model.
  2. Fast
    • This project project run on RTX3050 and got 5 FPS.

Installation

Step 0: Clone This Repository

git clone https://github.com/ErenalpCet/StreamDiffusionWebcam.git
cd StreamDiffusionWebcam

Step 1: Create Environment Using Anaconda

conda create -n webcamdiffusion python=3.10
conda activate webcamdiffusion

Step 2: Install PyTorch GPU

Select the appropriate version for your system.

CUDA 11.8

pip3 install torch==2.1.0 torchvision==0.16.0 xformers --index-url https://download.pytorch.org/whl/cu118

CUDA 12.1

pip3 install torch==2.1.0 torchvision==0.16.0 xformers --index-url https://download.pytorch.org/whl/cu121

CUDA 12.4

pip3 install torch==2.1.0 torchvision==0.16.0 xformers --index-url https://download.pytorch.org/whl/cu124

Step 3: Install Stream Diffusion Library

pip install git+https://github.com/cumulo-autumn/StreamDiffusion.git@main#egg=streamdiffusion[tensorrt]

Step 4: Install TensorRT Extension

python -m streamdiffusion.tools.install-tensorrt

Step 5: Install Requirements

pip install -r requirements.txt

Step 6: Customize The Prompt

In main.py line 149 and 150 please customize the prompts to your needs.

Quick Start

python3 main.py

About

StreamDiffusionWebcam: A Solution for Real-Time Diffusion Generation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages