Deploy ComfyUI, the powerful node-based interface for Stable Diffusion image generation with full pipeline control on your own server.
Grab the automated bash script from GitHub to follow along with the video.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/ai/comfyui/comfyui-ubuntu.sh
chmod +x comfyui-ubuntu.sh
sudo bash comfyui-ubuntu.sh
The script installs Docker and the NVIDIA container toolkit if a GPU is detected, then pulls the ComfyUI image and starts the container with GPU passthrough enabled. On CPU-only servers it will still run but image generation will be significantly slower.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/ai/comfyui/comfyui-ubuntu.sh
chmod +x comfyui-ubuntu.sh
sudo bash comfyui-ubuntu.sh
Open your browser and navigate to the ComfyUI interface. You will see the node-based canvas with a default txt2img workflow already loaded. The interface shows connected nodes representing the full Stable Diffusion pipeline from prompt to output.
http://<your-server-ip>:8188
Drag and drop a JSON workflow file onto the canvas to load a community workflow, or use the default txt2img workflow. You must add a checkpoint model — place a .safetensors file in the models/checkpoints/ directory and click Refresh in the Load Checkpoint node to detect it.
Enter your positive and negative prompts in the CLIP Text Encode nodes, adjust the sampler settings (steps, CFG scale, seed), and click "Queue Prompt" to start generation. Watch the progress in real time in the UI — the generated image will appear in the Preview Image node when complete.
| Port | Purpose |
|---|---|
| 8188 | ComfyUI Web UI & API |
ComfyUI is a node-based graphical interface for Stable Diffusion that gives users precise control over the image generation pipeline. Each step — model loading, sampling, conditioning, VAE decoding — is represented as a node that you connect visually, enabling complex and repeatable workflows.
ComfyUI offers unmatched flexibility compared to Automatic1111 or Fooocus. You can chain multiple models, use ControlNet, LoRA, IP-Adapter, and custom nodes in complex workflows that would be impossible with a simple form-based UI. It is the standard tool for advanced Stable Diffusion users.
ComfyUI runs on port 8188. Do not expose this port publicly without authentication — it has no built-in login. For remote access, use an SSH tunnel (ssh -L 8188:localhost:8188 user@server) or place it behind a reverse proxy with HTTP basic authentication.
Alternatives include Automatic1111 (feature-rich, form-based UI), Fooocus (simplified, beginner-friendly), InvokeAI (polished, self-hosted), and Replicate (cloud API). Choose ComfyUI for maximum workflow control and advanced pipeline construction.
Avoid ComfyUI if you are a beginner just wanting to generate images — Fooocus or Automatic1111 have friendlier interfaces. Also avoid on systems without a discrete GPU — generation will be impractically slow on CPU alone.
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
A GPU is strongly recommended. With an NVIDIA GPU and CUDA support, image generation takes 5 to 30 seconds depending on the model and settings. On CPU, the same process takes 30 minutes or more, making practical use difficult. AMD GPU support via ROCm is available but requires additional configuration.
ComfyUI supports Stable Diffusion 1.5, SDXL, SDXL Turbo, SD 2.x, Flux, and many other diffusion model variants. Download checkpoint files in .safetensors or .ckpt format from Hugging Face or CivitAI and place them in the models/checkpoints directory.
A workflow is a saved node graph that defines the entire image generation pipeline — which model to load, the sampler settings, conditioning text, resolution, and output format. Workflows are saved as JSON files and can be shared and imported. The ComfyUI community has thousands of prebuilt workflows for specific use cases.
Yes. ComfyUI has a REST API and WebSocket interface. Submit a workflow JSON via the API to queue a generation job. The server processes it and returns the output image. This enables building applications on top of ComfyUI or scripting batch generation pipelines.
The easiest way is to install the ComfyUI Manager custom node first. ComfyUI Manager adds a GUI for browsing, installing, and updating custom nodes from the community registry without needing to use the command line.
For SD 1.5 models, 4 to 6 GB VRAM is sufficient. For SDXL, plan for 8 to 12 GB. Flux models typically require 12 to 24 GB. ComfyUI has memory management options to reduce VRAM usage at the cost of speed, such as --lowvram and --medvram flags.
Yes. ControlNet is one of ComfyUI's most powerful features. Download ControlNet model files and place them in the models/controlnet directory. Add ControlNet nodes to your workflow to guide image generation with depth maps, pose skeletons, edge detection, or other conditioning inputs.
Place ComfyUI behind a reverse proxy with HTTP basic authentication (Nginx, Caddy, or NPM). This adds a username and password prompt before the ComfyUI interface. Use a VPN for stricter access control. Note that all users share the same queue — there is no per-user isolation natively.