Comfy-Org / Comfy-Org/ComfyUI

Launching CUSTOM browser (and not Windows' default) - Updated to ComfyUI 0.35.0

Open
#11,709 4 comments 0 reactions 0 assignees View on GitHub
Feature
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### UPDATES
➡️ **09/SEP/2026: Pull Request pending review. Tested solution locally with ComfyUI v0.35.0: works like a charm.**
➡️ **26/AUG/2026: Moving from local file edits to CLI switches. Created a [Pull Request](https://github.com/Comfy-Org/ComfyUI/pull/15909) with the solution.**
➡️ **07/JAN/2026: First published local `main.py` code modification to open a custom browser/profile.**

### BEHAVIOR

ComfyUI portable automatically (`--auto-launch`) opens in Windows' default browser using the default browser profile after the loading sequence to present the user interface.

### ISSUE

Some users—like me—resort to different browsers for different tasks relying on separate settings/profiles:
`Browsing profile =/= ComfyUI profile`

Being able to choose a custom browser for ComfyUI is a great addition to an already amazing tool.

### SOLUTION

After maintaining a local `main.py` modification across multiple versions (v0.6.0 up to v0.34.0)—which meant re-injecting the code every time a new update wiped it out—and taking inspiration from a [rejected pull request](https://github.com/Comfy-Org/ComfyUI/pull/15730) by another user, I have refactored this temporary workaround into a proper, permanent CLI solution.

Moving the logic to startup flags allows us to configure custom browsers directly from launch scripts (like `run_nvidia_gpu.bat`) without touching the core code. This resolves the issue upstream so users don't have to manually modify core files locally every time a new version is released (which happens very frequently with ComfyUI).

### BUT... WHERE'S THE SOLUTION?

A [Pull Request](https://github.com/Comfy-Org/ComfyUI/pull/15909) has been created for this purpose, so fingers crossed! You can review the modified code [here](https://github.com/Comfy-Org/ComfyUI/pull/15909/changes). The code additions are extremely simple and self-explanatory.

The new solution works directly via the CLI:
`python main.py --browser-path "C:\Program Files\Google\Chrome\Application\chrome.exe" --browser-profile "Profile 2"`
**And kaboom: Chrome opens up directly in Profile 2 (`chrome://version/`).**

Omitting or setting an invalid `--browser-profile` simply defaults to the main profile.

Prefer **Opera**? Go ahead, **use Opera**. **Brave**? **Even good old Netscape should work** (kind of). Just specify the full executable path to your browser of choice and watch the magic happen.

Goodbye Windows default browser, hello custom setup!

### A NOTE ABOUT PROFILES

This solution works with **any** browser, but keep in mind that the profile parameter currently follows Chromium-based syntax (Chrome, Edge, Opera, Brave, etc.), which represents the majority of users. The profile flag might not work with non-Chromium browsers out of the box. If this PR gets merged, expanding support for non-Chromium browser profiles will be the natural next step.

### CHANGES

Summary of changes:
- `comfy/cli_args.py` (modified): Added `--browser-path` and `--browser-profile` flags.
- `comfy/browser.py` (created): Handles executable launch via `subprocess` with clean console logging.
- `main.py` (modified): Calls `comfy.browser.open_browser()` on startup. Fallback: If the specified path is invalid or missing, it logs a warning and *gracefully* defaults to the standard system browser execution.

Full changes: https://github.com/Comfy-Org/ComfyUI/pull/15909/changes

**Browsers of the world, unite!**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.