-
-
Notifications
You must be signed in to change notification settings - Fork 199
2.1.2 Frontend: ComfyUI
Handle:
comfyui
URL: http://localhost:34031
This ui will let you design and execute advanced stable diffusion pipelines using a graph/nodes/flowchart based interface.
Note
The initial download of the models will take upwards of 10 minutes, depending on your internet connection. Monitor the logs during the startup to see the progress.
# [Optional] Pre-pull the comfyui images, ~4GB
# otherwise will be pulled on start
harbor pull comfyui
# Start the service
# Note that this will take a really long time
# for the initial model download
# [Optional] --tail will automatically follow the logs
harbor up comfyui --tail
# See service logs
harbor logs comfyui -n 100
# [Optional] once started, open the UI
# in your default browser
harbor open comfyui- When running with other inference backends - ensure that you have VRAM available for the models. Unlike
ollama,comfyuiwon't try to offload if there's not enough VRAM. You can check the VRAM usage withharbor top - Harbor's default workflow for the
comfyuiis very basic to get you started, explore the ComfyUI documentation to learn more about the advanced features ⚠️ Due to how Harbor's ComfyUI container is structured, after modifying container packages, you must runharbor comfyui workspace syncto persist the changes to the local workspace, otherwise they will be lost on the next restart.⚠️ ai-dockwasn't updated since November 2024, so you'll likely want to update ComfyUI
To update ComfyUI via the Web interface, you can follow these steps:

After update, please sync the workspace to avoid losing changes on restart:
harbor comfyui workspace syncNote
Harbor uses AI Dock to run ComfyUI. By default, it has authentication disabled, but you should re-enable it if exposing the ComfyUI over the network (sadly Open WebUI integration won't work when auth is enabled).
# Enable web AI Dock auth
harbor comfyui auth true
# Get current login credentials
harbor comfyui user
harbor comfyui password
# Set new login credentials
harbor comfyui user me
harbor comfyui password mypassword
# Underlying config aliases and ENV variables
harbor config get comfyui.user # HARBOR_COMFYUI_USER
harbor config get comfyui.password # HARBOR_COMFYUI_PASSWORD
# Underlying config aliases and ENV variables
harbor config get comfyui.auth # HARBOR_COMFYUI_AUTHWhen enabled, the comfyui.password can also be used as a token for ComfyUI API. See this file in ai-dock to see all possible auth ways.
Harbor uses AI Dock setup that includes a provisioning script for Flux models compatible with the Open WebUI. You can find provisioning script documentation here, and list of available scripts in the AI Dock's ComfyUI repo here.
By default, Harbor will load ComfyUI pre-configured to run FLUX models.
ComfyUI is mainly configured via the UI itself. Harbor will use the comfyui folder in the workspace to store the configuration files.
# Show ComfyUI workspace folder
echo $(harbor home)/services/comfyuiImportant
ComfyUI uses pip dependencies for managing custom nodes. Those are not automatically synced to the local workspace, so won't automatically persist between Harbor restarts.
# Sync workspace after updating the nodes
harbor comfyui workspace syncAdditional configuration via Harbor CLI:
# See current version
harbor comfyui version
# Set the version to use
# Accepts package tags from
# AI Dock GHCR: https://github.com/ai-dock/comfyui/pkgs/container/comfyui
harbor comfyui version latest-rocmFollowing options are available via harbor config:
# The port of the ComfyUI's web interface
HARBOR_COMFYUI_HOST_PORT 34031
# web interface for AI Dock UI from ComfyUI container
HARBOR_COMFYUI_PORTAL_HOST_PORT 34032
# Syncthing UI port for workspace sync
HARBOR_COMFYUI_SYNCTHING_HOST_PORT 34033
# Docker image tag to use, can be set to
# "latest-rocm" or "latest-cpu" see:
# https://github.com/ai-dock/comfyui/pkgs/container/comfyui
HARBOR_COMFYUI_VERSION latest-cuda
# Location of the folder where ComfyUI will store
# models, nodes, and other configuration files
# Has to be either relative to $(harbor home) or an absolute path
HARBOR_COMFYUI_WORKSPACE ./services/comfyui/workspace
# Enable or disable authentication
# (AI Dock) feature
HARBOR_COMFYUI_AUTH false
# User and password for the AI Dock
# If the auth is enabled
HARBOR_COMFYUI_USER harbor
HARBOR_COMFYUI_PASSWORD sk-comfyui
# Additional arguments for the ComfyUI
HARBOR_COMFYUI_ARGS
# The URL to the provisioning script
# that'll be run to initialise fresh ComfyUI instance
# You can find more provisioning scripts in the AI Dock repo:
# https://github.com/ai-dock/comfyui/tree/main/config/provisioning
HARBOR_COMFYUI_PROVISIONING https://raw.githubusercontent.com/av/harbor/main/comfyui/provisioning.shWhen running ComfyUI, Open WebUI will also be pre-configured to run a FLUX-based workflow for generating images.
Please refer to the official Open WebUI documentation to adjust the image generation workflow.
Note
Open WebUI will not work with ComfyUI when the authentication is enabled.
