Skip to content

Commit

Permalink
Install latest stable version of ComfyUI. (#24)
Browse files Browse the repository at this point in the history
* Install latest stable version of ComfyUI.

* Try.

* Fix.

* Add version install.
  • Loading branch information
robinjhuang authored Nov 7, 2024
1 parent 6813791 commit e80a96f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 12 deletions.
Empty file.
7 changes: 1 addition & 6 deletions .github/actions/build/macos/comfy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ runs:
run: |
python -m pip install --upgrade pip
pip install comfy-cli
cd assets
comfy --skip-prompt --here install --fast-deps --m-series --manager-url https://github.com/Comfy-Org/manager-core
cd ComfyUI
cd ../
comfy --here standalone --platform macos
comfy standalone --rehydrate
yarn make:assets:macos
- name: Unzip Sign Lib/Bin Rezip
if: ${{inputs.sign-and-publish == 'true'}}
shell: bash
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/debug_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- '.prettierrc'
- '.eslintrc.json'
- '.prettierignore'
- 'package.json'

jobs:
build-windows-debug:
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"main": ".vite/build/main.js",
"packageManager": "[email protected]",
"config": {
"frontendVersion": "1.3.33"
"frontendVersion": "1.3.33",
"comfyVersion": "0.2.7"
},
"scripts": {
"clean": "rimraf .vite dist out",
Expand All @@ -25,10 +26,10 @@
"lint": "eslint --ext .ts,.tsx .",
"lint:fix": "eslint --fix --ext .ts,.tsx .",
"make": "yarn run vite:compile && electron-builder build --config=builder-debug.config.ts",
"make:assets:amd": "cd assets && comfy-cli --skip-prompt --here install --fast-deps --amd --manager-url https://github.com/Comfy-Org/manager-core && comfy-cli --here standalone && yarn run make:frontend",
"make:assets:cpu": "cd assets && comfy-cli --skip-prompt --here install --fast-deps --cpu --manager-url https://github.com/Comfy-Org/manager-core && comfy-cli --here standalone && node ../scripts/env.mjs && yarn run make:frontend",
"make:assets:macos": "cd assets && comfy-cli --skip-prompt --here install --fast-deps --m-series --manager-url https://github.com/Comfy-Org/manager-core && comfy-cli --here standalone && yarn run make:frontend && ../scripts/checkAssetsMacos.sh python",
"make:assets:nvidia": "cd assets && comfy-cli --skip-prompt --here install --fast-deps --nvidia --manager-url https://github.com/Comfy-Org/manager-core && comfy-cli --here standalone && yarn run make:frontend",
"make:assets:amd": "node scripts/makeComfy.js amd",
"make:assets:cpu": "node scripts/makeComfy.js cpu",
"make:assets:macos": "node scripts/makeComfy.js macos",
"make:assets:nvidia": "node scripts/makeComfy.js nvidia",
"make:nvidia": "yarn run make -- --nvidia",
"notarize": "node debug/notarize.js",
"package": "yarn run vite:compile && todesktop build --code-sign=false --async",
Expand Down
39 changes: 39 additions & 0 deletions scripts/makeComfy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const { execSync } = require('child_process');
const pkg = require('../package.json');

function makeAssets(gpuFlag) {
const baseCommand = [
'cd assets',
'&&',
`comfy-cli --skip-prompt --here install --version ${pkg.config.comfyVersion} --fast-deps`,
gpuFlag,
'--manager-url https://github.com/Comfy-Org/manager-core',
'&&',
'comfy-cli --here standalone',
'&&',
'yarn run make:frontend'
].join(' ');

// Special case for macOS which needs additional checks
if (gpuFlag === '--m-series') {
return execSync(`${baseCommand} && ../scripts/checkAssetsMacos.sh python`, { stdio: 'inherit' });
}

execSync(baseCommand, { stdio: 'inherit' });
}

// Get GPU flag from command line argument
const arg = process.argv[2];
const gpuFlags = {
nvidia: '--nvidia',
amd: '--amd',
cpu: '--cpu',
macos: '--m-series'
};

if (!arg || !gpuFlags[arg]) {
console.error('Please specify a valid GPU type: nvidia, amd, cpu, or macos');
process.exit(1);
}

makeAssets(gpuFlags[arg]);

0 comments on commit e80a96f

Please sign in to comment.