Skip to content

Bundle include and libs folders in the portable release#7200

Open
woct0rdho wants to merge 2 commits intoComfy-Org:masterfrom
woct0rdho:master
Open

Bundle include and libs folders in the portable release#7200
woct0rdho wants to merge 2 commits intoComfy-Org:masterfrom
woct0rdho:master

Conversation

@woct0rdho
Copy link
Contributor

@woct0rdho woct0rdho commented Mar 12, 2025

This is required by JIT compilation such as Triton, see https://github.com/woct0rdho/triton-windows#8-special-notes-for-comfyui-with-embeded-python

Because of the increasing popularity of Triton, I think it's needed to bundle the two folders in the ComfyUI portable release so it's easier for users to install Triton. This should be done at the level of Python distribution, rather than a pip package.

On Windows, the two folders are not bundled in the Python embed distribution, and the standard way to obtain them is nuget, see https://bugs.python.org/issue38224 and https://docs.python.org/3/using/windows.html . This is also what cibuildwheel does. There is no notable difference from python-build-standalone.

I've tested that the workflow runs successfully at https://github.com/woct0rdho/ComfyUI/releases/tag/test-nuget , and in this portable release Triton works without manually copying the two folders.

The two folders only take ~2 MB uncompressed, so this almost does not impact the overall package size.

Note that the nuget API may produce HTTP 302 redirect to some CDN, so we need curl --location

@doctorpangloss
Copy link

doctorpangloss commented Aug 28, 2025

this should be merged

uv also correctly creates relocatable, self contained environments for windows, maybe it's worth migrating to that. it can easily be named python_embeded (see https://github.com/hiddenswitch/ComfyUI/releases/tag/latest)

@comfyui-wiki
Copy link
Member

@Kosinkadink Do you think this can be merged?

@comfy-pr-bot
Copy link
Member

Test Evidence Check

⚠️ Warning: Visual Documentation Missing

If this PR changes user-facing behavior, visual proof (screen recording or screenshot) is required. PRs without applicable visual documentation may not be reviewed until provided.

You can add it by:

  • GitHub: Drag & drop media directly into the PR description
  • YouTube: Include a link to a short demo

@woct0rdho
Copy link
Contributor Author

I don't think this PR changes any user-facing behavior. Previously we were letting the user do the developer's work.

@Kosinkadink Kosinkadink added For PR Review Will be looked at during next PR review; once checked/responded to, this label will be removed. notify:jk labels Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For PR Review Will be looked at during next PR review; once checked/responded to, this label will be removed. notify:jk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants