ComfyUI Extension: ComfyUI-SDCPP
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.
A custom node for ComfyUI that integrates the powerful stable-diffusion.cpp inference engine.
Looking for a different extension?
Custom Nodes (0)
README
ComfyUI-SDCPP
A custom node for ComfyUI that integrates the powerful stable-diffusion.cpp inference engine. This node brings high-performance, gguf quantized model support to ComfyUI, with massive optimization specifically for Apple Silicon (Metal) devices to efficiently run huge models like Flux!
🌟 Features
- GGUF Support In ComfyUI: Automatically patches ComfyUI's model loaders to recognize
.ggufextensions. You can effortlessly loadunet,vae, andclipfiles in GGUF format! - Apple Silicon / Metal Optimization:
- Forces GGML to correctly locate the
ggml-metal.metalshader files, preventing silent CPU fallbacks. - Implements
enable_mmapandoffload_params_to_cpufor native zero-copy streaming directly from ssd to Unified Memory. Massively reduces swapping out RAM, preventing OOMs (Out Of Memory) entirely.
- Forces GGML to correctly locate the
- Flash Attention: Greatly speeds up generation and reduces VRAM/RAM load footprint.
- ComfyUI Compatibility: Fully integrates with ComfyUI's step progress bar, interruption triggers (Cancel button), and robustly translates the output directly into perfectly contiguous standard
IMAGEtensors, seamlessly compatible with downstream ComfyUI PyTorch nodes.
📦 Installation
- Ensure your Python environment has the
stable_diffusion_cppbindings installed:pip install stable-diffusion-cpp-python - Navigate to your ComfyUI
custom_nodesfolder and clone this repository (or copy theComfyUI-SDCPPfolder inside):cd ComfyUI/custom_nodes git clone https://github.com/your-username/ComfyUI-SDCPP.git - Boot up ComfyUI!
🚀 Usage
Inside ComfyUI:
-
Double click the workspace (or search the node list) and add:
SD.cpp Flux (UNet/VAE/CLIP). -
Place your downloaded
.gguffiles into the standard ComfyUI directories:ComfyUI/models/unet/ComfyUI/models/clip/ComfyUI/models/vae/(Node specifically ensures anyqwen/mistral/llamanamed text encoders route to thellm_pathfor correct Flux handling).
-
Select your UNet, CLIP, and VAE.
-
Set your prompt, resolution, and steps, then click Queue Prompt.
🔧 Acknowledgements
Powered by stable-diffusion.cpp and ggml.
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.