Skip to content

Conversation

woct0rdho
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants