/OneDiffusionGUI

OneDiffusion GUI.

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

OneDiffusionGUI

Basically a project that I made for school. It takes the input from the client and sends it to the OneDiffusion server.

Screenshots

Normal mode

image

Translation enabled

image

Logs

image

Running

Server

  1. You need python 3.10.xx installed.
  2. Depending on your hardware you can choose:

a) Nvidia GPUs.

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

b) Older Nvidia GPUs.

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

c) CPU.

pip3 install torch torchvision torchaudio
  1. Install the rest of the packages.
pip install bentoml onediffusion
  1. Start the OneDiffusion server, replace YOUR/MODEL with a huggingface model. Example: Lykon/DreamShaper.
onediffusion start stable-diffusion --model-id YOUR/MODEL
  1. [OPTIONAL] Set up port forwarding on your router for the port 3000 to connect to the server from other networks.

Client

  1. Clone this repo.
git clone https://github.com/xemulat/OneDiffusionGUI
  1. Install requirements.
pip install PyQt5 requests easygoogletranslate
  1. Edit the line 21 to reflect your setup. Example:
r = post('http://127.0.0.1:3000/text2img', headers=self.headers, json=self.payload)
  1. Run it
python main.py