From 112361b47ba9fa6a535a0ab35ad374d24a3948f0 Mon Sep 17 00:00:00 2001 From: Robin Huang Date: Mon, 11 Nov 2024 21:18:51 -0800 Subject: [PATCH] Rename ComfyUI-Manager to manager-core. (#227) * Rename ComfyUI-Manager to manager-core. * Checkout specific manager core commit. --- package.json | 3 ++- scripts/makeComfy.js | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f3bffb39..ff6407ca 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "packageManager": "yarn@4.5.0", "config": { "frontendVersion": "1.3.33", - "comfyVersion": "0.2.7" + "comfyVersion": "0.2.7", + "managerCommit": "cfdb687db3a7d2554f4f0e1f982ad9fffb3c4f2e" }, "scripts": { "clean": "rimraf .vite dist out", diff --git a/scripts/makeComfy.js b/scripts/makeComfy.js index 0f309eb5..155113b4 100644 --- a/scripts/makeComfy.js +++ b/scripts/makeComfy.js @@ -1,5 +1,6 @@ const { execSync } = require('child_process'); const pkg = require('../package.json'); +const fs = require('fs'); function makeAssets(gpuFlag) { const baseCommand = [ @@ -8,18 +9,25 @@ function makeAssets(gpuFlag) { `comfy-cli --skip-prompt --here install --version ${pkg.config.comfyVersion} --fast-deps`, gpuFlag, '--manager-url https://github.com/Comfy-Org/manager-core', + '--manager-commit', + pkg.config.managerCommit, '&&', '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} && ../scripts/checkAssetsMacos.sh python`, { stdio: 'inherit' }); + } else { + execSync(baseCommand, { stdio: 'inherit' }); } - - execSync(baseCommand, { stdio: 'inherit' }); + + // Rename custom_nodes/ComfyUI-Manager to manager-core + if (!fs.existsSync('assets/ComfyUI/custom_nodes/ComfyUI-Manager')) { + throw new Error('ComfyUI-Manager not found'); + } + fs.renameSync('./assets/ComfyUI/custom_nodes/ComfyUI-Manager', './assets/ComfyUI/custom_nodes/manager-core'); } // Get GPU flag from command line argument