diff --git a/README.md b/README.md index 8a782d4e2..e41ea20c5 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,17 @@ On Windows, you will need to open PowerShell and activate your virtual environme comfyui ``` +**Advanced: Using `uv`**: + +`uv` is a significantly faster and improved Python package manager. On Windows, use the following commands to install the package from scratch about 6x faster than vanilla `pip`: + +```powershell +uv venv --seed +& .\venv\Scripts\activate.ps1 +uv pip install git+https://github.com/hiddenswitch/ComfyUI.git +python -m comfy.cmd.main +``` + ### LTS Custom Nodes These packages have been adapted to be installable with `pip` and download models to the correct places: diff --git a/comfy/component_model/files.py b/comfy/component_model/files.py index 636ecfee2..4172c5ca3 100644 --- a/comfy/component_model/files.py +++ b/comfy/component_model/files.py @@ -49,4 +49,6 @@ def get_package_as_path(package: str, subdir: Optional[str] = None) -> str: traversable = resources.files(package) if subdir is not None: traversable = traversable / subdir - return os.path.commonpath(list(map(str, traversable.iterdir()))) + if traversable.is_dir(): + return str(traversable) + raise ValueError(f"Could not find path for package={package}, subdir={subdir}, traversable={str(traversable)}") diff --git a/requirements.txt b/requirements.txt index a4d0d9d86..435bb0571 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,7 +28,7 @@ importlib_resources Pillow scipy tqdm -protobuf +protobuf>=3.20.0,<5.0.0 psutil ConfigArgParse aio-pika diff --git a/setup.py b/setup.py index 0da0c8428..f87f77533 100644 --- a/setup.py +++ b/setup.py @@ -188,14 +188,8 @@ def dependencies(for_pypi=False, force_nightly: bool = False) -> List[str]: package_data = [ - 'sd1_tokenizer/*', - 't5_tokenizer/*', - '**/*.json', - '**/*.yaml', - '**/*.model' + '**/*' ] -if not is_editable: - package_data.append('comfy/web/**/*') dev_dependencies = open(os.path.join(os.path.dirname(__file__), "requirements-dev.txt")).readlines() setup( name=package_name,