Fix uv support and better protobuf spec

This commit is contained in:
doctorpangloss 2024-07-23 17:03:25 -07:00
parent 135e4008b7
commit 5c5e101ba3
4 changed files with 16 additions and 9 deletions

View File

@ -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:

View File

@ -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)}")

View File

@ -28,7 +28,7 @@ importlib_resources
Pillow
scipy
tqdm
protobuf
protobuf>=3.20.0,<5.0.0
psutil
ConfigArgParse
aio-pika

View File

@ -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,