Watch out for comfy-cli on comfyui-manager repo (it tracks your prompts and other things and send to a company named Mixpanel if you aren't paying attention during install)
I noticed when I tried to install comfyui manager (separate popular repo) on a new comfyui install (non-portable) recently things changed and wanted to give a heads up.. I know some people like to install this before they install StableSwarmUI also. It asked me if I wanted to "enable tracking analytics" after installing comfy-cli. I said NO of course, but if I wasn't paying attention I could have easily thought it was just a dependency and say yes. I dug into it as I didn't trust it was actually disabled, but it does. I'm not a fan that this stuff actually existing though.. all it takes is one comfy-ui extension with a deal with Mixpanel to install it and autosay yes. I sort of lost a little love for comfyui manager for the fact they added this without any disclaimer to pay close attention attention. I don't think default comfyui-manager installation method uses this at least. Not a fan of prompt_tracking_consent existence..
prompt_tracking_consent <---
Chatgpt summary: (PS. I also verified this)
The comfy-cli tool indeed has mechanisms to track various events, which includes prompts and commands executed within the CLI. The core tracking logic is handled by functions like track_event and track_command. Here’s a detailed look at what is being tracked:
Key Tracking Components
Tracking Configuration:
The ConfigManager class manages configurations, including whether tracking is
enabled (constants.CONFIG_KEY_ENABLE_TRACKING).
Tracking Events:
The track_event function logs events with properties that include the CLI version and a unique tracing ID for each command.
python def track_event(event_name: str, properties: any = None): if properties is None: properties = {} logging.debug( f"tracking event called with event_name: {event_name} and properties: {properties}" ) enable_tracking = config_manager.get(constants.CONFIG_KEY_ENABLE_TRACKING) if not enable_tracking: return try: properties["cli_version"] = cli_version properties["tracing_id"] = tracing_id mp.track(distinct_id=user_id, event_name=event_name, properties=properties) except Exception as e: logging.warning(f"Failed to track event: {e}") # Log the error but do not raise
Tracking Commands:
The track_command decorator logs the name of the command and its arguments.
python def track_command(sub_command: str = None): def decorator(func): u/functools.wraps(func) def wrapper(*args, **kwargs): command_name = ( f"{sub_command}:{func.__name__}" if sub_command is not None else func.__name__ ) filtered_kwargs = { k: v for k, v in kwargs.items() if k != "ctx" and k != "context" } logging.debug( f"Tracking command: {command_name} with arguments: {filtered_kwargs}" ) track_event(command_name, properties=filtered_kwargs) return func(*args, **kwargs) return wrapper return decorator
Specific Example in entry Function
The entry function is where the CLI initializes, and it calls prompt_tracking_consent to ask the user for permission to enable tracking.
python u/app.callback(invoke_without_command=True) def entry( ctx: typer.Context, workspace: Annotated[ Optional[str], typer.Option( show_default=False, help="Path to ComfyUI workspace", callback=g_exclusivity.validate, ), ] = None, recent: Annotated[ Optional[bool], typer.Option( show_default=False, is_flag=True, help="Execute from recent path", callback=g_exclusivity.validate, ), ] = None, here: Annotated[ Optional[bool], typer.Option( show_default=False, is_flag=True, help="Execute from current path", callback=g_exclusivity.validate, ), ] = None, skip_prompt: Annotated[ Optional[bool], typer.Option( show_default=False, is_flag=True, help="Do not prompt user for input, use default options", ), ] = None, enable_telemetry: Annotated[ Optional[bool], typer.Option( show_default=False, hidden=True, is_flag=True, help="Enable tracking", ), ] = True, version: bool = typer.Option( False, "--version", "-v", help="Print version and exit", is_flag=True, ), ): if version: print(ConfigManager().get_cli_version()) ctx.exit(0) workspace_manager.setup_workspace_manager(workspace, here, recent, skip_prompt) tracking.prompt_tracking_consent(skip_prompt, default_value=enable_telemetry) if ctx.invoked_subcommand is None: print( "[bold yellow]Welcome to Comfy CLI![/bold yellow]: https://github.com/Comfy-Org/comfy-cli" ) print(ctx.get_help()) ctx.exit()
What is Tracked?
Commands and Arguments: Each command executed via the CLI along with its arguments.
Events: Custom events defined within the code, such as installation events.
Telemetry: General usage data, which is enabled/disabled based on user consent.
Edit me here: Just want to put this in bold Telemetry: General usage data, which is enabled/disabled based on user consent.
Privacy Considerations
To fully understand what data is being tracked and sent to Mixpanel, reviewing the actual data structures and events logged within your specific use case is necessary.
Summary
The comfy-cli tool has built-in tracking to log events and commands for analytics purposes using Mixpanel. This includes tracking CLI commands and arguments, general usage data, and other interactions within the tool, based on user consent. The provided files suggest that it does not explicitly track AI prompts entered into ComfyUI directly but rather through logs interactions with the CLI itself. For a detailed review, analyzing the specific events and data being tracked within your context would be crucial.
Edit me again: I dug into it more to make sure it actually disables and it looks like it does from the basic digging I did:
Findings
- Tracking Initialization
- The init_trackingfunction sets the enable_trackingflag in the configuration.
- If tracking is disabled, it returns early and does not proceed with tracking initialization.
- Event Tracking
- The track_eventfunction checks if tracking is enabled (enable_trackingflag).
- If tracking is disabled, the function returns early and does not send any tracking data.
- Prompting for Consent
- The prompt_tracking_consentfunction prompts the user for consent to enable tracking.
- If the user declines (or if skip_promptis used with default_valueset to False), tracking is not enabled.
Conclusion
The provided code does respect the user's choice to disable tracking. When tracking is disabled, no tracking events are sent, and the configuration reflects this setting.
If you want to manually verify that no tracking data is sent:
- Check the configuration file to ensure enable_trackingis set to False.
- Monitor network traffic to verify that no tracking data is sent to Mixpanel when performing actions in the CLI.
[link] [comments]