A team project developed for our engineering thesis. The application focuses on helping interior architects to use artificial intelligence models in their work.
- Many Stable Diffusion model versions to choose from
- Available workflows:
- Text-to-image
- Image-to-image
- ControlNet
- Inpainting
- Outpainting
- Canvas
- User accounts system with gallery, to store all created pictures, and administrator panel
- Many features to support architects:
- Visual Prompting - visual representation of text prompts
- Advanced parameter selection sheet
- Easy switching between workflows
- Prompt writing tutorial
- Backend: Python + FastAPI
- Frontend: React + Tailwind CSS
- Database: MongoDB
- Image generation: Stable Diffusion, Hugging Face API, Civit AI API, Comfy UI
- Containerization: Docker
It is recommended to run this application on either native or wsl Ubuntu LTS 24.04.
- RAM: 32 GB or more
- GPU: NVIDIA RTX 2080 8GB / NVIDIA RTX 4060 8GB or better
- Storage: 1TB free disk space or more
-
Install docker with this instructions https://docs.docker.com/engine/install/ubuntu/ (In case of buildix issue: https://forums.docker.com/t/tips-for-how-to-fix-my-borked-cli-plugins/144327/3)
-
Install NVIDIA Container Toolkit
a. Add NVIDIA GPG key and repositorycurl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \ sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.listb. Update package list
sudo apt-get updatec. Install the toolkit
sudo apt-get install -y nvidia-container-toolkitd. Configure the runtime
sudo nvidia-ctk runtime configure --runtime=docker sudo systemctl restart docker sudo nvidia-ctk runtime configure --runtime=containerd sudo systemctl restart containerd -
Generate read only api token on https://huggingface.co/settings/tokens.
-
Generate api token on https://civitai.com/user/account.
-
In main directory create
api_keys.envfile with following contents:HF_TOKEN=<hf_api_token> CIVITAI_TOKEN=<civitai_api_token> -
Run
sudo ./download_models.shto download all the models (This needs to be run only once) -
Build & run (Use after making changes to the docker related files or when installing new packages/modules) FIRST RUN WILL TAKE A LONG TIME!!!:
- Developement mode:
docker compose down && docker compose up --build
or - Production mode:
docker compose down && docker compose -f docker-compose-production.yml up --build -d
- Developement mode:
-
Run:
- Developement mode:
docker compose down && docker compose up
or - Production mode:
docker compose down && docker compose -f docker-compose-production.yml up -d
- Developement mode:
- ssh -L 80:localhost:80 -J <login_bastion>@bastion.ii.agh.edu.pl <login_pc>@<ip_pc>
cd frontendsudo apt install npmnpm run test:uiornpm run test
