{"id":986,"date":"2024-08-19T15:40:12","date_gmt":"2024-08-19T15:40:12","guid":{"rendered":"https:\/\/zahiralam.com\/blog\/?p=986"},"modified":"2024-10-24T12:04:15","modified_gmt":"2024-10-24T12:04:15","slug":"installing-flux-1-dev-on-mac-a-webui-forge-guide-for-image-creators","status":"publish","type":"post","link":"https:\/\/zahiralam.com\/blog\/installing-flux-1-dev-on-mac-a-webui-forge-guide-for-image-creators\/","title":{"rendered":"Installing FLUX.1-dev on Mac: A WebUI Forge Guide for Image Creators"},"content":{"rendered":"\n<p>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.\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Step 1: Prepare Your Mac<\/strong>\n\n\n\n<p>Before installing FLUX.1-dev, ensure that your system is up-to-date and that you have Python and pip installed. You&#8217;ll also need to install <code>aria2<\/code> for downloading the model files.\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Update Your System:<\/strong> Open Terminal and run the following commands:<\/li>\n<\/ol>\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-1\">brew update\nbrew upgrade<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#brew%20update%0Abrew%20upgrade\">\n                            <button class=\"copy-button\" data-label=\"brew update\nbrew upgrade\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li><strong>Install Python and pip:<\/strong> If Python and pip aren&#8217;t already installed, you can do so with:<\/li>\n<\/ol>\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-2\">brew install python3<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#brew%20install%20python3\">\n                            <button class=\"copy-button\" data-label=\"brew install python3\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li><strong>Install aria2:<\/strong> Use Homebrew to install <code>aria2<\/code>, a utility that will help you download FLUX.1-dev efficiently.<\/li>\n<\/ol>\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-3\">brew install aria2<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#brew%20install%20aria2\">\n                            <button class=\"copy-button\" data-label=\"brew install aria2\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Step 2: Clone the Stable Diffusion WebUI Repository<\/strong>\n\n\n\n<p>Next, you&#8217;ll need to clone the repository that includes FLUX.1-dev.\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-4\">git clone https:\/\/github.com\/lllyasviel\/stable-diffusion-webui-forge\ncd stable-diffusion-webui-forge<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#git%20clone%20https%3A%2F%2Fgithub.com%2Flllyasviel%2Fstable-diffusion-webui-forge%0Acd%20stable-diffusion-webui-forge\">\n                            <button class=\"copy-button\" data-label=\"git clone https:\/\/github.com\/lllyasviel\/stable-diffusion-webui-forge\ncd stable-diffusion-webui-forge\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<p>This command will create a directory called <code>stable-diffusion-webui-forge<\/code> and navigate into it.\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Step 3: Download the FLUX.1-dev Model<\/strong>\n\n\n\n<p>With the repository cloned, you can now download the FLUX.1-dev model using <code>aria2<\/code>.\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-5\">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<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#aria2c%20-c%20-x%2016%20-s%2016%20-k%201M%20https%3A%2F%2Fhuggingface.co%2Flllyasviel%2Fflux1_dev%2Fresolve%2Fmain%2Fflux1-dev-fp8.safetensors%20-d%20models%2FStable-diffusion%20-o%20flux1-dev-fp8.safetensors\">\n                            <button class=\"copy-button\" data-label=\"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\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<p>This command downloads the FLUX.1-dev model and saves it in the <code>models\/Stable-diffusion<\/code> directory.\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Step 4: Configure the WebUI<\/strong>\n\n\n\n<p>Launch the WebUI by running:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-6\">.\/webui.sh --always-cpu --skip-torch-cuda-test<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#.%2Fwebui.sh%20--always-cpu%20--skip-torch-cuda-test\">\n                            <button class=\"copy-button\" data-label=\".\/webui.sh --always-cpu --skip-torch-cuda-test\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<p>This command will start the WebUI .\n\n\n\n<p>The command&nbsp;<code>.\/webui.sh --always-cpu --skip-torch-cuda-test<\/code>&nbsp;is used to start the WebUI with specific options:\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><code>--always-cpu<\/code><\/strong>: This option forces the WebUI to run on the CPU instead of the GPU. It is useful if your system doesn&#8217;t have a compatible GPU or if there are issues with GPU acceleration.<\/li>\n\n\n\n<li><strong><code>--skip-torch-cuda-test<\/code><\/strong>: 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\u2019t have a compatible GPU or if you want to avoid errors related to CUDA, especially when running on a CPU.<\/li>\n<\/ol>\n\n\n\n<p>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.\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Step 5: Generate an Image on WebUI Forge<\/strong>\n\n\n\n<p>After running the&nbsp;<code>webui.sh<\/code>&nbsp;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:\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"3442\" height=\"1650\" src=\"https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/09\/image-5.png\" alt=\"Use Flux1-dev on Webui Forge\" class=\"wp-image-1079\" srcset=\"https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/09\/image-5.png 3442w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/09\/image-5-300x144.png 300w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/09\/image-5-1024x491.png 1024w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/09\/image-5-768x368.png 768w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/09\/image-5-1536x736.png 1536w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/09\/image-5-2048x982.png 2048w, https:\/\/zahiralam.com\/blog\/wp-content\/uploads\/2024\/09\/image-5-1800x863.png 1800w\" sizes=\"auto, (max-width: 3442px) 100vw, 3442px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Select the UI Mode<\/strong>: In the WebUI, ensure you have selected the &#8220;flux&#8221; mode from the UI options. This option is marked as&nbsp;<strong>1<\/strong>&nbsp;in the screenshot.<\/li>\n\n\n\n<li><strong>Choose the Checkpoint<\/strong>: Next, select the checkpoint for the model. For FLUX.1-dev, choose&nbsp;<code>flux1-dev-fp8.safetensors<\/code>&nbsp;from the checkpoint dropdown menu. This is indicated by&nbsp;<strong>2<\/strong>&nbsp;in the screenshot.<\/li>\n\n\n\n<li><strong>Enter a Prompt<\/strong>: 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&nbsp;<strong>3<\/strong>&nbsp;in the screenshot.<\/li>\n\n\n\n<li><strong>Generate the Image<\/strong>: Once you have entered your prompt, click the &#8220;Generate&#8221; button to create your image. This button is marked as&nbsp;<strong>4<\/strong>&nbsp;in the screenshot.<\/li>\n<\/ol>\n\n\n\n<p>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!\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">FLUX.1-dev Installation and Usage FAQ for Mac Users<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Basic Installation Questions<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Q: What is FLUX.1-dev?<\/h5>\n\n\n\n<p>A: FLUX.1-dev is an advanced AI model for generating high-quality images, specifically designed to work with Stable Diffusion WebUI Forge.\n\n\n\n<h5 class=\"wp-block-heading\">Q: Can I install FLUX.1-dev on my Mac?<\/h5>\n\n\n\n<p>A: Yes, FLUX.1-dev can be installed on various Mac systems including M1, M2, and M3 Macs, as well as Intel-based Macs running macOS.\n\n\n\n<h5 class=\"wp-block-heading\">Q: What are the basic requirements for installing FLUX.1-dev?<\/h5>\n\n\n\n<p>A: You need:\n\n\n\n<ul class=\"wp-block-list\">\n<li>Python and pip installed<\/li>\n\n\n\n<li>Homebrew package manager<\/li>\n\n\n\n<li>aria2 for downloading model files<\/li>\n\n\n\n<li>Sufficient storage space for model files<\/li>\n\n\n\n<li>An up-to-date macOS system<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">Q: How do I start the installation process?<\/h5>\n\n\n\n<p>A: The basic installation steps are:\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install required dependencies using Homebrew<\/li>\n\n\n\n<li>Clone the Stable Diffusion WebUI Forge repository<\/li>\n\n\n\n<li>Download the FLUX.1-dev model files<\/li>\n\n\n\n<li>Configure and launch the WebUI<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Model Files and Versions<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Q: Which model file should I download?<\/h5>\n\n\n\n<p>A: The main model files you might encounter are:\n\n\n\n<ul class=\"wp-block-list\">\n<li>flux1-dev-fp8.safetensors (recommended for most users)<\/li>\n\n\n\n<li>flux1-dev-bnb-nf4-v2.safetensors<\/li>\n\n\n\n<li>flux1-dev-bnb-nf4.safetensors<\/li>\n\n\n\n<li>flux1-dev.safetensors<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">Q: Where should I place the model files?<\/h5>\n\n\n\n<p>A: Model files should be placed in the <code>models\/Stable-diffusion<\/code> directory within your WebUI Forge installation.\n\n\n\n<h4 class=\"wp-block-heading\">WebUI and Forge Integration<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Q: What&#8217;s the difference between WebUI Forge and regular WebUI?<\/h5>\n\n\n\n<p>A: WebUI Forge is a specialized version of Stable Diffusion WebUI that&#8217;s optimized for FLUX.1-dev and includes specific features for this model.\n\n\n\n<h5 class=\"wp-block-heading\">Q: How do I start the WebUI after installation?<\/h5>\n\n\n\n<p>A: Use the command <code>.\/webui.sh --always-cpu --skip-torch-cuda-test<\/code> in Terminal from your installation directory.\n\n\n\n<h5 class=\"wp-block-heading\">Q: Can I use FLUX.1-dev with Automatic1111?<\/h5>\n\n\n\n<p>A: While FLUX.1-dev is primarily designed for WebUI Forge, it can be used with Automatic1111, though some features might not be available.\n\n\n\n<h4 class=\"wp-block-heading\">Performance and Hardware<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Q: Will FLUX.1-dev work on M1\/M2\/M3 Macs?<\/h5>\n\n\n\n<p>A: Yes, FLUX.1-dev is compatible with Apple Silicon Macs, including M1, M2, and M3 models.\n\n\n\n<h5 class=\"wp-block-heading\">Q: Do I need a GPU to run FLUX.1-dev?<\/h5>\n\n\n\n<p>A: No, FLUX.1-dev can run on CPU-only mode using the <code>--always-cpu<\/code> flag, though having a GPU will improve performance.\n\n\n\n<h4 class=\"wp-block-heading\">Troubleshooting<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Q: What should I do if WebUI won&#8217;t start?<\/h5>\n\n\n\n<p>A: Common solutions include:\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify all dependencies are installed correctly<\/li>\n\n\n\n<li>Ensure model files are in the correct directory<\/li>\n\n\n\n<li>Check Python version compatibility<\/li>\n\n\n\n<li>Use the <code>--skip-torch-cuda-test<\/code> flag if having GPU-related issues<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">Q: How do I handle negative prompts in FLUX.1-dev?<\/h5>\n\n\n\n<p>A: While FLUX.1-dev supports negative prompts through the Forge interface, it&#8217;s recommended to focus on positive prompting for optimal results.\n\n\n\n<h4 class=\"wp-block-heading\">Advanced Usage<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Q: Can I run FLUX.1-dev locally without internet?<\/h5>\n\n\n\n<p>A: Yes, once installed, FLUX.1-dev can run locally without requiring an internet connection.\n\n\n\n<h5 class=\"wp-block-heading\">Q: What are the optimal settings for FLUX.1-dev in Forge?<\/h5>\n\n\n\n<p>A: Optimal settings depend on your specific needs, but generally:\n\n\n\n<ul class=\"wp-block-list\">\n<li>Start with default settings in the &#8220;flux&#8221; UI mode<\/li>\n\n\n\n<li>Use the recommended sampling methods<\/li>\n\n\n\n<li>Adjust batch sizes based on your system&#8217;s capabilities<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Updates and Maintenance<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Q: How do I update FLUX.1-dev?<\/h5>\n\n\n\n<p>A: To update:\n\n\n\n<ol class=\"wp-block-list\">\n<li>Pull the latest changes from the WebUI Forge repository<\/li>\n\n\n\n<li>Download any new model files if available<\/li>\n\n\n\n<li>Update dependencies using Homebrew<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Q: How can I switch between different FLUX model versions?<\/h4>\n\n\n\n<p>A: You can switch between different model versions through the checkpoint dropdown menu in the WebUI interface.\n\n\n\n<h5 class=\"wp-block-heading\">Common Misunderstandings<\/h5>\n\n\n\n<h3 class=\"wp-block-heading\">Q: Is FLUX.1-dev the same as f.lux (the screen temperature app)?<\/h3>\n\n\n\n<p>A: No, these are completely different applications. FLUX.1-dev is an AI image generation model, while f.lux is a screen temperature adjustment tool.\n\n\n\n<h5 class=\"wp-block-heading\">Q: Do I need to install Forge separately from FLUX.1-dev?<\/h5>\n\n\n\n<p>A: No, Forge comes as part of the WebUI installation when you clone the repository. It&#8217;s an integrated environment for running FLUX.1-dev.\n\n\n\n<h4 class=\"wp-block-heading\">Additional Resources<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Q: Where can I learn more about FLUX.1-dev settings?<\/h5>\n\n\n\n<p>A: You can:\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the official documentation<\/li>\n\n\n\n<li>Join FLUX.1-dev community forums<\/li>\n\n\n\n<li>Follow development updates on the project&#8217;s repository<\/li>\n\n\n\n<li>Review the setup guide for detailed configuration options<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Conclusion<\/strong>\n\n\n\n<p>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&#8217;re a developer, artist, or enthusiast, this guide provides the foundation you need to get started with FLUX.1-dev on macOS.\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Note:<\/strong> 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&#8217;re using.\n","protected":false},"excerpt":{"rendered":"<p>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, [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":997,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[214],"tags":[228,17,38],"class_list":["post-986","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-installation","tag-flux-1","tag-mac-m1-m2-m3","tag-webui-forge"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts\/986","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/comments?post=986"}],"version-history":[{"count":11,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":1365,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts\/986\/revisions\/1365"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/media\/997"}],"wp:attachment":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/media?parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/categories?post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/tags?post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}