Diffusion-ui-backend

Warning

This backend is now obsolete and you should instead use the Automatic1111 backend.

Installation

  • Install conda if it is not already installed

  • Create an environment named dui:

conda create -n dui python=3.10
  • Activate that environment (You will need to do that every time before running the backend):

conda activate dui
  • You now should have a (dui) text in front of your prompt indicating that you are inside that environment.

  • Inside this environment, install pytorch with cuda support:

conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge
  • Install the diffusionui backend and its dependencies:

pip install diffusionui

First Usage

The first time, you have to download the model:

diffusionui --low-mem --download-model

Usage

Once the installation has been done, you should have a diffusionui executable in the dui environment you created.

Every time you need to run the backend, don’t forget to activate that environment:

conda activate dui

You can check the current installed version by typing:

diffusionui --version

To start the backend, run:

diffusionui --low-mem

It should produce an local URL for the gradio interface:

Running on local URL:  http://127.0.0.1:7860/

Once you have this local URL, congratulations 🚀 ! You can now visit https://diffusionui.com to access it with the nice interface.

Sharing

It is possible to use Diffusion-UI on your smartphone, tablet or other computer by sharing the backend on your PC.

To share the backend:

  • use --share to get a public url that can be used from an external device

  • optionaly use --access-code to specify a required code to access the model

diffusionui --low-mem --share --access-code 1234

You’ll receive something like this:

Running on local URL:  http://127.0.0.1:7860/
Running on public URL: https://16141.gradio.app

Then, from your smartphone or tablet:

  • go to http://diffusionui.com

  • open the left panel with the top-left icon, then open the model info tab (ⓘ)

  • Click on the API URL and change it by replacing the hostname by the provided public URL (https://16141.gradio.app/api/predict in this example)

  • Below, insert the access code if needed

Once you’ve done this, you can use it on this device. The url and access code is saved in Local Storage in your browser so you need to do this only once.

You can now show this amazing technology to all your friends!