From 4170895646677c120111e82bbd9f410f5fd2108b Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 24 Aug 2022 21:12:42 +0530 Subject: [PATCH] Move media files to a different dir --- README.md | 4 ++-- index.html | 2 +- main.py | 4 ++-- config-v1.jpg => media/config-v1.jpg | Bin ding.mp3 => media/ding.mp3 | Bin shot-v1.jpg => media/shot-v1.jpg | Bin 6 files changed, 5 insertions(+), 5 deletions(-) rename config-v1.jpg => media/config-v1.jpg (100%) rename ding.mp3 => media/ding.mp3 (100%) rename shot-v1.jpg => media/shot-v1.jpg (100%) diff --git a/README.md b/README.md index 5ef45d0d..9203e934 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Two things: All the processing will happen on your local computer, it does not transmit your prompts or process on any remote server. -![Screenshot of tool](shot-v1.jpg?raw=true) +![Screenshot of tool](media/shot-v1.jpg?raw=true) # System Requirements 1. Requires [Docker](https://docs.docker.com/engine/install/), [docker-compose v1.29](https://docs.docker.com/compose/install/), [nvidia-container-toolkit](https://stackoverflow.com/a/58432877) and [Python](https://www.python.org/downloads/) (3.6 or higher). @@ -35,7 +35,7 @@ You can also set the configuration like `seed`, `width`, `height`, `num_outputs` Use the same `seed` number to get the same image for a certain prompt. This is useful for refining a prompt without losing the basic image design. Use a seed of `-1` to get random images. -![Screenshot of advanced settings](config-v1.jpg?raw=true) +![Screenshot of advanced settings](media/config-v1.jpg?raw=true) # Behind the scenes This project is a quick way to get started with Stable Diffusion. You do not need to have Stable Diffusion already installed, and do not need any API keys. This project will automatically download Stable Diffusion's docker image, the first time it is run. diff --git a/index.html b/index.html index a22bdbde..dfbefa58 100644 --- a/index.html +++ b/index.html @@ -94,7 +94,7 @@ function setStatus(statusType, msg, msgType) { } function playSound() { - const audio = new Audio('/ding.mp3') + const audio = new Audio('/media/ding.mp3') audio.volume = 0.2 audio.play() } diff --git a/main.py b/main.py index 182c78cb..9f6b0689 100644 --- a/main.py +++ b/main.py @@ -51,6 +51,6 @@ async def image(req : ImageRequest): res = requests.post(PREDICT_URL, json=data) return res.json() -@app.get('/ding.mp3') +@app.get('/media/ding.mp3') def read_root(): - return FileResponse('ding.mp3') + return FileResponse('media/ding.mp3') diff --git a/config-v1.jpg b/media/config-v1.jpg similarity index 100% rename from config-v1.jpg rename to media/config-v1.jpg diff --git a/ding.mp3 b/media/ding.mp3 similarity index 100% rename from ding.mp3 rename to media/ding.mp3 diff --git a/shot-v1.jpg b/media/shot-v1.jpg similarity index 100% rename from shot-v1.jpg rename to media/shot-v1.jpg