Comfy-Org / Comfy-Org/ComfyUI

Exclude unnecessary files from Windows standalone releases

Open
#3,108 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

Extraction time and file size of Windows standalone releases can be improved by excluding some unnecessary files.

`__pycache__/`, `*.py[co]` - these will be created on first run so don't need to be packaged

`include/` and `*.h`, and `*.lib` - some Python packages include C++ headers and libraries, these aren't required and increase extraction time

[`Nuitka`](https://github.com/Nuitka/Nuitka)'s anti-bloat rules would be the next step.

```
-x"r!__pycache__/" -x"r!*.pyc" -x"r!*.pyo" -x"r!*.h" -x"r!include/" -x"r!*.lib"
```
In [`windows_release_package.yml`](https://github.com/comfyanonymous/ComfyUI/blob/master/.github/workflows/windows_release_package.yml#L85) and [`windows_release_nightly_pytorch.yml`](https://github.com/comfyanonymous/ComfyUI/blob/master/.github/workflows/windows_release_nightly_pytorch.yml#L76)

Original

`2725 folders, 28488 files, 5665893548 bytes (5404 MiB)` - Compressed `1,527,840,768 (1457 MiB)`

With exclusions

`1420 folders, 11010 files, 4677802384 bytes (4462 MiB)` - Compressed `1,449,537,536 (1382 MiB)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.