← all conversations

AI image generator setup

2025-10-098 turns14,607 charsgpt-5, gpt-5-t-mini
comfyui-setupai-image-generationmac-optimization

Summary

User seeks guidance on installing and configuring ComfyUI with high-quality AI image generation workflows optimized for an M4Pro MacBook with 48GB unified memory.

Messages

I want to install the best AI image generator in ComfyUI I just want to make images. I want it to be as high quality as possible but I also want it to run quickly. I have a M4Pro Macbook with 48GB unified memory, help me set this up, direct me to a good guide on how to do so or if you know you can tell me yourself
⚙ model reasoning step
gpt-5-t-mini
⚙ model reasoning step
gpt-5-t-mini
⚙ model reasoning step
gpt-5-t-mini
⚙ model reasoning step
gpt-5-t-mini
Nice — M4 Pro with 48 GB unified memory is a great laptop for local image generation. Below I’ll give you a short recommendation (best tradeoffs), then an explicit, copy-pasteable setup you can follow (two flavors: fastest/easiest and manual/custom), plus tips for models, speed vs quality tradeoffs, and a few extra knobs (upsampling, ControlNet, quantization). I checked the current Apple/Hugging Face/ComfyUI ecosystem and link the authoritative guides below so you can dive deeper. ## Quick recommendation (summary) - **If you want fastest, easiest, highest-perceived quality on Apple Silicon:** install **ComfyUI Desktop** (macOS build) and add the **ComfyUI-CoreMLSuite** custom nodes, then use **Core ML / ANE-converted SDXL (quantized)** models. This uses Apple’s Core ML / ANE acceleration for big speedups on M-series chips. citeturn0search8turn1search0 - **If you want to tinker / need manual control:** install ComfyUI from GitHub in a Python venv and convert/load models yourself with Apple’s `ml-stable-diffusion` tools (or use preconverted Core ML models from Hugging Face). Use PyTorch MPS backend only if a Core ML conversion is not available, but Core ML + ANE tends to be faster and more power-efficient on Apple Silicon. citeturn0search2turn0search3turn0search16 --- ## Why Core ML + ComfyUI-CoreMLSuite? Apple + Hugging Face provide tooling to convert SD / SDXL to Core ML and run efficiently on the **Apple Neural Engine (ANE)** and GPU. ComfyUI has community nodes (CoreMLSuite) that let ComfyUI call those `.mlmodelc`/`.mlpackage` models directly so you get ANE acceleration inside ComfyUI flows. That combination gives best speed/quality on M-series Macs. citeturn0search2turn1search0 --- ## Option A — Fastest / Easiest (recommended) 1. Download and run **ComfyUI Desktop (macOS)** (the macOS desktop build automates Python environment & config). - ComfyUI Desktop page / docs. citeturn0search8 2. Inside ComfyUI, open **ComfyUI Manager** → search for and install **ComfyUI-CoreMLSuite** (or clone the repo into `ComfyUI/custom_nodes`). This adds nodes that can load Core ML UNet/VAEs/ControlNet, etc. citeturn1search0turn1search9 3. Get a Core ML converted **SDXL** model (recommended for top quality). Options: - Use preconverted Core ML SDXL builds shared on Hugging Face / community model repos (search "sdxl coreml mlmodelc" on Hugging Face). citeturn0search15turn0search3 - Or convert a PyTorch checkpoint yourself with Apple’s `ml-stable-diffusion` tooling (below I show the repo). citeturn0search2 4. Put the converted model (the `.mlmodelc` or `.mlpackage` folder) into the CoreML model folder your CoreML nodes expect (usually `ComfyUI/custom_nodes/ComfyUI-CoreMLSuite/models/` or follow the CoreMLSuite README). citeturn1search0 5. Start ComfyUI Desktop, create a simple SDXL workflow, and select the Core ML UNet/VAEs from the new nodes (the CoreML nodes will expose options to pick compute units such as `CPU_AND_ANE` etc.). Use ANE/CPU_AND_ANE compute if available. citeturn1search4 6. Recommended runtime settings for best speed/quality on M4 Pro: - Resolution: start 1024×1024 or 1536×1024 for SDXL; 512×512 for testing. - Steps: 20–30 (SDXL can look great at ~20 with a good sampler). - Batch size: 1. - Sampler: Euler a / DPM++ (experiment). - Use Core ML quantized versions (6-bit/8-bit) if available for big speedups with minor quality drop. citeturn0search15 --- ## Option B — Manual install (full control) If you prefer to manually install ComfyUI and manage Python, here are copy-paste commands and steps (tested workflow used widely for Apple Silicon): ```bash # 1) Install Homebrew (if you don't have it) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # 2) Install Python 3.11+ (or use system Python) brew install python@3.11 # 3) Create a virtualenv and activate it python3 -m venv ~/comfyui-venv source ~/comfyui-venv/bin/activate # 4) Clone ComfyUI and install requirements git clone https://github.com/comfyanonymous/ComfyUI.git ~/ComfyUI cd ~/ComfyUI pip install --upgrade pip # Install PyTorch with mps support if you plan to use MPS (optional; coreml is faster) pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu # 5) Install ComfyUI Python deps pip install -r requirements.txt # 6) (Optional) Install custom nodes: CoreML Suite cd ~/ComfyUI/custom_nodes git clone https://github.com/aszc-dev/ComfyUI-CoreMLSuite.git # 7) Run ComfyUI cd ~/ComfyUI python main.py ``` Notes: - The above PyTorch install line is template — check PyTorch docs for the recommended wheel for macOS M-series MPS support. If you will use Core ML models, PyTorch/MPS is less critical because Core ML nodes call Apple’s runtime. citeturn0search16turn1search9 --- ## Converting or obtaining Core ML SDXL models - **Convert yourself**: Apple’s `ml-stable-diffusion` repo contains the conversion pipeline and instructions (converts Hugging Face diffusers / PyTorch checkpoints → Core ML). Follow that if you want the most control and to quantize. citeturn0search2turn0search3 - **Use preconverted models**: many community Core ML models (including quantized SDXL subsets) are published on Hugging Face and community repos — this is faster if you don’t want to convert. Hugging Face docs include a Core ML optimization guide. citeturn0search15turn0search3 --- ## Model choice: SDXL vs SD1.5 vs lightweight - **SDXL** = best quality for photography, composition, details (recommended on your hardware for final images). It’s large, but with Core ML + ANE it runs well on M-series. citeturn0search6turn0search15 - **SD 1.5 / split-einsum** = smaller and faster; split-einsum variants are highlighted as especially Apple-friendly in community writeups — good if you want faster iterations. citeturn0search9 --- ## Upscalers & finishing - Use ComfyUI custom nodes like **Impact-Pack** and built-in upscalers (Real-ESRGAN or GFPGAN style) for high quality upscaling and face restoration. Many of these have optimized implementations or Core ML alternatives. citeturn1search6 --- ## Practical tips for speed & low latency - Use **Core ML quantized models** (6-bit or 8-bit palettization) when possible — big speed/memory win, small visual hit. Hugging Face + Apple Core ML guide covers quantization + palettization. citeturn0search15turn0search3 - Use **ANE** (Apple Neural Engine) as compute unit if the Core ML node exposes it (`CPU_AND_ANE`). ANE boosts throughput for many models. citeturn1search0 - For experimentation, use lower resolution and fewer steps; for final renders bump resolution/steps. Keep batch size 1 to reduce VRAM pressure. - Keep ComfyUI and custom nodes updated — community nodes land performance and compatibility fixes often. Use ComfyUI Manager for easy updates. citeturn1search9 --- ## Useful links (start here) - ComfyUI official repo & docs (desktop macOS instructions). citeturn1search10turn0search8 - ComfyUI-CoreMLSuite GitHub (custom Core ML nodes + install/readme). citeturn1search0 - Apple / Hugging Face Core ML Stable Diffusion tooling (convert PyTorch → Core ML). citeturn0search2turn0search3 - Hugging Face blog about SDXL + Core ML optimization. citeturn0search15 - PyTorch Metal/MPS docs (if you use PyTorch MPS fallback). citeturn0search16 --- ## Final notes & offer - Because your machine is M4 **Pro** with **48GB unified memory**, you’ll get **really good** throughput with SDXL Core ML models and ANE. Start with ComfyUI Desktop + CoreMLSuite and a preconverted SDXL mlmodelc — that’s the shortest path to fast, high-quality images. citeturn0search8turn1search0 If you want, I can: - paste a ready-to-run shell script for the manual install adjusted to your macOS version, or - walk you through converting an SDXL checkpoint to Core ML (I’ll give the exact `git` + `python` commands and the minimal conversion flags) — tell me which model checkpoint you want to convert (e.g., SDXL-base from Hugging Face) and I’ll produce the commands and where to drop the resulting `.mlmodelc` for ComfyUI-CoreMLSuite. Which of those would you like right now?
gpt-5-t-mini
I have comfyui installed all I need now are workflows and links to download the needed files
Cool — here are some solid collections of **workflows** you can import into ComfyUI + the **model / node files / links** you’ll need to drop into the appropriate folders. I’ll also give you a “starter workflow” you can paste in (JSON) to try it out immediately. --- ## ✅ Workflow repositories & examples to grab These are collections of JSON workflows you can drop (or load) into ComfyUI to see working pipelines and to tweak: | Repo / Source | Description / what’s inside | How to use | |---|---|---| | **cubiq / ComfyUI_Workflows** | A set of well-documented “beginner → intermediate” workflows in JSON. citeturn0search0 | Clone/download; put JSON files into `ComfyUI/input/` (or drag into the canvas) citeturn0search0 | | **comfyanonymous / ComfyUI_examples** | “What is achievable” examples — images embed workflow metadata so you can load them by dragging into UI. citeturn0search2 | Download or drag image/JSON into ComfyUI to load workflows citeturn0search2turn0search18 | | **Comfy-Org / example_workflows** | Official example workflows for ComfyUI. citeturn1search30 | Browse the repo, drag the JSON / assets into your ComfyUI canvas citeturn1search30 | | **sepro / SDXL-ComfyUI-workflows** | SDXL-specific workflows (dual ControlNet, refiner, etc.). citeturn1search19 | Use those for SDXL pipelines; drop the `.json` files into your workflow folder | | **aimpowerment / comfyui-workflows** | A general collection of ComfyUI workflow JSONs. citeturn1search3 | Look through and pick ones you want, import into ComfyUI | | **Comfy-Org / workflow_templates** | The template workflows that come with ComfyUI / custom node integrations. citeturn1search13 | Use these as starting points / load via the “Browse Workflow Templates” UI in ComfyUI citeturn0search13 | You can also see workflows via in-UI: ComfyUI has a **Workflow Templates** browser (`Workflow → Browse Workflow Templates`) that includes built-in and custom node examples. citeturn0search13 --- ## 🛒 Models, node files, and “needed files” you should get / place To make those workflows work (especially ones using Core ML / SDXL / advanced custom nodes), you need: - **ComfyUI-CoreMLSuite custom nodes** — lets you load Core ML models inside ComfyUI. citeturn0search3turn1search11turn1search21 - **Core ML / mlmodelc / mlpackage versions** of SDXL / LCM / other models - **Diffusion checkpoints / safetensors** for workflows that still use standard models - Any **ControlNet**, **LoRA**, **VAE**, **clip_vision** models referenced in the workflows Some model sources / pointers: | Model / Node | Where / link / pointer | Placement path (inside ComfyUI) | |---|---|---| | Apple’s **Core ML Stable Diffusion XL base** | On Hugging Face: `apple/coreml-stable-diffusion-xl-base` citeturn0search5 | Into `ComfyUI/custom_nodes/ComfyUI-CoreMLSuite/models/` or where CoreML nodes expect them | | Core ML conversion and Core ML suite guide | RunComfy’s Core ML Suite guide (how to convert SD1.5 / SDXL / LCM) citeturn0search7 | Use that to generate `.mlmodelc` / `.mlpackage` | | ComfyUI-CoreMLSuite repo | Contains the custom node code and expects to reference models folder there citeturn0search3turn1search11 | Put that repo in `ComfyUI/custom_nodes/ComfyUI-CoreMLSuite` | | Flux / example models | In `ComfyUI_examples` / pages for Flux, etc. citeturn1search7 | Models go in `ComfyUI/models/diffusion_models` etc. (matching the workflow) | | HiDream models & workflow | On ComfyUI_examples / HiDream page (e.g. `hidream_i1_dev_bf16.safetensors`) citeturn1search18 | Put in `ComfyUI/models/diffusion_models/` | | WAN / video model workflows | In workflow_templates or examples (WAN2.1 etc.) citeturn1search13turn1search24 | Put diffusion + clip_vision models into appropriate subfolders under `ComfyUI/models/` | --- ## 🧩 Starter workflow you can try now Here’s a simple **text-to-image → upscale** workflow (for illustrative purposes). Copy this JSON, then in ComfyUI: `File → Import Workflow from JSON` (or paste). You’ll need a working SDXL (or SD1.5) model node, a sampler node, a decode node, etc. You’ll need to adjust model names to what you’ve installed. But this gives you the skeleton. ```json { "nodes": [ { "id": 0, "type": "LoadCheckpoint", "properties": { "checkpoint_name": "your_sdxl_checkpoint.safetensors" }, "pos": [0, 0] }, { "id": 1, "type": "Prompt", "properties": { "positive": "a beautiful scenic landscape, ultra detailed, cinematic lighting", "negative": "lowres, bad anatomy" }, "pos": [200, 0] }, { "id": 2, "type": "KSampler", "inputs": { "cond": [1, 0], "model": [0, 0] }, "properties": { "sampler_name": "Euler a", "steps": 25 }, "pos": [400, 0] }, { "id": 3, "type": "DecodeLatent", "inputs": { "latent": [2, 0] }, "pos": [600, 0] }, { "id": 4, "type": "Upscale", "inputs": { "image": [3, 0] }, "properties": { "scale": 2.0, "method": "RealESRGAN" }, "pos": [800, 0] }, { "id": 5, "type": "SaveImage", "inputs": { "image": [4, 0] }, "properties": { "filename": "output.png" }, "pos": [1000, 0] } ], "connections": [] } ``` You’ll need to rename `"your_sdxl_checkpoint.safetensors"` to the actual model file you placed, and ensure node names (like `KSampler`) match what’s available in your build or with your custom nodes. --- If you like, I can package up a **“starter kit” zip** for you: workflows + model download links + folder structure ready to drop into your ComfyUI install (especially tailored for Apple Silicon / Core ML). Do you want me to build that and send you links?
gpt-5