Basically a project that I made for school. It takes the input from the client and sends it to the OneDiffusion server.
- You need python 3.10.xx installed.
- 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
- Install the rest of the packages.
pip install bentoml onediffusion
- Start the OneDiffusion server, replace YOUR/MODEL with a huggingface model. Example: Lykon/DreamShaper.
onediffusion start stable-diffusion --model-id YOUR/MODEL
- [OPTIONAL] Set up port forwarding on your router for the port 3000 to connect to the server from other networks.
- Clone this repo.
git clone https://github.com/xemulat/OneDiffusionGUI
- Install requirements.
pip install PyQt5 requests easygoogletranslate
- Edit the line 21 to reflect your setup. Example:
r = post('http://127.0.0.1:3000/text2img', headers=self.headers, json=self.payload)
- Run it
python main.py