comfy-cli icon indicating copy to clipboard operation
comfy-cli copied to clipboard

'comfy launch' is not running without VPN

Open MrGeRoI opened this issue 1 month ago • 5 comments

Describe the bug I installed whole ComfyUI with this guide inside my WSL Ubuntu. When i starting it with comfy launch it says nothing and stucks until i interrupt it.

To Reproduce Start comfy with comfy launch

Expected behavior When i launched VPN service in Windows system my comfy inside WSL starts without problem and works well.

Screenshot Image

Additional context EDIT: I've found that tracking is not working in my location but disabling it is not working since here

enable_tracking = config_manager.get(constants.CONFIG_KEY_ENABLE_TRACKING)
if not enable_tracking:
     return

enable_tracking is string not boolean. That's the bug.

MrGeRoI avatar Nov 07 '25 15:11 MrGeRoI

Hi @MrGeRoI! I'm Dosu and I’m helping the comfy-cli team.

This is a known issue: when running comfy launch in environments like WSL without a VPN, the process can hang because the CLI tries to check for updates by reaching out to PyPI before launching ComfyUI. If it can't connect, it waits indefinitely without error or output (source). When you enable your VPN, network routing allows the update check to succeed, so the launch proceeds.

Workarounds discussed by users and maintainers include modifying the CLI to skip update checks for launch commands, or adding a network request timeout to prevent indefinite hangs. There is also interest in adding an "offline mode" option to skip update checks entirely (source). For now, if you want to avoid the hang, you can:

  • Temporarily disconnect your network or block PyPI in your hosts file to test if the hang is related to update checks.
  • Patch your local comfy-cli to comment out or bypass the check_for_updates() call in the launch command.
  • Use VPN as a workaround until a timeout or offline mode is implemented.

If you want to debug further, you can try running with increased verbosity or inspect the CLI code around update checks for more details.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Nov 07 '25 15:11 dosubot[bot]

@dosu, i've found that i'm stucking when requesting to api.mixpanel.com (even what is that thing?) in mp.track(distinct_id=user_id, event_name=event_name, properties=properties). So the trouble not in update at all. PyPl still works fine.

MrGeRoI avatar Nov 07 '25 16:11 MrGeRoI

api.mixpanel.com is the endpoint for Mixpanel, a third-party analytics service. comfy-cli sends usage events there using the mp.track() call in tracking.py to help the developers understand how the CLI is used. If your network blocks access to api.mixpanel.com, the CLI can hang at startup because the tracking request is synchronous and doesn't have a timeout or async handling—so it waits indefinitely for a response.

You can disable analytics tracking (and avoid the hang) by running comfy tracking disable or by setting enable_tracking = False in your config.ini file. This prevents any tracking events from being sent and skips the Mixpanel call entirely cite. Tracking is enabled by default, but you’re prompted for consent on first use, and you can skip or set this via CLI flags or config.

There’s ongoing discussion about adding timeouts and an offline mode to make the CLI more robust in restricted network environments, but for now, disabling tracking is the best workaround cite.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Nov 07 '25 16:11 dosubot[bot]

@dosu, as i can see here while debugging: config_manager.get("enable_tracking") brings to us string. NOT THE BOOLEAN ONE

So this

enable_tracking = config_manager.get(constants.CONFIG_KEY_ENABLE_TRACKING)
if not enable_tracking:
     return

makes no sense since enable_tracking returns 'False' and 'True' as strings and conditioning never breaks so doing it in always-tracking mode.

Here what i've got in config.ini while i debug:

[DEFAULT]
recent_workspace = /home/dev/comfy/ComfyUI
enable_tracking = False

I solved this problem in very dumb way as setting enable_tracking to an empty string like that in config.ini:

[DEFAULT]
recent_workspace = /home/dev/comfy/ComfyUI
enable_tracking = 

So if not enable_tracking: is working now🥴

Waiting for fix guys

MrGeRoI avatar Nov 07 '25 17:11 MrGeRoI

You're absolutely right—this is a bug in comfy-cli. The config_manager.get() method always returns config values as strings, so when you set enable_tracking = False in config.ini, the code reads it as the string 'False', which is truthy in Python. That means if not enable_tracking: never disables tracking as intended, unless you use an empty string as a workaround, which works because Python treats empty strings as falsey see code.

The clean fix is to explicitly convert the string to a boolean before using it in logic, for example:

enable_tracking = config_manager.get(constants.CONFIG_KEY_ENABLE_TRACKING)
if enable_tracking is not None and enable_tracking.lower() == "true":
    # tracking enabled
    ...
else:
    # tracking disabled
    return

Or, even better, add a helper like get_bool(key) to ConfigManager to handle this everywhere.

Currently, there’s no official fix or workaround in the codebase—your empty string hack is the only way to reliably disable tracking via config.ini. Thanks for catching this!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Nov 07 '25 17:11 dosubot[bot]