FLUX.1-dev is an advanced model for generating high-quality images. This guide will walk you through the steps to install and run FLUX.1-dev on your Mac, ensuring you can start creating stunning visuals quickly.
Step 1: Prepare Your Mac
Before installing FLUX.1-dev, ensure that your system is up-to-date and that you have Python and pip installed. You’ll also need to install aria2
for downloading the model files.
- Update Your System: Open Terminal and run the following commands:
brew update
brew upgrade
- Install Python and pip: If Python and pip aren’t already installed, you can do so with:
brew install python3
- Install aria2: Use Homebrew to install
aria2
, a utility that will help you download FLUX.1-dev efficiently.
brew install aria2
Step 2: Clone the Stable Diffusion WebUI Repository
Next, you’ll need to clone the repository that includes FLUX.1-dev.
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge
cd stable-diffusion-webui-forge
This command will create a directory called stable-diffusion-webui-forge
and navigate into it.
Step 3: Download the FLUX.1-dev Model
With the repository cloned, you can now download the FLUX.1-dev model using aria2
.
aria2c -c -x 16 -s 16 -k 1M https://huggingface.co/lllyasviel/flux1_dev/resolve/main/flux1-dev-fp8.safetensors -d models/Stable-diffusion -o flux1-dev-fp8.safetensors
This command downloads the FLUX.1-dev model and saves it in the models/Stable-diffusion
directory.
Step 4: Configure the WebUI
Launch the WebUI by running:
./webui.sh --always-cpu --skip-torch-cuda-test
This command will start the WebUI .
The command ./webui.sh --always-cpu --skip-torch-cuda-test
is used to start the WebUI with specific options:
--always-cpu
: This option forces the WebUI to run on the CPU instead of the GPU. It is useful if your system doesn’t have a compatible GPU or if there are issues with GPU acceleration.--skip-torch-cuda-test
: This option skips the initial test that checks for CUDA compatibility with PyTorch. CUDA is a parallel computing platform and API model created by NVIDIA, which allows for using GPUs for general purpose processing. Skipping this test can be helpful if you know your system doesn’t have a compatible GPU or if you want to avoid errors related to CUDA, especially when running on a CPU.
In summary, this command ensures that the WebUI runs on the CPU without checking for GPU compatibility, which can help avoid errors related to GPU acceleration or CUDA.
Step 5: Generate an Image on WebUI Forge
After running the webui.sh
command, the WebUI will open in your browser, allowing you to generate images using the FLUX.1-dev model. Follow these steps to generate your first image:
- Select the UI Mode: In the WebUI, ensure you have selected the “flux” mode from the UI options. This option is marked as 1 in the screenshot.
- Choose the Checkpoint: Next, select the checkpoint for the model. For FLUX.1-dev, choose
flux1-dev-fp8.safetensors
from the checkpoint dropdown menu. This is indicated by 2 in the screenshot. - Enter a Prompt: In the prompt box, enter a description of the image you want to create. For best results, avoid using a negative prompt. The prompt section is highlighted as 3 in the screenshot.
- Generate the Image: Once you have entered your prompt, click the “Generate” button to create your image. This button is marked as 4 in the screenshot.
By following these steps, you can easily generate high-quality images using the FLUX.1-dev model on WebUI Forge. Enjoy exploring the creative possibilities!
Conclusion
By following these steps, you can successfully install and run FLUX.1-dev on your Mac. This setup allows you to explore the capabilities of FLUX.1-dev and produce high-quality images using Stable Diffusion. Whether you’re a developer, artist, or enthusiast, this guide provides the foundation you need to get started with FLUX.1-dev on macOS.
Note: If you encounter any issues during the installation, ensure that all dependencies are correctly installed and that your system meets the necessary requirements. For further customization or troubleshooting, refer to the official documentation of the tools and models you’re using.