diff --git a/.github/actions/build/linux/app/action.yml b/.github/actions/build/linux/app/action.yml index 57f04588..ba23c219 100644 --- a/.github/actions/build/linux/app/action.yml +++ b/.github/actions/build/linux/app/action.yml @@ -57,7 +57,6 @@ runs: set -x pip install comfy-cli yarn make:assets:${{inputs.build-gpu}} - yarn clean:assets:dev shell: bash - name: Make app shell: bash diff --git a/.github/actions/build/windows/app/action.yml b/.github/actions/build/windows/app/action.yml index b1bc118d..822cfeb5 100644 --- a/.github/actions/build/windows/app/action.yml +++ b/.github/actions/build/windows/app/action.yml @@ -44,7 +44,6 @@ runs: set -x pip install comfy-cli yarn make:assets:${{inputs.build-gpu}} - yarn clean:assets:dev shell: bash - name: Make app shell: powershell diff --git a/.github/actions/build/windows/todesktop/action.yml b/.github/actions/build/windows/todesktop/action.yml index 0349c78a..bf9a773f 100644 --- a/.github/actions/build/windows/todesktop/action.yml +++ b/.github/actions/build/windows/todesktop/action.yml @@ -1,4 +1,4 @@ -name: Windows Build to ToDesktop +name: Build to ToDesktop description: Will build the project then send the project files to ToDesktop to be compiled into installers. inputs: GITHUB_TOKEN: @@ -19,13 +19,24 @@ runs: node-version: '20.x' corepack: true - run: yarn install --immutable - shell: cmd + shell: bash - run: yarn set version --yarn-path self - shell: cmd + shell: bash - run: yarn run download:uv all - shell: powershell + shell: bash + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.12' + - name: Install ComfyUI and create standalone package + shell: bash + run: | + set -x + pip install comfy-cli + yarn make:assets:cpu + yarn clean:assets:git - name: Make app - shell: powershell + shell: bash env: PUBLISH: true GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} diff --git a/.github/workflows/publish_all.yml b/.github/workflows/publish_all.yml index 4cd11972..7ae61845 100644 --- a/.github/workflows/publish_all.yml +++ b/.github/workflows/publish_all.yml @@ -11,7 +11,7 @@ jobs: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Release')) - runs-on: windows-latest + runs-on: ubuntu-latest steps: - name: Github checkout uses: actions/checkout@v4 diff --git a/README.md b/README.md index fa61d50a..575cc2ba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # desktop comfyui [![codecov](https://codecov.io/github/Comfy-Org/electron/graph/badge.svg?token=S64WJWD2ZX)](https://codecov.io/github/Comfy-Org/electron) +![Beta](https://img.shields.io/badge/beta-blue.svg) # Overview diff --git a/assets/requirements/macos.compiled b/assets/requirements/macos.compiled new file mode 100644 index 00000000..3dfef54e --- /dev/null +++ b/assets/requirements/macos.compiled @@ -0,0 +1,334 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile /Users/redacted/Documents/electron/assets/ComfyUI/requirements.txt /Users/redacted/Documents/electron/assets/ComfyUI/custom_nodes/ComfyUI-Manager/requirements.txt --emit-index-annotation --emit-index-url --index-strategy unsafe-best-match -o /Users/redacted/Documents/electron/assets/requirements.compiled --override /Users/redacted/Documents/electron/assets/override.txt +--index-url https://pypi.org/simple + +aiohappyeyeballs==2.4.3 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # aiohttp + # from https://pypi.org/simple +aiohttp==3.11.6 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +aiosignal==1.3.1 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # aiohttp + # from https://pypi.org/simple +attrs==24.2.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # aiohttp + # from https://pypi.org/simple +certifi==2024.8.30 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # requests + # from https://pypi.org/simple +cffi==1.17.1 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # cryptography + # pynacl + # soundfile + # from https://pypi.org/simple +charset-normalizer==3.4.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # requests + # from https://pypi.org/simple +click==8.1.7 + # via typer + # from https://pypi.org/simple +cryptography==43.0.3 + # via pyjwt + # from https://pypi.org/simple +deprecated==1.2.15 + # via pygithub + # from https://pypi.org/simple +einops==0.8.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # spandrel + # from https://pypi.org/simple +filelock==3.16.1 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # huggingface-hub + # torch + # transformers + # from https://pypi.org/simple +frozenlist==1.5.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # aiohttp + # aiosignal + # from https://pypi.org/simple +fsspec==2024.10.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # huggingface-hub + # torch + # from https://pypi.org/simple +gitdb==4.0.11 + # via gitpython + # from https://pypi.org/simple +gitpython==3.1.43 + # via -r custom_nodes/ComfyUI-Manager/requirements.txt + # from https://pypi.org/simple +huggingface-hub==0.26.2 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r custom_nodes/ComfyUI-Manager/requirements.txt + # tokenizers + # transformers + # from https://pypi.org/simple +idna==3.10 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # requests + # yarl + # from https://pypi.org/simple +jinja2==3.1.4 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # torch + # from https://pypi.org/simple +kornia==0.7.4 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +kornia-rs==0.1.7 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # kornia + # from https://pypi.org/simple +markdown-it-py==3.0.0 + # via rich + # from https://pypi.org/simple +markupsafe==3.0.2 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # jinja2 + # from https://pypi.org/simple +mdurl==0.1.2 + # via markdown-it-py + # from https://pypi.org/simple +mpmath==1.3.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # sympy + # from https://pypi.org/simple +multidict==6.1.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # aiohttp + # yarl + # from https://pypi.org/simple +networkx==3.4.2 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # torch + # from https://pypi.org/simple +numpy==2.1.3 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # scipy + # spandrel + # torchsde + # torchvision + # transformers + # from https://pypi.org/simple +packaging==24.2 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # huggingface-hub + # kornia + # transformers + # from https://pypi.org/simple +pillow==11.0.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # torchvision + # from https://pypi.org/simple +propcache==0.2.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # aiohttp + # yarl + # from https://pypi.org/simple +psutil==6.1.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +pycparser==2.22 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # cffi + # from https://pypi.org/simple +pygithub==2.5.0 + # via -r custom_nodes/ComfyUI-Manager/requirements.txt + # from https://pypi.org/simple +pygments==2.18.0 + # via rich + # from https://pypi.org/simple +pyjwt==2.10.0 + # via pygithub + # from https://pypi.org/simple +pynacl==1.5.0 + # via pygithub + # from https://pypi.org/simple +pyyaml==6.0.2 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # huggingface-hub + # transformers + # from https://pypi.org/simple +regex==2024.11.6 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # transformers + # from https://pypi.org/simple +requests==2.32.3 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # huggingface-hub + # pygithub + # transformers + # from https://pypi.org/simple +rich==13.9.4 + # via + # -r custom_nodes/ComfyUI-Manager/requirements.txt + # typer + # from https://pypi.org/simple +safetensors==0.4.5 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # spandrel + # transformers + # from https://pypi.org/simple +scipy==1.14.1 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # torchsde + # from https://pypi.org/simple +sentencepiece==0.2.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +setuptools==75.6.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # torch + # from https://pypi.org/simple +shellingham==1.5.4 + # via typer + # from https://pypi.org/simple +smmap==5.0.1 + # via gitdb + # from https://pypi.org/simple +soundfile==0.12.1 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +spandrel==0.4.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +sympy==1.13.1 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # torch + # from https://pypi.org/simple +tokenizers==0.20.3 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # transformers + # from https://pypi.org/simple +torch==2.5.1 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # kornia + # spandrel + # torchaudio + # torchsde + # torchvision + # from https://pypi.org/simple +torchaudio==2.5.1 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +torchsde==0.2.6 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +torchvision==0.20.1 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # spandrel + # from https://pypi.org/simple +tqdm==4.67.0 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r requirements.txt + # huggingface-hub + # transformers + # from https://pypi.org/simple +trampoline==0.1.2 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # torchsde + # from https://pypi.org/simple +transformers==4.46.3 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r custom_nodes/ComfyUI-Manager/requirements.txt + # -r requirements.txt + # from https://pypi.org/simple +typer==0.13.1 + # via -r custom_nodes/ComfyUI-Manager/requirements.txt + # from https://pypi.org/simple +typing-extensions==4.12.2 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # -r custom_nodes/ComfyUI-Manager/requirements.txt + # gitpython + # huggingface-hub + # multidict + # pygithub + # rich + # spandrel + # torch + # typer + # from https://pypi.org/simple +urllib3==2.2.3 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # pygithub + # requests + # from https://pypi.org/simple +wrapt==1.16.0 + # via deprecated + # from https://pypi.org/simple +yarl==1.17.2 + # via + # --override /Users/redacted/Documents/electron/assets/override.txt + # aiohttp + # from https://pypi.org/simple diff --git a/assets/requirements/windows_nvidia.compiled b/assets/requirements/windows_nvidia.compiled new file mode 100644 index 00000000..6aa697b3 --- /dev/null +++ b/assets/requirements/windows_nvidia.compiled @@ -0,0 +1,341 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile C:\Users\robin\electron\assets\ComfyUI\requirements.txt C:\Users\robin\electron\assets\ComfyUI\custom_nodes\ComfyUI-Manager\requirements.txt --emit-index-annotation --emit-index-url --index-strategy unsafe-best-match -o C:\Users\robin\electron\assets\requirements.compiled --override C:\Users\robin\electron\assets\override.txt +--index-url https://pypi.org/simple +--extra-index-url https://download.pytorch.org/whl/cu121 + +aiohappyeyeballs==2.4.3 + # via + # --override C:redacted/electron/assets/override.txt + # aiohttp + # from https://pypi.org/simple +aiohttp==3.11.7 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +aiosignal==1.3.1 + # via + # --override C:redacted/electron/assets/override.txt + # aiohttp + # from https://pypi.org/simple +attrs==24.2.0 + # via + # --override C:redacted/electron/assets/override.txt + # aiohttp + # from https://pypi.org/simple +certifi==2024.8.30 + # via + # --override C:redacted/electron/assets/override.txt + # requests + # from https://pypi.org/simple +cffi==1.17.1 + # via + # --override C:redacted/electron/assets/override.txt + # cryptography + # pynacl + # soundfile + # from https://pypi.org/simple +charset-normalizer==3.4.0 + # via + # --override C:redacted/electron/assets/override.txt + # requests + # from https://pypi.org/simple +click==8.1.7 + # via typer + # from https://pypi.org/simple +colorama==0.4.6 + # via + # --override C:redacted/electron/assets/override.txt + # click + # tqdm + # from https://download.pytorch.org/whl/cu121 +cryptography==43.0.3 + # via pyjwt + # from https://pypi.org/simple +deprecated==1.2.15 + # via pygithub + # from https://pypi.org/simple +einops==0.8.0 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # spandrel + # from https://pypi.org/simple +filelock==3.16.1 + # via + # --override C:redacted/electron/assets/override.txt + # huggingface-hub + # torch + # transformers + # from https://pypi.org/simple +frozenlist==1.5.0 + # via + # --override C:redacted/electron/assets/override.txt + # aiohttp + # aiosignal + # from https://pypi.org/simple +fsspec==2024.10.0 + # via + # --override C:redacted/electron/assets/override.txt + # huggingface-hub + # torch + # from https://pypi.org/simple +gitdb==4.0.11 + # via gitpython + # from https://pypi.org/simple +gitpython==3.1.43 + # via -r custom_nodes/ComfyUI-Manager/requirements.txt + # from https://pypi.org/simple +huggingface-hub==0.26.2 + # via + # --override C:redacted/electron/assets/override.txt + # -r custom_nodes/ComfyUI-Manager/requirements.txt + # tokenizers + # transformers + # from https://pypi.org/simple +idna==3.10 + # via + # --override C:redacted/electron/assets/override.txt + # requests + # yarl + # from https://pypi.org/simple +jinja2==3.1.4 + # via + # --override C:redacted/electron/assets/override.txt + # torch + # from https://pypi.org/simple +kornia==0.7.4 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +kornia-rs==0.1.7 + # via + # --override C:redacted/electron/assets/override.txt + # kornia + # from https://pypi.org/simple +markdown-it-py==3.0.0 + # via rich + # from https://pypi.org/simple +markupsafe==3.0.2 + # via + # --override C:redacted/electron/assets/override.txt + # jinja2 + # from https://pypi.org/simple +mdurl==0.1.2 + # via markdown-it-py + # from https://pypi.org/simple +mpmath==1.3.0 + # via + # --override C:redacted/electron/assets/override.txt + # sympy + # from https://download.pytorch.org/whl/cu121 +multidict==6.1.0 + # via + # --override C:redacted/electron/assets/override.txt + # aiohttp + # yarl + # from https://pypi.org/simple +networkx==3.4.2 + # via + # --override C:redacted/electron/assets/override.txt + # torch + # from https://pypi.org/simple +numpy==1.26.4 + # via + # --override C:redacted/electron/assets/override.txt + # scipy + # spandrel + # torchsde + # torchvision + # transformers + # from https://pypi.org/simple +packaging==24.2 + # via + # --override C:redacted/electron/assets/override.txt + # huggingface-hub + # kornia + # transformers + # from https://pypi.org/simple +pillow==11.0.0 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # torchvision + # from https://pypi.org/simple +propcache==0.2.0 + # via + # --override C:redacted/electron/assets/override.txt + # aiohttp + # yarl + # from https://pypi.org/simple +psutil==6.1.0 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +pycparser==2.22 + # via + # --override C:redacted/electron/assets/override.txt + # cffi + # from https://pypi.org/simple +pygithub==2.5.0 + # via -r custom_nodes/ComfyUI-Manager/requirements.txt + # from https://pypi.org/simple +pygments==2.18.0 + # via rich + # from https://pypi.org/simple +pyjwt==2.10.0 + # via pygithub + # from https://pypi.org/simple +pynacl==1.5.0 + # via pygithub + # from https://pypi.org/simple +pyyaml==6.0.2 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # huggingface-hub + # transformers + # from https://pypi.org/simple +regex==2024.11.6 + # via + # --override C:redacted/electron/assets/override.txt + # transformers + # from https://pypi.org/simple +requests==2.32.3 + # via + # --override C:redacted/electron/assets/override.txt + # huggingface-hub + # pygithub + # transformers + # from https://pypi.org/simple +rich==13.9.4 + # via + # -r custom_nodes/ComfyUI-Manager/requirements.txt + # typer + # from https://pypi.org/simple +safetensors==0.4.5 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # spandrel + # transformers + # from https://pypi.org/simple +scipy==1.14.1 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # torchsde + # from https://pypi.org/simple +sentencepiece==0.2.0 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +setuptools==75.6.0 + # via + # --override C:redacted/electron/assets/override.txt + # torch + # from https://pypi.org/simple +shellingham==1.5.4 + # via typer + # from https://pypi.org/simple +smmap==5.0.1 + # via gitdb + # from https://pypi.org/simple +soundfile==0.12.1 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +spandrel==0.4.0 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +sympy==1.13.1 + # via + # --override C:redacted/electron/assets/override.txt + # torch + # from https://download.pytorch.org/whl/cu121 +tokenizers==0.20.3 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # transformers + # from https://pypi.org/simple +torch==2.5.1+cu121 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # kornia + # spandrel + # torchaudio + # torchsde + # torchvision + # from https://download.pytorch.org/whl/cu121 +torchaudio==2.5.1+cu121 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # from https://download.pytorch.org/whl/cu121 +torchsde==0.2.6 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # from https://pypi.org/simple +torchvision==0.20.1+cu121 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # spandrel + # from https://download.pytorch.org/whl/cu121 +tqdm==4.67.1 + # via + # --override C:redacted/electron/assets/override.txt + # -r requirements.txt + # huggingface-hub + # transformers + # from https://pypi.org/simple +trampoline==0.1.2 + # via + # --override C:redacted/electron/assets/override.txt + # torchsde + # from https://pypi.org/simple +transformers==4.46.3 + # via + # --override C:redacted/electron/assets/override.txt + # -r custom_nodes/ComfyUI-Manager/requirements.txt + # -r requirements.txt + # from https://pypi.org/simple +typer==0.13.1 + # via -r custom_nodes/ComfyUI-Manager/requirements.txt + # from https://pypi.org/simple +typing-extensions==4.12.2 + # via + # --override C:redacted/electron/assets/override.txt + # -r custom_nodes/ComfyUI-Manager/requirements.txt + # gitpython + # huggingface-hub + # multidict + # pygithub + # rich + # spandrel + # torch + # typer + # from https://pypi.org/simple +urllib3==2.2.3 + # via + # --override C:redacted/electron/assets/override.txt + # pygithub + # requests + # from https://pypi.org/simple +wrapt==1.17.0 + # via deprecated + # from https://pypi.org/simple +yarl==1.18.0 + # via + # --override C:redacted/electron/assets/override.txt + # aiohttp + # from https://pypi.org/simple diff --git a/package.json b/package.json index 517d1e10..34dd22e5 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "ComfyUI", "repository": "github:comfy-org/electron", "copyright": "Copyright © 2024 Comfy Org", - "version": "0.3.12", + "version": "0.3.14", "homepage": "https://comfy.org", "description": "The best modular GUI to run AI diffusion models.", "main": ".vite/build/main.js", @@ -17,9 +17,8 @@ "scripts": { "clean": "rimraf .vite dist out", "clean:uv": "rimraf assets/uv", - "clean:assets": "rimraf assets/.env assets/ComfyUI assets/python.tgz & yarn run clean:assets:dev", - "clean:assets:dev": "yarn run clean:assets:git && rimraf assets/python assets/override.txt & rimraf assets/cpython*.tar.gz & rimraf assets/requirements.*", - "clean:assets:git": "rimraf assets/ComfyUI/.git assets/ComfyUI/custom_nodes/ComfyUI_Manager/.git", + "clean:assets": "rimraf assets/.env assets/ComfyUI assets/python.tgz & yarn run clean:assets:git", + "clean:assets:git": "rimraf assets/ComfyUI/.git assets/ComfyUI/custom_nodes/ComfyUI-Manager/.git", "clean:slate": "yarn run clean & yarn run clean:assets & rimraf node_modules", "download:uv": "node scripts/downloadUV.js", "download-frontend": "node scripts/downloadFrontend.js", @@ -36,7 +35,6 @@ "make:nvidia": "yarn run make -- --nvidia", "notarize": "node debug/notarize.js", "package": "yarn run vite:compile && todesktop build --code-sign=false --async", - "postinstall": "node ./scripts/todesktop/postInstall.js", "prepare": "husky", "publish": "yarn run vite:compile && todesktop build --async", "reset-install": "node scripts/resetInstall.js", diff --git a/scripts/makeComfy.js b/scripts/makeComfy.js index 31184d98..fe9224b4 100644 --- a/scripts/makeComfy.js +++ b/scripts/makeComfy.js @@ -6,18 +6,20 @@ function makeAssets(gpuFlag) { const baseCommand = [ 'cd assets', '&&', - `comfy-cli --skip-prompt --here install --version ${pkg.config.comfyVersion} --fast-deps`, + `comfy-cli --skip-prompt --here install --version ${pkg.config.comfyVersion} --skip-requirement`, gpuFlag, '--manager-commit', pkg.config.managerCommit, '&&', - 'comfy-cli --here standalone', - '&&', 'yarn run make:frontend' ].join(' '); - - execSync(baseCommand, { stdio: 'inherit' }); + try { + execSync(baseCommand, { stdio: 'inherit' }); + } catch (error) { + console.error('Failed to make assets:', error); + process.exit(1); + } } // Get GPU flag from command line argument diff --git a/scripts/todesktop/postInstall.js b/scripts/todesktop/postInstall.js deleted file mode 100644 index f4a3eca5..00000000 --- a/scripts/todesktop/postInstall.js +++ /dev/null @@ -1,58 +0,0 @@ -const { spawnSync } = require("child_process"); -const path = require("path"); -const os = require('os'); -const process = require("process"); -const fs = require('fs-extra'); - -async function postInstall() { - const firstInstallOnToDesktopServers = - process.env.TODESKTOP_CI && process.env.TODESKTOP_INITIAL_INSTALL_PHASE; - - if (!firstInstallOnToDesktopServers) return; - - console.log('After Yarn Install ' , os.platform()); - - if (os.platform() === "win32") - { - // Change stdio to get back the logs if there are issues. - const resultUpgradePip = spawnSync(`py`, ['-3.12', '-m', 'pip' ,'install' ,'--upgrade pip'],{shell:true,stdio: 'ignore'}).toString(); - const resultInstallComfyCLI = spawnSync(`py`, ['-3.12 ','-m' ,'pip' ,'install comfy-cli'], {shell:true,stdio: 'ignore'}).toString(); - const resultComfyManagerInstall = spawnSync('set PATH=C:\\hostedtoolcache\\windows\\Python\\3.12.7\\x64\\Scripts;%PATH% && yarn run make:assets:nvidia' ,[''],{shell:true,stdio: 'inherit'}).toString(); - } - - if (os.platform() == 'darwin') - { - // Python install pip and install comfy-cli - const resultUpgradePip = spawnSync(`python3.12`, ['-m', 'pip', 'install', '--upgrade pip'], { - shell: true, - stdio: 'ignore', - encoding: 'utf-8', - }); - const resultInstallComfyCLI = spawnSync(`python3.12`, ['-m', 'pip', 'install comfy-cli'], { - shell: true, - stdio: 'inherit', - encoding: 'utf-8', - }); - // Finally add this python to path and then run the Assets Make for MacOS - const resultComfyManagerInstall = spawnSync('export PATH="/Library/Frameworks/Python.framework/Versions/3.12/bin:$PATH" && yarn run make:assets:macos', [''], { - shell: true, - stdio: 'inherit', - encoding: 'utf-8', - }); - - } - - //TODO: Linux - - // Remove python stuff - await fs.rm(path.join('./assets', 'python'), { recursive: true, force: true }); - await fs.rm(path.join('./assets', 'python.tgz'), { force: true }); - fs.readdirSync(path.join('./assets')).forEach((tgzFile) => { - if (tgzFile.endsWith('.gz')) { - fs.rmSync(path.join('./assets', tgzFile)); - } - }); - -}; - -postInstall(); diff --git a/src/virtualEnvironment.ts b/src/virtualEnvironment.ts index 421d789e..2694cd0e 100644 --- a/src/virtualEnvironment.ts +++ b/src/virtualEnvironment.ts @@ -62,7 +62,10 @@ export class VirtualEnvironment { this.pythonVersion = pythonVersion; this.cacheDir = path.join(venvPath, 'uv-cache'); - this.requirementsCompiledPath = path.join(resourcesPath, 'requirements.compiled'); + this.requirementsCompiledPath = + process.platform === 'win32' + ? path.join(resourcesPath, 'requirements', 'windows_nvidia.compiled') + : path.join(resourcesPath, 'requirements', 'macos.compiled'); this.pythonInterpreterPath = process.platform === 'win32' ? path.join(this.venvPath, 'Scripts', 'python.exe') @@ -193,6 +196,7 @@ export class VirtualEnvironment { * @returns */ public async runUvCommandAsync(args: string[], callbacks?: ProcessCallbacks): Promise<{ exitCode: number | null }> { + log.info(`Running uv command: ${this.uvPath} ${args.join(' ')}`); return this.runPtyCommandAsync(`${this.uvPath} ${args.map((a) => `"${a}"`).join(' ')}`, callbacks?.onStdout); } diff --git a/todesktop.json b/todesktop.json index 6f42c0e5..b1e80a80 100644 --- a/todesktop.json +++ b/todesktop.json @@ -3,15 +3,14 @@ "icon": "./assets/UI/Comfy_Logo_x128.png", "appBuilderLibVersion": "25.1.8", "schemaVersion": 1, - "uploadSizeLimit": 300, + "uploadSizeLimit": 400, "appPath": ".", "appFiles": [ "src/**", "scripts/**", "assets/ComfyUI/**", "assets/UI/**", - "assets/requirements.compiled", - "assets/override.txt", + "assets/requirements/**", "assets/uv/**", ".vite/**", ".yarnrc.yml",