Packaging ComfyUI as a self-contained runtime or binary distribution
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Feature Idea
due to the lack of analogues, I am creating this feature request. I don't understand how others still tolerate this and don't notice, but seriously, is it considered normal to install python sources and heaps of libs from its ecosystem, as well as updating through the git system? Guys, let's think about how to pack it all into a bin file that won't clog up the mother system.
Today, ComfyUI is primarily distributed as source code, which the user installs via git clone and pip install, and updates via git pull followed by dependency installation. This is confirmed by the official documentation, which explicitly requires synchronizing the code and Python dependencies through requirements.txt. However, there is a portable version that already includes embedded Python (python_embeded) and dependencies, but it is not a binary but rather a pre-built runtime environment.
This model offers flexibility but introduces several system challenges. Installation requires understanding the Python ecosystem, virtual environments, and dependencies. Updates can break the environment, especially due to heavy libraries like torch and associated GPU dependencies. Plugins and custom nodes add additional instability as they dynamically pull in new dependencies. As a result, the entry threshold remains high, and the reproducibility of the environment is low.
The idea behind this issue is to explore the possibility of transitioning to a self-contained distribution that minimizes dependence on the external environment and simplifies the user experience, while maintaining the current architecture with plugins and fast updates. The term "binary" does not necessarily refer to a single executable file, as it is not practical for a Python ML stack. Instead, it refers to a fully packaged runtime environment similar to the portable version, but with a standardized and enhanced version.
In practice, a full-fledged single-binary approach is not well-suited for ComfyUI due to the size of dependencies, CUDA specifics, and dynamic module loading. Instead, a more realistic approach is to develop an embedded runtime, where Python, dependencies, and ComfyUI are delivered as a single entity while remaining updateable and extensible. The existing portable version actually demonstrates the viability of this approach, but it has not yet been formalized as a full-fledged product standard.
The development vector could focus on a unified runtime layer that includes fixed dependency versions, a secure update mechanism, isolation of custom plugins, and the ability to perform partial updates without rebuilding the entire environment. Additionally, containerization could be considered as an alternative approach for server-side scenarios where reproducibility and environment control are crucial.
A separate direction is building a hybrid model where the base core is distributed as a stable runtime, and a layer of extensions is layered on top of it, managed through a dependency manager. This will preserve the custom nodes ecosystem while reducing the risk of breakage during updates. It is also possible to divide into release channels, where the stable runtime is updated less frequently, while the bleeding-edge version remains available through the current git model.
In general, the task is not limited to "building a binary," but rather involves rethinking the way Python applications with a heavy ML stack are delivered, where the balance between flexibility and stability becomes crucial.
### Existing Solutions
_No response_
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.