forked from akash-network/awesome-akash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Runing Image Generator On Akash (akash-network#419)
- Loading branch information
Showing
8 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM pytorch/pytorch:latest | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
git && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /app | ||
|
||
COPY Pipfile Pipfile.lock . | ||
RUN pip install pipenv && \ | ||
pipenv install --system | ||
|
||
COPY scripts scripts | ||
COPY core core | ||
|
||
VOLUME /data | ||
|
||
ENV FLASK_APP=scripts/web.py | ||
|
||
CMD ["flask", "run", "--port", "3000", "--host", "0.0.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# AI-Art | ||
|
||
![AI-Art Screenshot](./Screenshot(234).png) | ||
|
||
Art generation using VQGAN + CLIP using docker containers. A simplified, | ||
updated, and expanded upon version of | ||
[Kevin Costa's work](https://github.com/kcosta42/VQGAN-CLIP-Docker). This | ||
project tries to make generating art as easy as possible for anyone with a GPU | ||
by providing a simple web UI. | ||
|
||
|
||
## Samples | ||
|
||
For samples check out the [AI Generated](http://1j0gql7905agf792r45ae0hl68.ingress.akashost.com/) section | ||
on the art page on website. | ||
|
||
|
||
## Using ai-art | ||
|
||
This works best if you have an NVIDIA GPU however there is a fallback CPU mode included. I've found the CPU mode to take significantly longer than even the most basic of GPUs though. | ||
|
||
|
||
### Quick start usage | ||
For running just deploy [this SDL](https://github.com/alfset/awesome-akash/blob/master/AI-Image-App/deploy.yaml) and wait for the models to finish loading, watching the process in the logs. | ||
|
||
### Logs | ||
|
||
![Checking Logs](./Screenshot(232).png) | ||
|
||
### Check GPU resources has been used | ||
|
||
![Checking GPU resources](./Screenshot(233).png) | ||
|
||
## Image sizes | ||
|
||
The larger the image the more VRAM your graphics card needs: | ||
|
||
- 6 GB of VRAM is required to generate 256x256 images. | ||
- 12 GB of VRAM is required to generate 512x512 images. | ||
- 24 GB of VRAM is required to generate 1024x1024 images. | ||
|
||
If you don't know how much VRAM your graphics card has you probably have 6 GB | ||
or less so stick with smaller images. | ||
|
||
That being said you can do non-square images if you want as long as you don't | ||
go above the number of pixels your GPU's VRAM supports, for example you could | ||
do ultrawide images with 6 GB of ram at "384x128" or do tall images at "128x384" | ||
and so on. You do not have to use numbers with a power of 2, "300x100" is also | ||
perfectly valid. | ||
|
||
## Demo Video | ||
https://github.com/alfset/awesome-akash/blob/master/AI-Image-App/ai-image-app_screen-capture.webm |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
##sdl yaml | ||
version: '2.0' | ||
services: | ||
gpu-app: | ||
image: overshard/ai-art | ||
expose: | ||
- port: 3000 | ||
as: 80 | ||
to: | ||
- global: true | ||
profiles: | ||
compute: | ||
gpu-app: | ||
resources: | ||
cpu: | ||
units: 1 | ||
memory: | ||
size: 38Gi | ||
gpu: | ||
units: 1 | ||
attributes: | ||
vendor: | ||
nvidia: | ||
storage: | ||
- size: 100Gi | ||
placement: | ||
westcoast: | ||
pricing: | ||
gpu-app: | ||
denom: uakt | ||
amount: 100000 | ||
deployment: | ||
gpu-app: | ||
westcoast: | ||
profile: gpu-app | ||
count: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters