Skip to main content

Running generative models locally

All the big models run on external servers and are usually only available through a (paid) account. There are some alternatives available that you can run locally on your own machine. Installing these usually involves complex installation procedures, but there's a trend for 'one-click-installers' that get you set up relatively painlessly. Below you can find some simple installers for various generative AI's.

Note 1 All of these models take up significant amount of space on your computer. The programs can take up to 3Gb, and the models are even larger. Make sure you have around 30Gb free once you get these models running!

Note 2 Most of these models need (recent and beefy) Nvidia graphics cards to run, or Apple M1/M2.

If you don't have a system that can run these models and you also don't want to use the online services, or need some help with installation, please visit us in Oudenoord ON0.50. We have some models set up here that you can experiment with. Open for both students and employees (of HKU.)

Image generation on your own computer

These models are based on Stable Diffusion. You will not get the latest version, but you can re-train the model, or download variants from the internet. Automatic11111 also allows you to combine models.

Stable Diffusion WebUI by Automatic11111: https://github.com/AUTOMATIC1111/stable-diffusion-webui (Win, Linux, Mac)

Easy Diffusion https://github.com/easydiffusion/easydiffusion (Win, Linux, Mac)

Both programs above can be downloaded from the Github page directly, resulting in a folder containing a .bat file. Run this and it will start downloading and installing all necessary files. Once it's done, run the .bat again and the program will start in your browser.

DiffusionBee https://diffusionbee.com/ for Mac. Also runs on older Intel macs, but those will take a very long time to generate images.

Text generation ('ChatGPT') on your own computer

Llama2: https://github.com/oobabooga/text-generation-webui (Win, Linux, Mac)

The program above can be downloaded from the Github page directly, resulting in a folder containing a .bat file. Run this and it will start downloading and installing all necessary files. Once it's done, run the .bat again and the system will be running in a terminal. At that point you can start the interface by opening your favourite browser and going to the web address that the terminal shows (usually http:\\127.0.0.1:7860).

The first time you run it you will still need to download a language model. You can find those on Huggingface, for instance TheBloke/Llama-2-7B-Chat-GPTQ. Not all models are available without registering on Huggingface. You can paste this address into the File Name section of the Model tab, then hit Download. After the model has been downloaded, you can load it from the Model loader bar on the top left.

Other

At the moment there's Pinokio, which strives to be something of an AI-app-store that can also automate processes between different AI types. You can find it here: https://pinokio.computer/