ComfyUI on Apple Silicon from Scratch — 2025
Install ComfyUI on a Apple Silicon MacBook Pro (M1, M2, M3, M4) and create AI-generated art using Flux and Stable Diffusion. No dev skills…
ComfyUI on Apple Silicon from Scratch — 2025

Created using Flux.1 Dev and Cute comic style (JoJo) LoRA
How to install ComfyUI on a Apple Silicon MacBook Pro, and start creating AI-generated art using Flux and Stable Diffusion. No dev skills required.
Tested on a M1 Max MacBook Pro with Python 3.12, using macOS Sonoma 14.1.2.
A common starting point for running Stable Diffusion locally is the AUTOMATIC1111 (a1111 for short) stable-diffusion-webui which provides a easy to understand web frontend.
a1111’s support for Apple Silicon has improved in the last year, and currently (Jan 2025) “most functionality in the web UI works correctly on macOS”. That said, the support for Apple Silicon is still questionable, with some features known not to be working.
Fortunately, there is an alternative: ComfyUI.
I’m not going to claim ComfyUI is “better” than a1111, or other alternatives such as Forge. They support the same models, and ultimately it’s those models that do the work.
That said, after a year of using ComfyUI’s graph/node/flowchart approach to building pipelines, I feel that it’s more flexible. It also appeals to my visual way of thinking.
Installing ComfyUI
From reading this to your first generated image in 90 minutes including tea (or coffee) breaks.
The following steps are an expansion on the ComfyUI install instructions for Apple Mac silicon. The steps are based on the instructions in January 2025, so please check for updates.
Open a Terminal Window
I’ve included this step because loads of folks reading this will are likely unfamiliar with the terminal commands and developer tools, and I want this guide to be inclusive.
The quickest way to get a terminal window is to open Spotlight (Command–Space bar), type “terminal” and press the enter key.
Install git
Git is a code management tool and we will use it to download the code for ComfyUI.
Copy the following command into the Terminal window. After copying the command, press the enter key to run the command:
git -v
If you don’t have git installed, you will be asked to install the command line developer tools.

Install pytorch nightly
PyTorch is a machine learning framework written in the Python programming language.
Install pytorch nightly using the instructions in the Accelerated PyTorch training on Mac Apple Developer guide:
pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
Install ComfyUI
This command downloads a copy of the ComfyUI code into a folder called ComfyUI, by default, this will be the root of your home folder.
Clone the ComfyUI git repo into the current folder:
git clone https://github.com/comfyanonymous/ComfyUI.git
Change to the ComfyUI folder:
cd ComfyUI
Install the python dependencies:
pip install -r requirements.txt
This downloads a bunch of other Python packages that ComfyUI needs in order to work.
Test ComfyUI runs
ComfyUI needs more configuration before it can generate an image but you can run it now to test it’s installed correctly.
python main.py
This is the log from my MacBookPro M1 Max 32GB:
% python main.py
Total VRAM 32768 MB, total RAM 32768 MB
pytorch version: 2.7.0.dev20250111
Set vram state to: SHARED
Device: mps
Using sub quadratic optimization for attention, if you have memory or speed issues try using: --use-split-cross-attention
****** User settings have been changed to be stored on the server instead of browser storage. ******
****** For multi-user setups add the --multi-user CLI argument to enable multiple user profiles. ******
[Prompt Server] web root: /Users/jasongriffin/ComfyUI/web
Import times for custom nodes:
0.0 seconds: /Users/jasongriffin/ComfyUI/custom_nodes/websocket_image_save.py
Starting server
To see the GUI go to: http://127.0.0.1:8188
You can checkout the UI in your browser at http://127.0.0.1:8188.

ComfyUI without the ComfyUI Manager installed, showing default workflow
Stop ComfyUI Running
You should now stop ComfyUI. You can do this by selecting the Terminal window and pressing Ctrl-C.
Install the ComfyUI Manager
ComfyUI-Manager is an extension designed to enhance the usability of ComfyUI. It offers management functions to install, remove, disable, and enable various custom nodes of ComfyUI.
Change to the ComfyUI/custom_nodes folder:
cd custom_nodes
Clone the ComfyUI-Manager git repo into the current folder:
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
This downloads a copy of the ComfyUI-Manager code into a folder called ComfyUI/custom_nodes/ComfyUI-Manager.
Run ComfyUI
ComfyUI still needs a model before it can generate an image but you can run it now.
Change back to the ComfyUI folder:
cd ..
Run ComfyUI:
python main.py --force-upcast-attention
The --force-upcast-attention extension helps black images, see the tips section for a explanation.
This is the log from my MacBookPro M1 Max 32GB:
[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2025-01-12 09:22:12.526272
** Platform: Darwin
** Python version: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 10:07:17) [Clang 14.0.6 ]
** Python executable: /opt/miniconda3/bin/python
** ComfyUI Path: /Users/jasongriffin/ComfyUI
** Log path: /Users/jasongriffin/ComfyUI/user/comfyui.log
Prestartup times for custom nodes:
0.8 seconds: /Users/jasongriffin/ComfyUI/custom_nodes/ComfyUI-Manager
Total VRAM 32768 MB, total RAM 32768 MB
pytorch version: 2.7.0.dev20250111
Set vram state to: SHARED
Device: mps
Using sub quadratic optimization for attention, if you have memory or speed issues try using: --use-split-cross-attention
[Prompt Server] web root: /Users/jasongriffin/ComfyUI/web
### Loading: ComfyUI-Manager (V3.3.13)
### ComfyUI Version: v0.3.10-40-gd0f3752 | Released on '2025-01-07'
Import times for custom nodes:
0.0 seconds: /Users/jasongriffin/ComfyUI/custom_nodes/websocket_image_save.py
0.1 seconds: /Users/jasongriffin/ComfyUI/custom_nodes/ComfyUI-Manager
Starting server
To see the GUI go to: http://127.0.0.1:8188
You can checkout the UI in your browser at http://127.0.0.1:8188 and should see Manager and Share buttons have been added to the console.

ComfyUI with the ComfyUI Manager installed, and the Manager buttons highlighted
Installing a Model
In simple terms, a model is a large dataset generated by analysing a collection of training images, each annotated with specific data points. These data points are single words or short phrases that act as a guideline for the model to understand the features of each training image.
Depending on its size and purpose, the model can consist of hundreds of thousands of data points through to tens of billions of data points.
This part is straightforward but the documentation is thin and the terminology can be confusing. Many of the example YouTube videos, and reddit threads, etc assume that you are using Windows. Many also assume you are migrating from a1111 to ComfyUI, and already have models downloaded.
Checkpoints
Checkpoint models are pre-trained models for generating a particular style image and/or size of image. The kind of images a model generates depends on the training images. A model won’t be able to generate an image of a cat if it wasn’t trained with cat images.
Download a Checkpoint Model from Civitai
In my opinion, Civitai is the single best platform from which to download models.
In it’s own words, “Civitai stands out as a thriving community where you can consistently discover new and intriguing models”.
I firmly subscribe to their mission, which is “rooted in the belief that AI resources should be accessible to all, not monopolized by a few”, and to “democratize AI media creation, making it a shared, inclusive, and empowering journey.”
There are 100s of checkpoint models on Civitai.
Below, I’ve included examples for five of the most popular checkpoint base models:
- Stable Diffusion 1.5 (SD1.5) — an older model that can efficiently generate small images up to 768px x 768px without a GPU (dedicated graphics processor)
- Stable Diffusion XL (SDXL 1.0) — an larger model that can efficiently generate larger images without a GPU. It has the good image-to-image prompting support.
- Pony Diffusion (PDXL) — is a fine-tuned SDXL model that understands human anatomy (the correct number of limbs, fingers, toes, etc), and animal anatomy better than SDXL; it also supports a wide range of art styles. Pony has poor image-to-image prompting support, compared to SDXL.
- Illustrious — is an illustration-focused SDXL model that supports a wide range of art styles, and offers slightly better image-to-image support, compared to Pony.
- Flux.1 Dev — a newer and much larger model that has a good understanding of human anatomy, and that can generate images with accurate (English) text. Flux.1 Dev has good image-to-image prompting support.
SD 1.5 Workflow
Dreamshaper 8 — SD 1.5 Checkpoint Model
The DreamShaper 8 checkpoint, is the most downloaded SD 1.5 checkpoint model on civitai.

Civitai Dreamshaper 8 model page
Note that Civitai tags checkpoint models as “checkpoint” in the search results, and as “Type: checkpoint trained” on the model page.
- Go to the DreamShaper 8 checkpoint model page
- Click the download button (highlighted in the image below) to download the model

Civitai Dreamshaper 8 model page with the download button highlighted in yellow
Update the Workflow to use the Model
When the checkpoint file has downloaded, move it to ComfyUI/models/checkpoints. You can do this in Finder.

ComfyUI checkpoints folder
I arrange my models in subfolders but it is not necessary.
Next, you need to refresh the model library, so that you can use the model.
- Click on the model library icon, or press ‘m’, to open the library
- Then click on the Refresh icon

ComfyUI with the Model Library open and the Refresh button highlighted in yellow
Next, you need to update the workflow, to use the model.
There are two ways to do this:
- Locate the Load Checkpoint node (righthand side of the workflow), click on the ckpt_name field and select
dreamshaper_8.safetensors - Clicking on the model name in the Model Library will add a new Load Checkpoint node to the workflow that loads that model.
If you are new to ComfyUI, then I suggest you use this as an oppotunity to learn how to connect nodes.
- Remove the existing Load Checkpoint node
- Locate the existing Load Checkpoint node
- Click on it, to highlight it
- Press ‘delete’ to remove it

ComfyUI with the Model Library open and the original Load Checkpoint node removed
2. Add a new Load Checkpoint node to load the dreamshaper_8 model
- Click on the model name (dreamshaper_8) in the Model Library, this will add a new Load Checkpoint node to the workflow
Note: the node is added behind the other nodes, so you may need to look for it. This is a bug in the UI (Jan 2025).
3. Drag the new Load Checkpoint node to the top righthand corner of the workflow
You place the node anywhere you want, but placing it where I suggest will make it easier to see the connections you make.
4. Connect the MODEL output on the Load Checkpoint node to the model input on the KSampler node
- Click on the MODEL output on the Load Checkpoint node
- Drag a connection to the model input on the KSampler node
- Release the mouse button to create the connection
You only need to drag the connection over the node, ComfyUI will snap it to the correct input.
ComfyUI will also prevent you from connecting to a node that doesn’t accept MODEL as an input.
5. Connect the CLIP output on the Load Checkpoint node to the clip inputs on each of the CLIP Text Encode (Prompt) node
An output can be connected to multiple input, but an input can only be connected to one output. Making a new connection to an input removes the existing connection.
6. Try to run the workflow
- Click the ‘Queue’ button at the bottom of the UI
ComfyUI pops up an error message to indicate that the VAE Decode node is missing a required input.
ComfyUI also highights the node, and the missing input in red.
- Close the error message

ComfyUI with the Model Library open and the workflow showing an error because VAE Decode node is missing a required input. The Queue button is highlighted in yellow
7. Connect the VAE output on the Load Checkpoint node to the vae input on the VAE Decode node
The VAE Decode node, and it’s vae input will remain highlighted in red until the workflow is run again
Generate Your First Image
You’re now ready to create your first image!
- Click the ‘Queue’ button at the bottom of the UI, to run the workflow again
You should see each node highlighted in turn, starting with the Load Checkpoint node and ending with the Save Image node.
On M1 Max MacBook Pro, the workflow takes around 9 seconds to complete.

ComfyUI showing the rusult of a successful workflow using the SD 1.5 Dreamshaper 8 checkpoint model. The Queue button is highlighted in yellow
Congratulations!
Review Your Image
You can see the results of all of the workflows you have run by clicking on the Queue icon, or pressing ‘q’.
The results are shown as a list of thumbnails, with the most recently completed workflow at the top.
Note: the list is reset each time ComfyUI is restarted.

ComfyUI with the Queue open showing the result of one successfully completed workflow
You can view the fullsize image by clicking the icon in the middle of the thumbnail.

ComfyUI with the Queue open showing the fullsize image generated by the workflow
You can save the image from you browser.
You can also find it in your ComfyUI/ouput folder.

“beautiful scenery nature glass bottle landscape, purple galaxy bottle” image generated using the Dreamshaper 8 SD 1.5 checkpoint model
Generate Some More
The default workflow uses a random seed, which means that you will get a different result each time you run the workflow.

ComfyUI with the Queue open showing the result of three successfully completed workflows. The KSampler node seed and control_after_generated inputs are highlighted in yellow
Next Steps
Now you’ve created a few different images, and seen the effect of changing seed value, let’s look at some of the other knobs and levers you can use to shape the images you generate.
The AI is like a child prodigy. A gifted artist, certainly, but one with a patchy education, and no lived experience to shape it’s work
More Art Than Engineering
I understand a lot of the science behind diffusion models but tweaking the controls is an art more than engineering. Twiddling this knob. Nudging that lever. Until you get something that looks close-enough. It feels distinctly analogue, like something from an old school Sci-Fi movie.
Before doing anything else, I recommend you set a fixed value for the seed. Otherwise, it will be difficult for you to see the effects changing the other parameters have.
I’m going to set mine to: 1025838258.
Personally, I prefer a seed value with 10 digits or less. I find anything larger difficult to visualise.
- Change the control_after_generate value to fixed
- Change the seed value to a number of your choice
- Remember to click OK

ComfyUI with a close-up on the KSampler node showing the seed value being edited. The control_after_generate value is set to fixed and highlighted in yellow
Prompt Text
Changing the seed results in an image that looks as if it was taken if a studio, with the bottle on a wooden surface and a graduated plain background.
You may have noticed that there is an “ ,” (extra space and comma) after the “landscape,” in the prompt. This is a commonly trick used to make a small change to a generated image.
Removing the extra space and comma changes the bottle stopper and the wooden surface the bottle is standing on.
Replacing “purple” with “green” changes the contents of the bottle from a galaxy to a green landscape. This is likely because “green” is more closely associated with the “scenery nature … landscape” parts of the prompt than with the “galaxy” part of the prompt.

The result of making small changes to the prompt: removing an extra space and comma (centre), changing “purple” to “green” (right)
The image still looks like a product photo. A bottle photographed in a studio, in front of a neutral background.
How about we change that, and generate a pencil sketch of a purple galaxy in a bottle, instead.

Prompt: drawing of beautiful scenery nature glass bottlelandscape, purple galaxy bottle, sketch on paper
The “drawing” and “sketch on paper” parts of the prompt has resulted in the bottle standing on what appears to be paper with lines drawn on in. However, the bottle still itself still looks like a photo.
CFG Scale and Sampler Steps
The AI is like a child prodigy. A gifted artist, certainly, but one with a patchy education, and no lived experience to shape it’s work.
Every checkpoint model has a different understanding of the world, and places subtly different meanings on the words you use in your prompts.
Give the AI a short prompt that closely matches it’s training data, and it will produce awesome results. Ask it to generate a scene it’s had little or no training on, and no matter how detailed the prompt is, it’s like you are talking a foreign language to it.
If the model does understand how to generate a pencil sketch of the bottle, then we should be able to coerce it to do so by increasing the number of sampler steps, and increasing the CFG scale.
The sampler steps are the number of iterations the AI uses to generate the image, and CFG scale is how loosely the AI follows the positive and negative prompts during the image generation process.
The challenge is that both values are relative to the model, and to the prompt. Set them too low, and the image will lack detail. Set them too high, and the image will look ‘overcooked’.
Increasing the number of steps from 20 to 40 adds extra detail to the paper, and changes the contents of the bottle to be a galaxy.
Increasing the number of steps from 40 to 60 doesn’t further improve the image, and bottle still looks like a photo.

The effect of increasing the number of sampler steps to 40 (centre), and 60 (right)
Increasing the CFG scale value definitely makes the image look more sketch-like, but the contents is of the bottle is definitely not a galaxy, and the bottle itself remains stubbornly photo-like.

The effect of increasing the CFG scale from 10.0 (left), to 12.0 (centre), and 14.0 (right)
Sampler and Scheduler
You can also change the sampler and scheduler algorithms. It is the sampler that generates a new image (a sample) after each step.
The ComfyUI KSampler node offers a choice of 25 samplers, and 9 schedulers. Though not all combinations work together, with some samplers requiring a specific scheduler.
The default workflow uses the Euler scheduler with the normal scheduler.
I’ve added two other popular samplers: Euler Ancestral with the normal scheduler, and DPM++ 2M with the Karras scheduler. Both are fast, and produce high quality results.
In my opinion, the Euler Ancestral sampler generates the most aesthetically pleasing result, but the bottle still looks like photo.

The result of changing the sampler and scheduler: Euler Ancestral with the normal scheduler (centre), and DPM++ 2M with the Karras scheduler (right)
LoRAs
Lastly, LoRAs are small models that extend the checkpoint model with the knowledge of the likeness of an object, the likeness of a person, or an art style.
It’s a good idea to try and achieve the image you want using just the checkpoint model, first. LoRAs take up additional memory. They can also have unwanted side effects, and should be used sparingly.
Since the Dreamshaper 8 checkpoint struggles to generate a sketch of a bottle, I’m going to use a LoRA called Old Sketch — Style to help get the result I’m looking for.
- Download the LoRA from civitai
- Use Finder to move it to
ComfyUI/models/loras - Open this Model Library in ComfyUI
- Click the refresh icon to update the library
- Click on the loras, and find and click on Minute_Sketch_v2. This will add a new node to the workflow
- Move the Load Checkpoint node to the left, so that there is some space between the Load Checkpoint node and the CLIP Text Encode (Prompt) nodes
- Find the newly added Load LoRA node, and drag it into the space between Load Checkpoint node and the CLIP Text Encode (Prompt) nodes
- Connect the MODEL and CLIP outputs on the Load Checkpoint node to the model and clip inputs on the Load LoRA node
- Connect the MODEL output on the Load LoRA node to the model input on the KSampler node
- Connect the CLIP output on the Load LoRA node to the clip inputs on the two CLIP Text Encode (Prompt) nodes

ComfyUI with the Model Library open and the new Load LoRA node connected and highlighted in yellow
Now go ahead and generate a new image!
I’ve found that the following KSampler settings produce an image that I like.

ComfyUI with a close-up on the KSampler node showing my suggested values

“drawing of beautiful scenery nature glass bottle landscape, purple galaxy bottle, sketch on paper” image generated using the Dreamshaper 8 SD 1.5 checkpoint model
SDXL, Pony and Illustrious Workflows
The SDXL base model has 3 times as many parameters as the SD 1.5 base model, and uses 2 text encoders (CLIP models) compared to the single CLIP model used for SD 1.5.
You can use the same workflow as SD 1.5, but to benefit from the improved quality of theses larger models you need to use CLIPTextEncodeSDXL nodes for the prompts.
So far we’ve only used the core nodes that come with ComfyUI. This workflow uses a few custom nodes to help reduce the typing you need to do when changing between landscape, portrait and square aspect ratios.
One of the strengths of ComfyUI is that it’s straightforward to add custom nodes using the ComfyUI Manager.
1. Open the Manager
- Click the Manager button at the top right of the window.
2. Open the Custom Nodes Manager
- Next, click the Custom Nodes Manager button on the Manager menu

ComfyUI Manager with the Custom Nodes Manager button highlighted in yellow
3. Search for the ComfyUI-Easy-Use nodes
- Type “easy” in the search box
- Locate the “ComfyUI-Easy-Use” nodes
- Click the Install button
4. Select the lastest version
- Choose “latest” or the highest numbered version. The lastest version is 1.2.6 (Jan 2025)
- Click the Select button

ComfyUI Custom Nodes Manager installing version 1.2.6 of ComfyUI-Easy-Use custom nodes
5. Restart ComfyUI
- Follow the instructions to restart ComfyUI
- Once the UI has reconnected, close the Manager
6. Download Juggernaut XL checkpoint model
I suggest you start with the Juggernaut XL checkpoint model. It’s the most downloaded version of Pony XL on Civitai, and has a comprehensive prompting guide.
- Download the XI version of Juggernaut XL
- Use Finder to move the downloaded file to
ComfyUI/models/checkpoints
Note: the workflow expects to find ComfyUI/models/checkpoints/sdxl/juggernautXL_juggXIByRundiffusion.safetensors, but you can change this by editing the workflow.
7. Refresh the browser once ComfyUI has restarted
You need to refresh the browser as the UI does not automatically load the new nodes
8. Load the SDXL workflow
- Download sdxl-comfyui-easy-workflow.json from my GitHub repo

GitHub — sdxl-comfyui-easy-workflow.json with download button highlighted in yellow
- Press Ctrl + O to open the file you just downloaded
9. Run the workflow

ComfyUI — SDXL Workflow
Congratulations! You’ve just created an image with a different based model, and using custom nodes!

“beautiful scenery nature glass bottle landscape, purple galaxy bottle” image generated using the Juggernaut XL SDXL checkpoint model
The images produced by this workflow are 4x larger than those produced by the SD 1.5 workflow, and take around 6x longer. My M1 Max, it takes around 80 seconds to generate the first image, and around 60 seconds for subsequent images.
Next Steps
You can use the same workflow to generate images using any SDXL, Pony XL, or Illustrious base models.
Flux.1 Workflow
If you are interested in using Flux.1 Dev model instead of Stable Diffusion, then I recommend reading my Flux + ComfyUI on Apple Silicon guide first.
The Flux.1 Dev model has 4 times as many parameters as the SDXL base model, requires more than 12GB VRAM, and barely runs on a my M1 Max MacBook Pro with 32GB shared memory.
There is a Flux.1 Schell model which is less memory intensive, but also produces different quality results to the Dev model.
My suggestion is to use a GGUF Quantized Flux Models. The Q8 GGUF model provides image outputs 99% identical to the full Flux.1 Dev model, while requiring almost half the VRAM.
However, I prefer the smaller Q4.1 GGUF model, it’s image outputs are 92% identical to the full Flux.1 Dev model, and it requires only 60% of the memory of the Q8 GGUF model.
1. Download the Flux.1 Dev GGUF checkpoint model
- Download the Q4.1 version of Flux.1 Dev GGUF
- Use Finder to move the downloaded file to
ComfyUI/models/unet/flux
2. Download the Flux text encoders
Similar to SDXL, Flux.1 Dev uses two CLIP models.
- Download clip_l.safetensors
- Download t5xxl_fp8_e4m3fn.safetensors
- Use Finder to move the downloaded files to
ComfyUI/models/clip
3. Download the Flux VAE
Black Forest Labs currently (Jan 2025) require you to provide contact details and accept their terms and conditions before downloading their models.
- Download ae.safetensors
- Use Finder to move the downloaded file to
ComfyUI/models/vae/flux
4. Load the Flux GGUF workflow
- Download flux-gguf-basic-workflow.json from the GitHub repo

GitHub — flux-gguf-basic-workflow.json with download button highlighted in yellow
- Press Ctrl + O to open the file you just downloaded
5. Install the missing nodes
- If you don’t already have the ComfyUI-GGUF custom nodes installed, then ComfyUI will warn you that you need to install custom nodes in order to use the workflow.

ComfyUI with Missing Node Types warning
- Click the Manager button at the top right of the window.
- Next, click the Install Missing Custom Nodes button on the Manager menu

ComfyUI Manager with the Install Missing Custom Nodes button highlighted in yellow
- Click the Install button to install the missing nodes

ComfyUI Manager showing the missing ComfyUI-GGUF custom nodes that need to be installed
6. Refresh the browser once ComfyUI has restarted
You need to refresh the browser as the UI does not automatically load the new nodes.
7. Run the workflow
The Flux.1 model takes a considerable about of computing power, about 10x the amount required to run the SDXL model.

ComfyUI — Flux.1 Dev GGUF workflow
Congratulations! You’ve now created images using three different base models.

“drawing of beautiful scenery nature glass bottle landscape, purple galaxy bottle, sketch on paper” image generated using the Flux.1 Dev GGUF checkpoint model
Tips
Random Black Images
I’ve noticed an increase in SD 1.5, SDXL, Pony, and Illustrious workflows generating black images.
For me, this started in late 2024 and appears to be random — running the same workflow, unchanged, will work despite failing moments before.
This the error message I currently get (Jan 2025):
/Users/jasongriffin/ComfyUI/nodes.py:1602: RuntimeWarning: invalid value
encountered in cast
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))

The issue can be easily fixed by adding --force-upcast-attention when starting ComfyUI:
python main.py --force-upcast-attention
Reducing Generation Time with TeaCache
How long does it take to generate an image? This is by far the question I get asked the most about generating images on Apple Silicon.
It’s slow. Bearably slow (50–80 seconds) for SDXL, Pony, and Illustrious model. Painfully slow (10–15 minutes) for Flux.1 models.
Timestep Embedding Aware Cache (TeaCache) offers a way to reduce those time by 50% — 100%. The caching is not lossless. You will notice a difference between an image generated with TeaCache, and one generated without.
There is a flux-gguf-basic-workflow-with-teacache.json in the GitHub repo that demonstrates how to use the ComfyUI-TeaCache custom nodes.

The result of adding TeaCache to the Flux.1 Dev GGUF workflow: No cache (left), TeaCache with threshold set to 0.25 (centre), and TeaCache with threshold set to 0.4 (right)
Freeing Memory to Avoid Crashes
To speed up execution, ComfyUI caches models, it also caches workflows so that only those parts that have changed need to be run again.
These caches can get huge, 15GB in the example below, and ComfyUI is sluggish about releasing them.
Deleting tasks from the task queue doesn’t free up the execution cache, and overtime the caches can grow to the point that it causes your Mac to freeze, or crash.
There are two vacuum buttons next to the Manager button:
- The first button frees just the model cache.
- The second button frees the model cache and the execution (node) cache.

ComfyUI — Unload Models button (highlighted in blue), and Free model and node cache button (highlighted in green)
The memory graph below show the effects of freeing the caches after running 20 Flux.1 workflows.
Before clearing the caches, the memory used was over 29GB.
Unloading just the models released around 7GB.
Freeing the execution cache released about another 10GB.

The effects of freeing the model ComfyUI model cache (highlighted in blue), and the execution cache (highlighted in green)
Install the ONNX Runtime for Apple Silicon
DWPose is an alternative to OpenPose.
The DWPose Estimator node that comes with the ComfyUI’s ControlNet Auxiliary Preprocessors uses ONNX Runtime, which is another runtime accelerator for machine learning models.
If you are going to use DWPose for body pose estimation for ControlNet, then I recommend you install the official ONNX Runtime.
pip install onnxruntime
Now when the DWPose Estimator node is loaded, you should see a message in the terminal window confirming a provider with acceleration was detected:
[comfyui_controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider', 'CoreMLExecutionProvider']
DWPose: Onnxruntime with acceleration providers detected
For comparison, this is output for a 512x768 image containing a single person (M1 Max, Python 3.12, Sonoma 14.1.2) using the ONNX Runtime for Apple Silicon:
DWPose: Bbox 436.91ms
DWPose: Pose 383.29ms on 1 people
And this is the output for the same image without the CoreML acceleration:
DWPose: Bbox 2028.65ms
DWPose: Pose 459.95ms on 1 people
Keep Your Python SSL Certificates up to date
You may see errors in the Terminal window after installing a custom node using the ComfyUI Manager.
Cannot connect to host raw.githubusercontent.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')]
The preferred solution is to upgrade the Python certifi package.
You can do this using the following command:
pip install --upgrade certifi
It is possible that the above command will fail with a “Invalid requirement: ‘–-upgrade’” error.
If you get this error, then use the following commands:
pip3 uninstall certifi
pip3 install certifi
You need to restart ComfyUI for the update to take effect.
If you still see the SSLCertVerificationError messages after restarting ComfyUI, then the recommended solution is to disable the SSL check in the ComfyUI Manager.
You can do this by editing theComfyUI/custom_nodes/ComfyUI-Manager/config.ini file. You can edit the file using TextEdit.
Setting bypass_ssl = True disables the SSL check.
The config.ini file should be automatically generated when you change any option in the Manager menu. If it’s missing then a good way to create it is to change the Badge from None to Nickname.

This is my config.ini file with bypass_ssl = True:
[default]
preview_method = none
badge_mode = nick
git_exe =
channel_url = https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main
share_option = all
bypass_ssl = True
default_ui = none
Restart ComfyUI and the issues should be resolved.
메타데이터
- post_id
- 9facb41c842f
- slug
- comfyui-on-apple-silicon-from-scratch-2025-9facb41c842f
- url
- https://medium.com/@tchpnk/comfyui-on-apple-silicon-from-scratch-2025-9facb41c842f
- canonical_url
- https://medium.com/@tchpnk/comfyui-on-apple-silicon-from-scratch-2025-9facb41c842f
- author_url
- https://medium.com/@tchpnk
- status
- ok
- fetched_at
- 2026-07-21 05:35:08