Skip to content

Running ComfyUI

Use cg run to launch ComfyUI from the selected ComfyGit environment.

cg run

Before launching, ComfyGit syncs the environment so the virtualenv, custom nodes, model links, PyTorch backend, and local overlays match the manifest plus local runtime configuration.

Choose An Environment

Use the active environment:

cg use my-env
cg run

Or target one command:

cg -e my-env run

Pass ComfyUI Arguments

ComfyGit owns flags before --. Arguments after -- are passed to ComfyUI.

cg run -- --listen 0.0.0.0 --port 8188

Common examples:

cg run -- --port 8189
cg run -- --listen 0.0.0.0
cg run -- --auto-launch

One-Time Runtime Overrides

Use a different PyTorch backend for one run:

cg run --torch-backend cpu

Apply an overlay for one run:

cg run --overlay local-dev

Install an optional extra for the run sync:

cg run --extra cuda

These operation-level flags do not rewrite the saved local environment config.

Skip Sync

cg run --no-sync

Use --no-sync only when you deliberately want to bypass reconciliation. If the runtime is stale, ComfyUI may start with missing packages, nodes, or model links.

Open ComfyUI

By default, ComfyUI is available at:

http://127.0.0.1:8188

If you bind to 0.0.0.0, make sure the port is reachable from the browser or machine that needs it.

Run Vs Serve

cg run launches the full ComfyUI editor and backend.

cg serve fronts an already running ComfyUI backend with workflow contract endpoints and the packaged Studio UI.

For Studio/API usage, run both:

cg run -- --port 8188
cg serve --port 8190 --comfy-url http://127.0.0.1:8188

Read more: Serve workflows.