Skip to content

Installation and Running

Benjamin Paine edited this page Dec 31, 2023 · 1 revision

Automatic Installers

A script is provided for Windows and Linux machines to install, update, and run ENFUGUE. Copy the relevant command below and answer the on-screen prompts to choose your installation type and install optional dependencies.

Windows

Access the command prompt from the start menu by searching for "command." Alternatively, hold the windows key on your keyboard and click x, then press r or click run, then type cmd and press enter or click ok.

curl https://raw.githubusercontent.com/painebenjamin/app.enfugue.ai/main/enfugue.bat -o enfugue.bat
.\enfugue.bat

Linux

curl https://raw.githubusercontent.com/painebenjamin/app.enfugue.ai/main/enfugue.sh -o enfugue.sh
chmod u+x enfugue.sh
./enfugue.sh

Both of these commands accept the same flags.

USAGE: enfugue.(bat|sh) [OPTIONS]
Options:
 --help                   Display this help message.
 --conda / --portable     Automatically set installation type (do not prompt.)
 --update / --no-update   Automatically apply or skip updates (do not prompt.)
 --mmpose / --no-mmpose   Automatically install or skip installing MMPose (do not prompt.)

Manual Installation

Portable Executable

  1. Navigate to the Releases page and download the latest release as .zip (Windows) or .tar.gz (MacOS & Linux).
  2. Extract the archive anywhere. See the releases page for details on extraction.
  3. Navigate to the archive folder and run the executable file - enfugue-server.exe for Windows, or enfugue.sh for Linux and MacOS. Some situations may require additional commands, see the releases page for more details.

On windows, you will now see the Enfugue icon in the bottom-right-hand corner of your screen. Click on this to exit the server when you wish. To enable TensorRT for Windows follow the steps under Windows TensorRT Support below.

Creating your Own Environment and Running from Command Line

This instruction assumes you are using a variant of Conda.

  1. Choose an environment in in the environments/ directory that corresponds to your platform and hardware.
    1. If you have a powerful next-generation Nvidia GPU (3000 series and better with at least 12 GB of VRAM), use tensorrt for all of the capabilities of cuda with the added ability to compile TensorRT engines.
    2. If you have any other Nvidia GPU or CUDA-capable device, or do not plan to use tensorrt, use cuda.
    3. If you are on a MacOS M1 or M2 device, use macos-mps. Other MacOS devices are not supported.
    4. Additional graphics APIs for AMD devices coming soon.
  2. Run the command conda env create -f <file_downloaded_above>
  3. Run the command conda activate enfugue
  4. Run the command enfugue run to run the server. Issue a keyboard interrupt (Ctrl+C) to stop it.

À la Carte

You can install enfugue into any other latent diffusion Python environment using pip install enfugue. If you are on Linux and want to install TensorRT support as well, use pip install enfugue[tensorrt]. If you are on Windows, this will not work, you will need to install the python packages from source as detailed below.

Addendum: Windows Nvidia TensorRT Support

In order to use Nvidia TensorRT on Windows, some additional steps must be taken. This is temporary (hopefully) as TensorRT support for Windows is very new. Update 2023-12-06: This message is now six months old, but this step is still required. It is expected that TensorRT release 9.0 will fix this.

You will be asked to add a number of directories to your PATH. On windows, the easiest way to reach it is:

  1. Open the start menu and begin typing "Environment". You will see an option that says "Edit the system environment variables," click this.
  2. In the bottom-right-hand corner of the System Properties window, click "Environment Variables."
  3. Under your user, click the "Path" variable and then click "Edit".
  4. Add a new entry pointing to the requested path.

Windows Configuration for Enabling TensorRT

Before downloading anything, you will need to make an account with Nvidia and Join the Nvidia Developer Program.

Once that is complete, download the following packages and install them anywhere to your system.

  1. Install CUDA, add /bin to PATH
  2. Install CUDNN, add /lib to PATH
  3. Install TensorRT, add /lib to PATH. If you are creating your own environment, you should also use pip to install python/tensorrt-8.*-cp310-none-win_amd64.whl from this directory.
  4. If you are creating your own environment, now run pip install enfugue[tensorrt]