radames's picture
Update README.md
c0b464a
metadata
title: StreamDiffusion Realtime Txt2img
emoji: πŸ‘
colorFrom: red
colorTo: yellow
sdk: docker
app_port: 9090
pinned: false

Txt2Img Example

This example provides a simple implementation of the use of StreamDiffusion to generate images from text.

Usage

chmod +x ./start.sh && ./start.sh

or

cd server
python3 main.py &
cd ../view
npm start

Docker

Build GITHUB_TOKEN is temp until project is public

docker build --secret id=GITHUB_TOKEN,src=./github_token.txt -t realtime-txt2img .

Run

docker run -ti -p 9090:9090 -e HF_HOME=/data -v ~/.cache/huggingface:/data  --gpus all realtime-txt2img

-e HF_HOME=/data -v ~/.cache/huggingface:/data is used to mount your local huggingface cache to the container, so that you don't need to download the model again.